Week 6a - Windows Presentation Foundation

Concepts and Example Code

Synopsis:

This lecture introduces Windows Presentation Foundation (WPF), a Graphical User Interface technology that replaces WinForms. Its programming model seems, at first, to be similar to the WinForms model, but in fact its technology is a radical departure from all prior Microsoft GUI frameworks.

Readings and Activities for the Week:

Glossary of Terms

  1. The Syllabus describes topics to be covered, reading material for you to digest as part of each lecture, and due dates for assigned projects.
  2. Projects:

  3. SVG demo

    This demo works with Chrome, FireFox, Edge, and IE11. It does not work with IE8 and earlier.

    SVG demo, SVG demo folder
    HTML5 demo

  4. WPF Presentation

  5. WPF Tutorials:

  6. Demo code samples

    Demo Panels
    Illustrates how grid, canvas, dock, stack, and wrap panels work.

    Routed Event Demo
    Demonstrates event bubbling with Routed Events.

    Attached Properties Demo
    An example of attached properties used to dock buttons in a window.

    Triggers Demo
    Illustrates one use of triggers to change a textbox property.

    WPF Controls
    Shows how several of the most common kinds of controls are used. Includes use of data binding.

    Data Template Demo
    Data Templates are used to modify how data is displayed in WPF controls.

    Control Template
    Control templates can be used to modify the presentation of window controls.

    Bar Chart Demo
    Illustrates using rectangles to build a bar chart where each bar has a tooltip.

    WPF with all Code A WPF application can be built without using XAML. This demo illustrates how.

    Advanced Demos

    Change Notification
    Dispatcher Demo
    Message Hook
    Custom Element Demo

  7. WPFpedia.com Samples
  8. Preparation for Synchronous Discussion:

    • Using one of the tutorials, above, decide how you would layout a Client for Sample Project #4. Draw a sketch of the UI and be prepared to discuss.
  9. Lecture Take-aways:

    The most important things we discussed are: