Denver User Group Meeting: Aug 27, 2007
Subject: Windows Presentation Foundation - Beyond The Bling
Speaker: Kathleen Dollard
Email: kathleen@mvps.org
Links: www.dotnetroadshow.com
Call To Action
Pay attention to WPF as a core technology: Dependency properties; Routed events; Commands
Isolation of Responsibility: Layout; Behavior; Appearance
Plan to incorporate WPF in desktop apps: It will replace WinForms; No DataGrid; Designers stink
Watch WPF emerging as a web and device tool: Silverlight
Note: Look at Kathleen articles for July for Key features of WPF info. WPF is the next great thing and it will replace win forms, but take awhile. We are moving toward a single layout for all platforms with near glacial speed.
Simple Containers
- GroupBox
- Frame
- List
Container Controls
- Grid - Control to learn
- StackPanel
- WrapPanel
- DockPanel
- Canvas
-Container controls are NOT content controls and thus hold only many items
Range Controls
- ProgressBar
- Slider
- Range controls do not support content, they have a double value and allow redo only (Progress Bar)
Example Code: <Label Background="Red" Padding="60" Margin="30">
This is a lable
<Lable.ToolTip>
<TextBlock> <--% They assume it should inherit from parent
</lable.ToolTip>
</Lable>
rols
Demo: Use of controls
STYLES
- Isolate appearance
- To find a style
-Work out to Application level (app.xaml)
- Two types
-implicit - based on control type
-explicit - type declared
- To set a value
-Default is the container value for most properties
-Apply style if it exists
-apply local values
(last wins)
MarkUp Extensions
Text="{Binding Path=FirstName"};
DEMO: Style isolation
Binding: Binding Target - Dependency
DEMO: Validation
Three Update Modes For Validation And Object Update
- Custom Rules
- Exception Rule
- Error Decorator
Comments
Post a Comment