O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required