Docking left and right before top and bottom : DockPanel « Windows Presentation Foundation « C# / C Sharp






Docking left and right before top and bottom

Docking left and right before top and bottom
             

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Simple DockPanel"
      Width="250" Height="150">
<DockPanel>
  <Button DockPanel.Dock="Left">Left</Button>
  <Button DockPanel.Dock="Right">Right</Button>
  <Button DockPanel.Dock="Top">Top</Button>
  <Button DockPanel.Dock="Bottom">Bottom</Button>
  <Button>Fill</Button>
</DockPanel>
</Window>

   
    
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.DockPanel with TextBlockDockPanel with TextBlock
2.DockPanel and GridDockPanel and Grid
3.Put a Menu and toolbar on the top with DockPanelPut a Menu and toolbar on the top with DockPanel
4.Put a simple StatusBar on the bottom with DockPanelPut a simple StatusBar on the bottom with DockPanel
5.DockPanel FillDockPanel Fill
6.DockPanel with Menu, ToolBarTray, StatusBar, StackPanelDockPanel with Menu, ToolBarTray, StatusBar, StackPanel
7.LayoutPanels Basic Dialog BoxLayoutPanels Basic Dialog Box
8.Dock more than two objectsDock more than two objects
9.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.