Prev | Current Page 93 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"


Figure 1-4 shows a basic overview with some of the key branches of the class hierarchy.
As you continue through this book, you??™ll dig into these classes (and their relatives) in more
detail.
Figure 1-4. The fundamental classes of WPF
The following sections describe the core classes in this diagram. Many of these classes
lead to whole branches of elements (such as shapes, panels, and controls).
nNote The core WPF namespaces begin with System.Windows (for example, System.Windows,
System.Windows.Controls, and System.Windows.Media). The sole exception is namespaces that begin with
System.Windows.Forms, which are part of the Windows Forms toolkit.
CHAPTER 1 n INTRODUCING WPF 18
System.Threading.DispatcherObject
WPF applications use the familiar single-thread affinity (STA) model, which means the entire
user interface is owned by a single thread. It??™s not safe to interact with user interface elements
from another thread. To facilitate this model, each WPF application is governed by a dispatcher
that coordinates messages (which result from keyboard input, mouse movements,
and framework processes such as layout). By deriving from DispatcherObject, every element
in your user interface can verify whether code is running on the correct thread and access the
dispatcher to marshal code to the user interface thread.


Pages:
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105