Dock more than two objects : DockPanel « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="LayoutPanels.SimpleDock"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SimpleDock" Height="300" Width="300"
    >
    <DockPanel LastChildFill="True">
      <Button DockPanel.Dock="Top">A Stretched Top Button</Button>
      <Button DockPanel.Dock="Top" HorizontalAlignment="Center">A Centered Top Button</Button>
      <Button DockPanel.Dock="Top" HorizontalAlignment="Left">A Left-Aligned Top Button</Button>
      <Button DockPanel.Dock="Bottom">Bottom Button</Button>
      <Button DockPanel.Dock="Left">Left Button</Button>
      <Button DockPanel.Dock="Right">Right Button</Button>
      <Button >Remaining Space</Button>
    </DockPanel>
</Window>
WPF Dock More Than Two Objects








24.57.DockPanel
24.57.1.DockPanel with TextBlockDockPanel with TextBlock
24.57.2.DockPanel and GridDockPanel and Grid
24.57.3.Put a Menu and toolbar on the top with DockPanelPut a Menu and toolbar on the top with DockPanel
24.57.4.Put a simple StatusBar on the bottom with DockPanelPut a simple StatusBar on the bottom with DockPanel
24.57.5.DockPanel FillDockPanel Fill
24.57.6.DockPanel with Menu, ToolBarTray, StatusBar, StackPanelDockPanel with Menu, ToolBarTray, StatusBar, StackPanel
24.57.7.LayoutPanels Basic Dialog BoxLayoutPanels Basic Dialog Box
24.57.8.Dock more than two objectsDock more than two objects
24.57.9.Docking left and right before top and bottomDocking left and right before top and bottom
24.57.10.Show the effect of each value of the Dock property by manipulating two Rectangle elements.Show the effect of each value of the Dock property by manipulating two Rectangle elements.
24.57.11.Dock list box at left of panel
24.57.12.Dock Around the Block