StackPanel
StackPanel
is a popular panel because of its simplicity and usefulness. As its name suggests, it simply stacks its children sequentially. Examples in previous chapters use StackPanel
because it doesn’t require the use of any attached properties to get a reasonable-looking user interface. In fact, StackPanel
is one of the few panels that doesn’t define any of its own attached properties!
With no attached properties for arranging children, you just have one way to customize the behavior of StackPanel
—setting its Orientation
property to Horizontal
or Vertical
. Vertical
is the default Orientation
. Figure 6.2 shows simple Button
s in two StackPanel
s with only their Orientation
set.
Get XAML Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.