The WrapPanel and DockPanel

Obviously, the StackPanel alone can't help you create a realistic user interface. To complete the picture, the StackPanel needs to work with other more capable layout containers. Only then can you assemble a complete window.

The most sophisticated layout container is the Grid, which you'll consider later in this chapter. But first, it's worth looking at the WrapPanel and DockPanel, which are two simple layout containers that are available as part of the Silverlight Toolkit. Both complement the StackPanel by offering different layout behavior.

To use the WrapPanel or the DockPanel, you need to add a reference to the System.Windows.Controls.Toolkit.dll assembly where they are defined. To get this assembly, you must install ...

Get Pro Silverlight 5 in VB 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.