Introduction to Windows programming with WPF
In this module students are introduced to Windows Presentation Foundation (WPF),
and how this framework can be used to build state of the art
applications. Building state of the art applications requires the input of designers
for building great visualizations. Now developers and designers can work together
on the same application.
- Introduction to the WPF application
- WPF Architecture
- Designer/Developer productivity: declarative XAML
- The Visual Studio Designer
XAML is the UI-language important for developers using the Microsoft developer stack.
This module teaches students how to use the XAML language for building all kinds
of applications, focusing on WPF.
- What is XAML?
- XAML versus Code
- Looking at XAML basic syntax
- Understanding XAML attached properties
- Nesting controls
- The Content property
- Extending XAML through markup extensions
- Understanding CLR and Xml namespace mapping
- Naming elements
Developers and Designers Collaboration
In a perfect world, any developer is a great designer. Unfortunately this is not the case.
XAML allows for a clean separation between designing and developing.
- Developers versus designers
- Visual Studio as a development tool
- Blend as a designing tool
- Overview of Blend
This module gives you an overview of what kinds of controls are available and how
to compose them together.
- Examining the Class Hierarchy
- Tweaking the UI with transforms
- The power of composability
- Content controls, Container controls, Header controls, Item controls
- Range controls, Using Text controls
- Understanding dependency properties
- Routed events
Introduction to WPF Layout
Display hardware becomes more and more diverse: big screens, small screens, high and low resolutions, adaptable font size.
This does require some special up-front design. In this module students will learn how to build applications
that run with all kinds of resolutions and fonts.
- Look at WPF layout capabilities
- Absolute layout using Canvas
- Using StackPanel, WrapPanel and DockPanel
- The do-it-all panel: Grid
- Tweaking using panel attached properties
Reusability with WPF Resources
Developers have always used specially built controls to re-use some of their work.
WPF has re-use built in, so in this module students will learn how to re-use objects
for their applications.
- Re-using objects through resources
- Resource inheritance
- Static resources
- Dynamic resources
- Resources and code-behind Merging Resource Dictionaries
End users should easily see when an element on your UI is interactive, or when a
new element has been added to your window. These things can easily be accomplished by
WPF Animations, which greatly improves the user experience. In this module students will
learn how provide feedback to the user using animations.
- What are animations?
- Working with storyboards
- Animations in code
- Creating animations in Blend
Principles of WPF Styles, Triggers and Templates
Professionally built web sites use cascading style sheets (.css) to quickly change
the look and feel of the site. WPF takes this to the next level with styles and
templates. In this module students will learn how to quickly customize their whole
application with styles and templates.
- Why we need styles
- WPF look-less controls
- Example: Restyling a ListBox
- Intro to templates
Using the Entity Framework
Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using objects.
It eliminates the need for most of the data-access code that developers usually need to write.
- Introducing LINQ
- Entity Framework Fundamentals
- Code Strategies
- Entity Framework Model Designer
- Looking at the generated code: DbContext & DbSet
- Working with POCO's
- Querying and updating data
Using WPF Data Binding
Once the data is retrieved, we need to display it to the user and allow changes
to be validation and captured efficiently. In this module students will learn how
to use data binding to accomplish this.
- The need for data binding
- Binding in code and markup
- Introduction to simple data binding
- Converting data for data binding
- Introduction to complex data binding
- Understanding Source and DataContext
- Visual data binding with the Visual Studio Data Sources window
User input needs to be validated. Are all required properties provided? Do the values match the format?
WPF offers several options for validation that are explored in the following chapter.
- Validation Rules
- Custom Feedback
Introduction to the MVVM pattern
MVVM is a version of the MVC pattern designed specifically for WPF, which is heavily relies on Data Binding
- What is the MVVM pattern?
- Using commands instead of event handling
- Defining the model
- Adding the ViewModel
- Binding the View to the ViewModel
Introducing ASP.NET Web API
This part will show students how to create and consume web services with Web API.
- REST services
- CRUD operations
- Feature Overview
Consuming a ASP.NET Web API REST service from .NET
- HttpClient and WebHttpRequest Class
- Serialization and Deserialization
"If this then that", that's what behaviors are all about. It allows you to set up new functionality for an existing control in a declarative way.
- Built-in Behaviors
- Custom Behavior
The Visual State Manager and Custom Controls
When customizing an interactive element for your UI, you need to specify the look and feel
in all circumstances. The Visual State Manager is a mediator that allows changing styles and templates
based on certain conditions. In this module students will
learn how set up and use the Visual State Manager.
- What is the Visual State Manager?
- Parts, states, transitions and state groups
- Responding to state changes
- Custom Control with the Visual State Manager
- Using the Visual State Manager for responsive Layout
- Using the Visual State Manager in Blend
WPF and .NET Core
Since .NET Core 3.0 you can also create WPF applications on top of .NET Core. This also brings some typical built-in Core functions to .NET
like a different configuration system, dependency injection and more. In this module you learn about these .NET Core functionalities and
how to use them in WPF.
- No more config files. The new configuration system
- Logging with .NET Core and WPF
- Dependency Injection
- Dependency Injection and MVVM
Deploying your WPF Windows Applications
This module will show students how to deploy their WPF application
- Using XCOPY deployment
- Using Click-Once
- Using an Installer