Summary
With the diverse range of classes available to use within WPF, we can see that WPF is a great toolset for creating interesting, compelling, and visually stunning interfaces and controls.
Understanding and respecting this diversity and knowing which is the best tool for any given situation will make your development experience more rewarding and enjoyable and will ultimately improve the quality of your applications.
Table 2.1 presents a summary of the classes discussed in this chapter.
Table 2.1. Summary of WPF Classes
Class |
Description |
DispatcherObject |
Provides threading and messaging control |
DependencyObject |
Provides hosting for dependency properties, a core building block for many of WPF's advanced features, such as data binding |
Visual, DrawingVisual |
Provide functionality for drawing simple graphics |
Shape |
Provides functionality for drawing geometry-based graphics |
Decorator |
Draws decorations around a contained UIElement |
Adorner |
Provides a decorative overlay on top of other controls |
FrameworkElement |
A container for other visual elements |
GlyphRuns, TextBlock, FlowDocument |
Provide text support with increasingly complex set of features for formatting and layout |
Panel |
The "layout brain" container for other elements |
Control |
A UI component that supports templating |
ContentPresenter |
Container for holding a DataTemplate |
ItemsPresenter |
Container for holding an ItemTemplate |
ContentControl |
A control that contains a single child |
ItemsControl |
A control that displays a list of items |
UserControl |
A "black box" container for multiple logically and visually related controls |
DataTemplate, ControlTemplate, ItemsPanelTemplate |
Reusable visual tree templates |
Image |
A high-performance graphics control for high-volume data visualization or display of raster and vector images |
Brush |
Provides static graphics for backgrounds, ranging from the simple SolidColorBrush to the complex TileBrushes |
Viewport3D |
A container for an interactive 3D world |
MediaElement |
Plays audio and/or video within a container |
InkCanvas |
For creating Tablet PC-like strokes and gestures |
In the next chapter, we discuss creating controls and some best practices for approaching control creation. We build on the foundations from this chapter and the previous chapter as we venture into the world of creating exciting, modern interfaces with WPF.