WPF Fundamentals
WPF Overview
WPF architecture
Essential WPF concepts:
1. Logical and Visual Tree
2. Dependency Properties
3. Delegates
4. Routed Events
5. Commands
6. Class Hierarchy
XAML allows the declarative definition of a user interface. Defining a view as XAML and binding data provides the separation of view from conventional code.
Elements
Namespaces
Dependency Properties
Type Converters
Markup Extensions
Resources
Lab: Create WPF Application; Explore XAML and Project structure
Building WPF User Interface
Standard Controls
Panels and Control Positioning
Layout/Panels
Attached Properties
Windows and User Controls
Styles. Templates, Themes, & Skins
Documents & Text
Lab: Experiment with User Interface; Use standard controls, properties, styles and templates
DataBinding is a very important aspect of WPF as this feature allows the separation of View from the data being presented. WPF provides a very flexible means of binding also providing an alternative to the use of events
Data Binding Principles
Element Binding
Binding to objects and collections
Data Providers
Data Templates
Validation options
Lab: Explore binding options; Bind data to controls within ‘view’
Behaviours provide a means of separating common UI functionality from the basic view code
Behaviours and Blend
Standard Behaviours
Defining Behaviours
Lab: Define a Behaviour and apply to controls
Shapes
Geometry
Paths
Lab: Add drawing elements to enhance user interface
Model View ViewModel (MVVM)
The MVVM approach provides a key approach to separate functionality within a WPF Application. Applying MVVM relies on a number of features of WPF.
MVVM Principles
Commands
ICommand, INotifyPropertyChanged
Dependency Injection
Lab: Apply the MVVM approach to separate concerns
Using multiple threads within a Windows Application involves a number of important aspects.
Threading Principles
Delegates and Threads
Synchronization Issues
Background Worker
Dispatcher
Lab: Create background thread and update UI from this thread