"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"
Instead, they??™re used to shape portions of your interface. For example, you could use a DockPanel to place different StackPanel and WrapPanel containers in the appropriate regions of a window. For example, imagine you want to create a standard dialog box with OK and Cancel buttons in the bottom right-hand corner, and a large content region in the rest of the window. There are several ways to model this interface with WPF, but the easiest option that uses the panels you??™ve seen so far is as follows: 1. Create a horizontal StackPanel to wrap the OK and Cancel buttons together. 2. Place the StackPanel in a DockPanel and use that to dock it to the bottom of the window. 3. Set DockPanel.LastChildFill to True, so you can use the rest of the window to fill in other content. You can add another layout control here, or just an ordinary TextBox control (as in this example). 4. Set the margin properties to give the right amount of whitespace. Here??™s the final markup: Orientation="Horizontal">
This is a test.
Figure 4-11 shows the rather pedestrian dialog box this creates.