First Technology Transfer

Standard and Advanced Technical Training, Consultancy and Mentoring

Course CSH105 Windows Presentation Foundation (WPF) C# Programming

Duration: 5 Days

Intended Audience

The course is aimed at Programmers, interface designers and implementers who already know C# and who need to master WPF - both theory and practice


Windows Presentation Foundation (or WPF) is Microsoft's framework for rendering user interfaces in Windows-based applications. The rationale behind WPF is to provide a separation between the user interface and the business logic. WPF uses XAML, a derivative of XML, to define and link various UI elements. WPF applications can be deployed as standalone desktop programs, or hosted as an embedded object in a website. WPF supports a wide range of user interface elements including 2D/3D rendering, fixed and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media. WPF provides mechanisms for linking and manipulating these elements based on various events, user interacations and data bindings.

The aims of the course are to provide a thorough understanding of, and practical programming experience of using WPF and Visual Studio to create WPF applications and also to provide an understanding of User Interface Design standards and their realisation using WPF, the way XAML is used in WPF containers and controls, as well as a discussion and understanding of the strengths and weaknesse of the Model-View View-Model (MVVM) design pattern in the context of WPF. Another key objective is to provide a good understanding of the various WPF mechanisms for binding and synchronising user interface elements with data sources.


  • WPF - Foundations
    • Overview of the WPF Architecture
    • Concept of Logical and Visual Trees
    • Dependency properties
    • Routed events
    • Commands, Attached Behaviours and Event handling
    • WPF class hierarchies
  • XAML Coding
    • Elements, Namespaces, Property elements, Type converters, Markup Extensions
    • Adding controls to containers
    • Setting properties using attribute and element syntax
    • Referencing external namespaces from XAML
    • Handling of bubbling and tunnelling routed events
  • WPF User Interface Design and Implementation
    • WPF Controls
      • Buttons, check boxes and labels
      • TextBox, RichTextBox and TextBlock
      • Slider
      • Image
      • Menus and Status bars
      • Using Grid and Canvas containers to position controls
      • Silverlight control toolkit
    • Complex Layouts
      • Defining grid rows and grid columns
      • Assigning controls to grid cells
      • Spanning multiple cells
      • Image
      • Grid splitter - resizing rows and columns
      • StackPanel and WrapPanel - positioning of elements
      • DockPanel and docking of controls
  • WPF and Data Handling
    • Binding Control Properties with XAML
      • ItemsControl
      • ComboBox
      • ListBox
      • Data templates for formatting content
      • Adding scrollable and expandable regions to forms
    • Data providers
      • Using XMLDataProvider and XPath to display XML data
      • Accessing collections with an ObjectDataProvider
      • Implementing custom type converters
    • Model View View Model (MVVM) Design Pattern
      • Binding to the ViewModel class
      • User input validation
      • Implementing the INotifyPropertyChanged interface
      • Automatic refresing of records using ObservableCollection
    • Commands and attached behaviours and event handling
      • Using built-in WPF commands to connect elements
      • Implementing custom-routed commands
      • Using relay and delegate commands
      • Adding attached properties and behaviours
  • WPF Graphics Elements
    • 2D Graphics Elements
      • Drawings
      • Visuals
      • Shapes
      • Brushes
      • Bitmap Effects
    • 3D Graphics Elements
      • Cameras and coordinates
      • Transform3Ds
      • Model3Ds
      • Visual3Ds
      • Viewport3DElement
  • WPF Media Support
    • Audio
    • Video
    • Speech