windows presentation foundation
DESCRIPTION
Windows Presentation Foundation. Moderne GUI og Silverlight. WPF Overview. Traditional GDI ( 25 years), GDI+, WinForms DirectX ( 16 years), Direct3D Quartz, DirectShow (14 years) Problems Showing their age Each API is different Mixing APIs is challenging. WPF Overview. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/1.jpg)
1
Moderne GUI og Silverlight
Windows Presentation Foundation
![Page 2: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/2.jpg)
2
WPF Overview
Traditional
GDI (25 years), GDI+, WinFormsDirectX (16 years), Direct3DQuartz, DirectShow (14 years)
ProblemsShowing their ageEach API is differentMixing APIs is challenging
![Page 3: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/3.jpg)
3
WPF Overview
Next Generation
WPF – replaces GDI/WinFormsDirect3D – large games, used by WPFMedia Foundation – ultimately will replace DirectShow
MCML – markup language for Media Center Edition applicationsXNA – small games
![Page 4: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/4.jpg)
4
WPF Overview
CompositingUI, Documents, Media, 3D, Browser, …
Declarative programming with XAML markupFor Designers and DevelopersRewritten from scratch
Built on top of Direct3DHardware acceleratedVector basedResolution independentRetained graphics
![Page 5: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/5.jpg)
5
WPF Vision
Integrated, vector-based composition engine
Utilizing the power of the PC throughout the graphics stack
Unified approach to UI, Documents, and Media
Integration as part of development and experience
Declarative programmingBringing designers directly into application development
Ease of deploymentAllowing administrators to deploy and manage applications securely
![Page 6: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/6.jpg)
6
XAML
XML for Applications Markup Language
<Button Name="button1">Click Me!
</Button>
Button button1 = new Button();button1.Content = "Click Me!";
![Page 7: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/7.jpg)
7
XAML: Properties
As attributes or elements
<Button Content="Click Me!" Background="LightGreen" />
<Button> <Button.Background> LightGreen </Button.Background> Click Me!</Button>
![Page 8: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/8.jpg)
8
XAML: Attached Properties
<Canvas> <Button Canvas.Top="30" Canvas.Left="40"> Click Me! </Button></Canvas>
![Page 9: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/9.jpg)
9
WPF Layout and Controls
Class hierarchy
![Page 10: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/10.jpg)
10
Layout Controls
StackPanelWrapPanelCanvasDockPanelGrid...
![Page 11: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/11.jpg)
11
Simple Controls
PasswordBoxScrollBarProgressBarSliderTextBoxRichTextBox...
![Page 12: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/12.jpg)
12
Content Controls
ButtonRepeatButtonToggleButtonCheckBoxRadioButtonLabelFrameListBoxItem
StatusBarItemScollBarViewerToolTipUserControlWindowNavigationWindow...
![Page 13: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/13.jpg)
13
Headered Content Controls
ExpanderGroupBoxItemTabItem...
![Page 14: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/14.jpg)
14
Items Controls
MenuContextMenuStatusBarTreeViewListBoxComboBoxTabControl...
![Page 15: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/15.jpg)
15
Lookless Controls
Control implies behaviour
Probably supplies default lookDesigner free to supply new look
![Page 16: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/16.jpg)
16
Styles are about setting properties…
![Page 17: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/17.jpg)
17
Styles
![Page 18: Windows Presentation Foundation](https://reader034.vdocuments.net/reader034/viewer/2022051002/56815e81550346895dcd10fb/html5/thumbnails/18.jpg)
18
Developer or Designer?
Designer Developer