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

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Date Time
8.Design Patterns
9.Development Class
10.Event
11.File Stream
12.Generics
13.GUI Windows Form
14.Internationalization I18N
15.Language Basics
16.LINQ
17.Network
18.Office
19.Reflection
20.Regular Expressions
21.Security
22.Services Event
23.Thread
24.Web Services
25.Windows
26.Windows Presentation Foundation
27.XML
28.XML LINQ
C# / C Sharp » Windows Presentation Foundation » DockPanelScreenshots 
Dock more than two objects
Dock more than two objects
       
<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>

   
    
    
    
    
    
    
  
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.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.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.