c# kursus rohde & schwarz1 moderne gui windows presentation foundation
TRANSCRIPT
1C# kursus Rohde & Schwarz
Moderne GUI
Windows Presentation Foundation
2
WPF Overview
Traditional
GDI (25 years), GDI+, WinFormsDirectX (16 years), Direct3DQuartz, DirectShow (14 years)
ProblemsShowing their ageEach API is differentMixing APIs is challenging
3
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
4
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
5
XAML
XML for Applications Markup Language
<Button Name="button1">Click Me!
</Button>
Button button1 = new Button();button1.Content = "Click Me!";
6
XAML: Properties
As attributes or elements
<Button Content="Click Me!" Background="LightGreen" />
<Button> <Button.Background> LightGreen </Button.Background> Click Me!</Button>
7
XAML: Attached Properties
<Canvas> <Button Canvas.Top="30" Canvas.Left="40"> Click Me! </Button></Canvas>
8
Content Controls
ButtonRepeatButtonToggleButtonCheckBoxRadioButtonLabelFrameListBoxItem
StatusBarItemScollBarViewerToolTipUserControlWindowNavigationWindow...
9
Simple Controls
PasswordBoxScrollBarProgressBarSliderTextBoxRichTextBox...
10
Layout Controls
StackPanelWrapPanelCanvasDockPanelGrid...
11
Headered Content Controls
ExpanderGroupBoxItemTabItem...
12
Items Controls
MenuContextMenuStatusBarTreeViewListBoxComboBoxTabControl...
13
Lookless Controls
Control implies behaviour
Probably supplies default lookDesigner free to supply new look
14
Styles are about setting properties…
15
Styles
16
Developer or Designer?
Designer Developer
Java kursus KMD 17
Demo