Outline updated November 2026
WPF with MVVM and C#
Class Duration
35 hours of live training delivered over 5 days.
Student Prerequisites
- Professional C# programming experience
- Familiarity with Git
- No prior WPF, XAML, or MVVM experience required
Target Audience
C# developers who need maintainable Windows desktop applications and want to learn WPF with MVVM from the start. This includes developers coming from web or WinForms work and teams porting Windows Forms, MFC, or Win32 apps. Developers who already know WPF and MVVM can take Building Powerful Desktop Apps with WPF, and teams who need other platforms can continue to Build Cross-Platform Apps with .NET MAUI.
Description
This course teaches WPF on modern .NET with MVVM from the first day. Students start with XAML layout and data binding, then build view models with CommunityToolkit.Mvvm and its source generators. They add commands, validation, messaging, and view-model-first navigation with dependency injection. Later modules cover collections, large data sets, async work, Fluent theme styling, and unit tests for view models. Students use an AI coding assistant for XAML and view model work along the way.
Learning Outcomes
- Explain WPF's architecture and when to choose it
- Build layouts with WPF panels and reusable user controls
- Use binding modes, paths, converters, and collection views
- Debug bindings with binding diagnostics
- Structure applications with views, view models, and commands
- Remove MVVM boilerplate with CommunityToolkit.Mvvm source generators
- Implement validation and messaging between view models
- Implement view-model-first navigation with dependency injection
- Bind large data sets with virtualization and master-detail views
- Style and theme apps with templates and the Fluent theme
- Unit test view models and application logic
- Direct an AI coding assistant for XAML, view models, and MVVM refactoring
Training Materials
Comprehensive courseware is distributed online at the start of class.
Software Requirements
A Windows machine with Visual Studio 2026 (Community edition is sufficient), the .NET 10 SDK (LTS; .NET 11 also works), and Git. Access to an agentic AI coding assistant is required; a free tier is sufficient.
Training Topics
WPF and the Modern .NET Desktop
- WPF among the .NET desktop frameworks
- Application model and startup
- Fluent theming and modern visuals
- Project structure and tooling in Visual Studio
- XAML Hot Reload and designer workflow
- Agentic AI coding assistants in XAML and C# work
XAML Foundations
- XAML syntax, namespaces, and markup extensions
- Grid, StackPanel, DockPanel, and WrapPanel
- Margin, padding, and alignment
- Layout transforms
- Core controls and content model
- Resources and resource dictionaries
- Styles and setters
Data Binding in Depth
- Binding modes, paths, and sources
- Dependency properties and the WPF property system
- INotifyPropertyChanged and change notification
- Value converters and string formatting
- ElementName, RelativeSource, and DataContext flow
- Debugging bindings and binding diagnostics
MVVM Fundamentals
- Why MVVM
- View, view model, and model responsibilities
- CommunityToolkit.Mvvm and source generators
- Observable properties without boilerplate
- Design-time data and tooling support
Commands and User Interaction
- Routed events and the WPF input architecture
- ICommand and the command pattern
- RelayCommand and AsyncRelayCommand
- CanExecute logic and UI state
- Input gestures and keyboard support
- Async progress and cancellation
- Surfacing async errors
Application Architecture and Navigation
- Dependency injection with the .NET Generic Host
- Service abstractions for dialogs and platform features
- View-model-first navigation strategies
- Messaging between view models
- Composing views from user controls and data templates
Working with Collections and Data
- ObservableCollection and collection binding
- Sorting, filtering, and grouping with CollectionView
- Master-detail interfaces
- Virtualization for large data sets
- Async data access with EF Core and services
Validation and Forms
- Validation approaches in WPF
- ObservableValidator and data annotations
- INotifyDataErrorInfo and error templates
- Dirty tracking and save guards
Styling, Templating, and Theming
- Control templates and lookless controls
- Data templates and template selectors
- Triggers and visual states
- Fluent theme, dark mode, and accent colors
- Application-wide theming strategies
Testing MVVM Applications
- Unit testing view models
- Faking services behind interfaces
- Testing commands, validation, and navigation logic
- What stays untested in the view, by design
- Reviewing AI-generated view models and tests
MVVM in Practice
- Code-behind creep
- Fat view models
- Sharing state across view models
- Binding cost and startup time
- Modular application structure