The WrapPanel Panel

The WrapPanel container basically works like StackPanel, but it differs in that it can rearrange controls on multiple lines in the interface so that they are never hidden. Figures 31.16 and 31.17 show how the WrapPanel allows rearranging controls when resizing the parent container (a Window, in our examples).

Figure 31.16 WrapPanel arranges controls similarly to the StackPanel.

image

Figure 31.17 WrapPanel rearranges controls dynamically making them always visible, as if they were implemented line by line.

image

In code terms, the panel ...

Get Visual Basic® 2010 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.