To Jost .NWDP Site

WPF Notes

Windows Presentation Foundation

Review Questions

  1. If A is the base class for the class B, which of these constructor calls is legal:
  2. Suppose you have this inheritance chain:
    For the method call x.F( ), how does .Net know which F to call if F is defined in more than one class?

  3. Explain what an interface is and why it is used.

  4. Which method or methods are required for these interfaces:

  5. What is the difference between a shallow and a deep clone of an object?

  6. Run this code and explain the output:

 

Examples

PizzaGuy1  PizzaGuy2  ToUpper1  Local  ListBox2  RadioButtons  DependencyProperty  Controls2  Controls3  Controls4  Numbers1  Controls5  Slider2  HaveBirthday1  HaveBirthday1  TicTacToe1  TicTacToe2  TicTacToe4  TicTacToe5  ToUpper2  Document1  Document2

Example files: wpf.zip and wpf.txt.

 

Part A:   More about File I/O

  1. Using .Net System.IO Classes   C#-2.FileIO1 and Intro.Unicode Examples.

 

Part B: An Xml Example

 

Part C: Examples for BooksNMusic Project

  1. EmployeeComboBox1   A desktop application that displays objects from the Person/Employee/Executive inheritance hierarchy.

  2. EmployeeWebPage   Same as the EmployeeComboBox1 application, but display information on a web page. Complete the application by adding code to add new items.

  3. BinaryFormatter   Show how to serialize a Dictionary collection of Employee objects using the BinaryFormatter class.
 

Part D: Overview of WPF

  1. Guiding Design Principles

  2. WPF Architecture

 

Part E: Using WPF Technology

  1. XAML and C# code-behind can be used in several development environments:


  2. Silverlight as a Web technology is being deemphasized.

  3. Microsoft has introduced the concept of Universal Apps, apps that render adaptively across Windows PCs, tablets, and phones.

  4. A major component of the Universal Apps is the Portable Class Library (PCL).

  5. The following table shows what features are available in PCL:

    Feature .Net
    Framework
    Windows
    Store
    Silverlight Windows
    Phone
    Core X X X X
    LINQ X X X X
    IQueryable X X X 7.5+
    Dynamic Keyword 4.5+ X X  
    MEF X X X  
    NCL X X X X
    Serialization X X X X
    WCF X X X X
    MVVM 4.5+ X X X
    Data Annotations 4.0.3, 4.5+ X X  
    XLINQ 4.0.3, 4.5+ X X X
    System Numerics X X X  

    MEF: Managed Extensibility Framework

    NCL: Network Class Library

    WCF: Windows Communication Founcation

    MVVM: Model-View-View-Model

 

Part F: WPF Topics

  1. Review of XAML

  2. XAML Namespaces  PizzaGuy2, Local Examples

  3. Using Visual Studio (VS) for WPF Projects  ToUpper Example

  4. WPF Controls   ListBox2, RadioButtons, PizzaGuy1, RoutedEvents Examples

  5. Dependency Properties   DependencyProperty Example

  6. Attached Properties   Local Example

  7. Layouts   Controls2, Controls3, Numbers1, Controls4, Controls5 Examples

  8. WPF Events   RoutedEvents Example

  9. Triggers   DependencyProperty Example

  10. WPF Resources   PizzaGuy1, PizzaGuy2 Examples

  11. Data Binding   Slider2, HaveBirthday1, HaveBirthday2 Examples

  12. Styles   TicTacToe1, TicTacToe2, TicTacToe4, TicTacToe5

  13. Transforms   HorseRace Example

  14. Documents   Document1, Document2 Example