Introduction to Windows Presentation Foundation (WPF) using C#


Course Number: NET-328
Duration: 3 days (19.5 hours)
Format: Live, hands-on

WPF Training Overview

This WPF .NET 8 training course teaches attendees how to build desktop applications with Microsoft’s WPF and .NET 8 frameworks, emphasizing the MVVM pattern, scalability, and maintainability. Attendees learn how to build robust desktop applications, implement MVVM architecture, and use WPF controls and custom controls. In addition, the course covers unit testing for individual components.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Understand the goals and benefits of WPF
  • Work with dotnet 8.0 command line interface and Visual Studio 2022
  • Make the right decisions about application architecture and data access technology
  • Use the MVVM design pattern to develop a robust and testable application
  • Build a compelling and maintainable desktop interface using XAML and code-behind
  • Gain experience building flexible application graphics with layout controls
  • Create customized controls with control templates and data templates
  • Add unit tests for robustness and maintainability improvements
  • Work through hands-on labs to develop modern Windows desktop application

Prerequisites

All students must have previous experience developing applications with C#, including knowledge of .NET Framework fundamentals.

Outline

Expand All | Collapse All

Introduction
  • History of WPF
  • Purpose and Philosophy
  • Elements
  • Attributes
  • XAML vs Code
  • Create applications with dotnet CLI
  • Visual Studio projects
WPF Design Pattern - MVVM
  • Design Patterns Review
  • MVVM Design Pattern
  • Integrating with backend services
  • Model
  • View
  • ViewModel
WPF Controls
  • Control Structure (XAML/Code)
  • Common Controls and their use
    • Border
    • Button
    • CheckBox
    • ComboBox
    • RadioButton
    • ListBox
    • TextBlock
    • Label
    • TextBox
  • Content Control vs ItemsControl
WPF Layout Controls 
  • Panels and their features
    • Grid
    • StackPanel
    • WrapPanel
    • DockPanel
    • UniformGrid
    • Canvas
WPF Commands
  • ICommand Interface
  • Command Controls
  • Adding Commands
  • Extending Commands to other Controls
Routed Events
  • Review C# Events and Delegates
  • Introducing RoutedEvents
    • Bubbling Events
    • Tunneling Events
  • Application Specific Events
  • Raising Events
  • Propagating Events up the Visual Tree
WPF Resources
  • Review XAML
  • WPF Resources vs Embedded Resources
  • Resource Definition
  • Static Resource Binding
  • Dynamic Resource Binding
  • Resource Dictionary
WPF Styles
  • Understanding Styles
  • Visual Inheritance
  • Targeted Styles
  • Default Styles
  • BasedOn - Style Inheritance
  • Setters
  • Triggers
    • Trigger
    • MultiTrigger
    • DataTrigger
    • MultiDataTrigger
    • EventTrigger
Control Templates
  • Visual Tree vs Logical Tree
  • Viewing Control Template
  • Custom Control Template
  • Visual States
  • Control Template as Custom Element
Data Template
  • ItemsControls and Data Templates
  • Defining Data Template – XAML
  • Data Binding in Data Template
  • Style in Data Template
  • Using Data Template as View in MVVM
Data Binding
  • Binding Source/Target
  • Binding Type
    • Two-Way
    • One-Way
    • One-Time
    • One-Way-To-Source
Data Context
  • Element Binding
  • Relative Source Binding
  • Data Converters
Custom Controls
  • Window/Page/UserControl
  • Dependency Properties
Validation
  • INotifyDataErrorInfo
  • IDataErrorInfo
  • ValidationRule
  • ErrorTemplate
  • Validation Timing
Debugging WPF Applications
  • Visual Studio Debugger
  • Live Visual Tree
  • Binding Failures
Unit Testing WPF Applications
  • Organizing Tests
  • Testing Code
  • Testing XAML
Conclusion

Training Materials

All WPF training students receive comprehensive courseware.

Software Requirements

  • Windows 10 or later with at least 8 GB RAM
  • Visual Studio 2022
  • .NET 8.0 SDK
  • LocalDB or another version of SQL Server


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan