The DockPanel Panel

The DockPanel container has some similarities with the StackPanel in that it allows arranging child controls near each other. The main difference in DockPanel is that child controls are docked to the panel sides according to the direction you specify, and also they are docked to each other and you can establish the position and size for each child control. The most common usage of the DockPanel panel is creating interfaces for placing menus and toolbars. The following example shows how you can dock multiple toolbars and their buttons within a DockPanel:

image

You set the DockPanel orientation by specifying either the VerticalAlignment ...

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.