Prev | Current Page 189 | Next

Matthew MacDonald

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


Children The collection of items that??™s stored in the panel. This is the first level of items??”
in other words, these items may themselves contain more items.
IsItemsHost A Boolean value that??™s True if the panel is being used to show the items that are
associated with an ItemsControl (such as the nodes in a TreeView or the list
entries in a ListBox). Most of the time you won??™t even be aware that a list control
is using a behind-the-scenes panel to manage the layout of its items. However,
this detail becomes more important if you want to create a customized list that
lays out children in a different way (for example, a ListBox that tiles images).
You??™ll use this technique in Chapter 17.
nNote The Panel class also has a bit of internal plumbing you can use if you want to create your own layout
container. Most notably, you can override the MeasureOverride() and ArrangeOverride() methods inherited
from FrameworkElement to change the way the panel handles the measure stage and the arrange stage
when organizing its child elements. You??™ll learn how to create a custom panel in Chapter 24.
On its own, the base Panel class is nothing but a starting point for other more specialized
classes. WPF provides a number of Panel-derived classes that you can use to arrange layout.
The most fundamental of these are listed in Table 4-2.


Pages:
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201