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 Buttons in two StackPanels with only their Orientation set.
FIGURE 6.2 Buttons in a StackPanel, using both Orientation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access