Instructor-led training
WPF Using C# Training in Tukwila, Washington
This hands-on, 4-day course introduces Windows Presentation Foundation (WPF or Avalon), the .NET technology from Microsoft for building rich Windows applications.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Tukwila, Washington or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
Introduction to WPF
Why WPF?
What Is WPF?
.NET Framework 4.0
WPF Overview
Application and Window
A Simple WPF Application
Using Visual Studio 2010
Brushes
Panels
XAML
Role of XAML
Elements and Attributes
Namespaces
Property Elements
Type Converters
Content Property
Collections
XAML and Procedural Code
WPF Controls
Button
Label
TextBox
ToolTip
RadioButton
CheckBox
ListBox
ComboBox
Layout
Sizing
Positioning
Transforms
Canvas
Drawing Shapes
StackPanel
WrapPanel
DockPanel
Grid
Scrolling
Scaling
Dialogs
Message Boxes
Win32 Common Dialogs
Custom Modal Dialogs
Custom Modeless Dialogs
Menus and Commands
Menus
Context Menus
Icons on Menu Items
Commands
Keyboard Shortcuts
Disabling Menu Items
Checking Menu Items
Toolbars and Status Bars
Toolbars
Toolbars and Commands
Status Bars
Dependency Properties and Routed Events
Dependency Properties
Change Notification
Property Value Inheritance
Support for Multiple Providers
Routed Events
Routing Strategies
Resources
Resources in WPF
Binary Resources
Logical Resources
Static versus Dynamic Resources
Data Binding
Binding Sources
Sharing Sources with DataContext
Data Templates
Value Converters
Collection Views
Data Providers
Visual Data Binding Using Visual Studio 2010
Database Access Using Entity Data Model
Styles, Templates, Skins and Themes
Styles
Style Sharing
Triggers
Validation
Templates
Templated Parent’s Properties
Skins
Themes
Appendix A. Learning Resources
What makes WPF hard to master
Most of the difficulty is in WPF's programming model, not in C#. Developers used to event handlers and designer-driven forms often expect the same approach to work, and it only partly does. The syllabus builds the model in layers.
- Declarative UI first. The XAML block covers elements and attributes, namespaces, property elements, type converters, the content property, collections, and how XAML relates to procedural code. Without these, much of the markup in a real project is hard to read.
- Layout as a system. Sizing, positioning, transforms, Canvas, StackPanel, WrapPanel, DockPanel, Grid, scrolling and scaling are treated as a set of containers that negotiate space. A common mistake is to position everything absolutely.
- The property and event machinery. Dependency properties, change notification, property value inheritance, multiple providers, routed events and routing strategies explain why a property value can come from several places and why an event can fire on an element you never wired.
- Resources, binding, and templating. Logical versus binary resources, static versus dynamic lookup, binding sources, DataContext, data templates, value converters, collection views, styles, triggers, validation, control templates, skins and themes all depend on the layers beneath them.
A frequent misconception is that data binding is just a way to set Text. Binding errors are usually silent at runtime, and they only make sense once you understand DataContext inheritance and dependency properties. The static versus dynamic resource distinction also causes subtle bugs when a resource is looked up at the wrong time.
Who it suits and what to take around it
The course is general level and assumes a working knowledge of C# and the .NET Framework. It suits developers who build or maintain Windows desktop applications, and teams that need to read and extend existing WPF code.
The syllabus targets .NET Framework 4.0 and Visual Studio 2010. Microsoft lists .NET Framework 4.0 as out of support, and Visual Studio 2010 extended support ended in July 2020. The course therefore fits organizations that maintain, support or migrate existing WPF applications built on those versions. Teams working on newer .NET or Visual Studio releases can ask about a customized private training proposal.
- Before: if the framework itself is unfamiliar, .NET Framework Using C# covers the base class library and language foundations that the prerequisite assumes.
- After: the syllabus's database section uses Visual Studio data binding and the Entity Data Model. ADO .NET Using C# goes deeper into data access for teams whose WPF screens sit on a database.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- A data-entry screen for an internal tool. A team might combine Grid and StackPanel layout, a data template for a list of records, value converters for display formatting, and validation rules. Collection views would handle sorting and filtering without code in the window class.
- A document-style editor with consistent commands. For example, one command could drive a menu item, a toolbar button and a keyboard shortcut. Disabling and checking menu items would then follow application state in one place, and modal and modeless dialogs would handle settings and tool windows.
- Restyling an existing application. A team might replace the look of buttons and list items with styles, triggers and control templates, and package the result as a theme or skin. Logical resources keep the change in one place instead of scattered through the windows.
AI coding assistants and WPF
AI coding assistants are useful for XAML boilerplate: panel layouts, menu and toolbar markup, dependency property declarations, and simple value converters. They can also explain an unfamiliar XAML fragment, which helps when reading inherited code.
They fail in predictable ways for these topics:
- Version drift. Suggestions often assume newer .NET or WPF APIs or project styles. Code written for .NET Framework 4.0 and Visual Studio 2010 may not compile against that target, so check generated members against the framework version in use.
- Silent binding failures. Generated bindings can look correct while the DataContext, property path or converter is wrong, and nothing in the UI shows it.
- Resource and event semantics. Assistants often confuse static and dynamic resource references, or ignore routing strategy when handling events.
- Layout. Output tends to use absolute positioning where a Grid or DockPanel would resize properly.
To verify, build against the project's actual target framework, run the window, and watch the debugger output for binding errors. Resize the window to test layout. Test command enabled states. Treat anything you cannot explain in terms of dependency properties and routing as unreviewed.
Frequently asked questions
What level is this course?
General level, over four days. It assumes you already program in C#, and it teaches WPF itself: XAML, layout, controls, commands, resources, data binding, styles and templates.
What do I need to know beforehand?
A working knowledge of C# and the .NET Framework. No prior WPF or XAML experience is assumed.
Which versions does the course use?
The syllabus is built on .NET Framework 4.0 and Visual Studio 2010. Microsoft lists .NET Framework 4.0 as out of support, and Visual Studio 2010 extended support ended in July 2020. The course suits teams maintaining or migrating applications on those versions.
Does it cover databases?
Yes. The data binding material includes visual data binding in Visual Studio 2010 and database access using the Entity Data Model. It is an introduction within a WPF course, not a full data access course.
Can it be delivered privately and customized?
Yes. HSG delivers private training for organizations, onsite or live online, and content can be customized, including for the technology versions your team uses. You can send details through the training proposal request.
Training locations
WPF Using C# training across the U.S. and beyond.
We provide private WPF Using C# training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all WPF Using C# training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.