Professional Documents
Culture Documents
Windows Presentation
Foundation
By
Pradeep
Agenda
Introduction to .NET Framework 3.0
What is WPF?
What is XAML?
WPF application types
WPF controls
Using WinForms(.Net 2.0) controls in WPF
Styles
Benefits of WPF
Drawbacks of WPF
Tools for application development
Microsoft .NET Framework 3.0
Framework 3.0 = .NET Framework 2.0 + 4 new technologi
The application
development
framework for
Windows Platform
Microsoft .NET Framework 3.0
< Back
Application types in WPF
Supports two types of applications:
< Back
WPF Controls
Button
RadioButton
RepeatButton
ToggleButton – Two states Pushed & UnPushed
Menus
Menu
ToolBar
ContextMenu
List Selection
ComboBox
ListBox
TreeView
User Interface Navigation
ScrollBar
TabControl
Thumb
Frame
User Information
Expander
Label
TextBlock
Popup
ProgressBar
StatusBar
ToolTip
Editing
TextBox
RichTextBox - Display text in paragraph,
in table format,View images, enable spell
check
Media
Image
MediaElement
<MediaElement
Source=“media\JabWeMet.wmv"
Width="450" Height="250" />
WPF Controls
Range Selection
Slider
Dialog Boxes
PrintDialog
Missing controls
Color Dialog LinkLabel
DataGridView MaskedTextBox
BindingNavigator MonthCalendar
DateTimePicker NotifyIcon
ErrorProvider PageSetupDialog
FolderBrowserDi PrintDocument
alog PrintPreviewDialo
FontDialog g
HelpProvider PropertyGrid
ImageList
Hosting Windows Forms control in
WPF
Use WindowsFormHost control to host windows
forms control.
<<
BACK
Styles
<< Back
WPF Application Compilation
Application – MainWindow.xaml,
MainWindow.xaml.cs
Phase-1 – XAML Compilation
1. XAML file will be converted to BAML file by XAML compiler.
2. [ MainWindow.xaml MainWindow.baml ]
3. BAML file will be placed in obj/Debug or obj/Release folder.
4. Partial class will be generated – MainWindow.g.c
Phase-2 – Class Compilation
1. MainWindow.xaml.cs and MainWindow.g.c will be compiled into an
assembly by language compiler – csc.exe.
2. BAML files are embedded as resource files in the assembly.
Benefits
Browser support.
Relatively easy to understand XAML.
Allows separation of UI design from
implementation - Markup/Code behind model.
Easy to create 2D and 3D animations in UI.
Rich UI.
Benefits – Continued..
WINFORMS WinForms PDF WinForms + Windows Media Direct3D WPF
GDI Player
Forms, Controls X X X
Complex text X X
Images X X
Video / Audio X X
2D Graphics X X
3D Graphics X X
Drawbacks