LayoutPanels Basic Dialog Box : DockPanel « Windows Presentation Foundation « C# / C Sharp






LayoutPanels Basic Dialog Box

LayoutPanels Basic Dialog Box
       
<Window x:Class="LayoutPanels.BasicDialogBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="BasicDialogBox" Height="300" Width="300" MinHeight="150" MinWidth="200">
  <DockPanel LastChildFill="True">
    <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal">
      <Button Margin="10,10,2,10" Padding="3,3,3,3">OK</Button>
      <Button Margin="2,10,10,10" Padding="3,3,3,3">Cancel</Button>
    </StackPanel>
    <TextBox DockPanel.Dock="Top" Margin="10">This is a test.</TextBox>
  </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.Dock more than two objectsDock more than two objects
8.Docking left and right before top and bottomDocking left and right before top and bottom
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.