
224Microsoft Visual Studio 2010: A Beginner’s Guide
Figure 8-5 DockPanel layout
Width properties. Removing the Height and Width properties allows the DockPanel to expand and cover the entire window. Figure
Every time you drag and drop a control onto the design surface of a DockPanel, the control will take the center position by default. To specify where the control should dock, open the Properties window and set the DockLayout.Dock property. When you add a new control, the new control will become the center control and the other control will dock to the side of the DockPanel you specified in the Dock property. The next layout control is WrapPanel.
WrapPanel Layout
Whenever controls should naturally follow each other in sequence and continue wrapping on new lines, you can use a WrapPanel. Examples of when this is useful could be when adding controls that contain text and it’s useful to view the controls in sequence. Figure