WPF Master Class
WPF Master Class
W h a t w e ’ re g o in g to co ve r ju st
n•o w …
Brief overview of WPF and Silverlight
• Why are we using WPF??
• System Requirements
• Layout and Structure of code
• Telerik Controls…
• Questions??
Brief overview of WPF and
Silverlight
Further explination of WPF
about WPF
Why are we using WPF
• The main reason, because we can
create dynamic applications FAST!
• It allows us major revamp to the
existing controls
• most of the code behind can remain
the same, its only the UI interface
that needs freshened up, WPF has
the same “code-behind” as existing
WinForms dialogs
System Requirements
Layout of code
• Both WPF and Silverlight use XAML
code for the UI layer, and C# for
the backend code…
• Very similar to ASP.NET style layout
(nested controls)
• Example :
• <grid>
• <button>
• <textblock/>
• <button>
• </grid>
Panels…
Just to give you an idea of what we mean when we say controls can easily
be composed …
• <Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="Comic Sans MS"/>
<Setter Property="FontSize" Value="14"/>
</Style>
However if we give this an x:key property… not all textblocks will be set… only the ones
we want…
<!--A Style that affects all TextBlocks-->
<Style TargetType="TextBlock“ x:key=“MyTextBlockStyle“ >
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontFamily" Value="Comic Sans MS"/>
<Setter Property="FontSize" Value="14"/>
</Style>
I.E.
<TextBlock Style="{StaticResource MyTextBlockStyle}" Name="textblock1">
My Pictures
</TextBlock>
Backwards Compatibility
• For Example :
• Windows Forms WPF
– OnClick C licC
– OnTextChanged TextC hanged
– C nC croll Scrolled
–
• …C C tc… C ou get the idea! Drop the C n For most
things!!!
Telerik Controls…
• Another one of the reason that we
are using the WPF and Silverlight
controls is the vast array of Telerik
WPF and Silverlight controls
available to us, this adds another
degree of functionality…
o heavy support for Drag and Drop,
o Data binding
o Rich Controls (Ribbon Bars, Carosels, ListViews etc.)
Questions???