Upload
ukdpe
View
1.644
Download
1
Tags:
Embed Size (px)
DESCRIPTION
MikeTaulty_Wpf
Citation preview
1
A tour of Windows Presentation Foundation
Mike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.miketaulty.com
WPF is a framework for rich apps
3
applications built with WPF
built in .NET on top of Direct3D
*this makes graphics cards significant to the performance of the application
man
aged
man
aged
unmanaged
unmanaged
there are 3 public versions
2006 w/Vista
2007w/VS 2008
2008w/VS 2008 Sp1
Windows XP Service Pack 2+Windows XP Service Pack 2+
Windows VistaWindows Vista
Windows 7Windows 7
it provides a unified frameworkVector DrawnVector Drawn H/W AcceleratedH/W Accelerated Retained GraphicsRetained GraphicsLogical PixelsLogical Pixels
LayoutLayout CompositionCompositionDatabindingDatabinding AnimationAnimationTransformatioTransformationn EffectsEffects
development makes use of XAML
eXtensible Application Markup Language
Provides separation of concerns for UI/codeDrives tooling for designer/developer workflowLoad dynamically or compile with codeExtensible to your own types
XAML is often “backed” by code
XAML markup languagedefines UI
.NET code handles interaction
WPF .NET Application
tooling for WPF in 2008Develop with Visual Studio 2008 Sp1Develop with Visual Studio 2008 Sp1
Design Styles & Interaction in Expression Blend 2 Sp1Design Styles & Interaction in Expression Blend 2 Sp1
10
“Hello World” in WPF
rich set of 2D graphical capabilities
12
2D Graphics in WPF
extensible facilities for layout
14
layout in WPF
rich set of 3D graphical capabilities
16
3D Graphics in WPF
rich set of media capabilities
18
media in WPF
capabilities for documents & text
20
documents/text in WPF
rich set of controlsCodePlex adds
WPF ToolkitDataGridCalendarDatePicker
WPF RibbonWPF Futures with more
many controls are content controls
23
content controls in WPF
controls have visual templates
Separation of control behaviour from control appearance
25
templating a control
you can build your own controls
UserControl for composition of controlsPanel for custom layoutControl for ultimate flexibility incl. templating
or look to 3rd parties
28
3rd party WPF controls
a unified framework
all with the same, consistent programming model
30
a unified framework
resources and styles
Elements have a dictionary of resources identified by KeyResources from various files can be merged into oneResolution of a resource is a hierarchical lookup
resources
styles
Styles contain setters for Properties and ValuesStyles can be applied by type or by keyStyles can derived from other styles
32
resources and styles
built-in animation system
Animation is driven by Storyboards
StoryboardStoryboard
DoubleAnimationDoubleAnimation
ColorAnimationColorAnimation
etcetc
PointAnimationPointAnimation
built-in triggering system
Declarative means of taking action when something happens
When some propertyWhen some propertyhits some value hits some value
When some dataWhen some datahits some valuehits some value
When some eventWhen some eventhappenshappens
35
animations & triggers
databinding is core in WPF
Elements have a DataContextResolution of declarative bindings is done by hierarchically examining an element’s DataContextButtonButton
GridGrid
databinding is core in WPF
38
databinding
deploying WPF applications
XAML Browser Application(XBAP) ClickOnce Application
Full Client
if we had a day...more topics
*there are no doubt many more topics we’ve omitted
more WPF?
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.