Datasheet
Nesting panels and controls for a hierarchical design
With Blend, you often place the controls for your user interface into a layout panel, but you can also
place panels within other panels or controls within other controls. Nested objects, which are called
child elements, inherit properties from their parents — for example, they move with the parent when
the parent is moved, or they become invisible if the opacity of the parent is set to 0. Some panels or
controls can take a single child element, such as a border panel or scroll viewer. Other panels or con-
trols can take many child elements, such as all the panels, except Border, listed in the previous section
of this chapter, as well as menus, list boxes, combo boxes, tree views and more. And some controls,
such as sliders, progress bars, and grid splitters, accept no child elements.
The Objects list in the Objects and Timeline palette contains all the information about what is
nested in what, as shown in Figure 1.12. You can open or close the expanders to explore deeper
levels of nesting.
FIGURE 1.12
The image is nested inside a button which is nested in a wrap panel which is nested in a border panel.
When objects are nested, they are still readily available. You can select any particular nested ele-
ment of your program — to modify it or move it, for example, by double-clicking it several times
until the actual element is selected, So if your image is inside a button inside a wrap panel inside a
grid panel, as shown in Figure 1.12, you may need to double-click on the image three times and
16
Designing Next-Generation User Experiences
Part I
05_055038 ch01.qxp 5/4/07 8:58 PM Page 16










