Prev | Current Page 96 | Next

Matthew MacDonald

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

You??™ll start building shapes in Chapter 13.
System.Windows.Controls.Control
A control is an element that can interact with the user. It obviously includes classes such as
TextBox, Button, and ListBox. The Control class adds additional properties for setting the font
and the foreground and background colors. But the most interesting detail it provides is template
support, which allows you to replace the standard appearance of a control with your
own stylish drawing. You??™ll learn about control templates in Chapter 15.
nNote In Windows Forms programming, every visual item in a form is referred to as a control. In WPF, this
isn??™t the case. Visual items are called elements, and only some elements are actually controls (those that can
receive focus and interact with the user). To make this system even more confusing, many elements are
defined in the System.Windows.Controls namespace, even though they don??™t derive from
System.Windows.Controls.Control and aren??™t considered controls. One example is the Panel class.
System.Windows.Controls.ContentControl
This is the base class for all controls that have a single piece of content. This includes everything
from the humble Label to the Window. The most impressive part of this model (which is
described in more detail in Chapter 5) is the fact that this single piece of content can be anything
from an ordinary string to a layout panel with a combination of other shapes and
controls.


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