Logo 
Search:

WPF Articles

Submit Article
Home » Articles » WPF » XAMLRSS Feeds

Dock Panel in XAML

Posted By: Vivek Patel     Category: WPF     Views: 13524

This article will explain Dock Panel Layout in XAML. A very simple tutorial to understand Dock Panel Layout in XAML.

Understanding Dock Panel Layout

  • Dock Panel Layout allows elements to be docked to the edges of the panel’s container, similar to windows forms docking.

Example of Dock Panel Layout

<DockPanel>
    <Label Content="Dock Panel Layout Demo" 
    FontSize="15" FontWeight="Bold" Background="LightBlue"
    Foreground="Blue" DockPanel.Dock="Top"/>

    <Label Content="Footer" FontSize="15" FontWeight="Bold" 
           Background="LightGray"
           DockPanel.Dock="Bottom" />
    
    <Label Content="Left Pane" FontSize="15" FontWeight="Bold"
           Width="125" Background="Firebrick"
           DockPanel.Dock="Left"/>
        
   <Label Content="Content Pane" FontSize="15" FontWeight="Bold"
           Width="255"
           Background="Beige"/>
   
    <Label Content="Right Pane" FontSize="15" FontWeight="Bold"
           Width="125" Background="Khaki"
           DockPanel.Dock="Right"/>
</DockPanel>


Output

  
Share: 

 
 
 

Didn't find what you were looking for? Find more on Dock Panel in XAML Or get search suggestion and latest updates.

Vivek Patel
Vivek Patel author of Dock Panel in XAML is from United States. Vivek Patel says

I have started working in .Net Technology since its beta release and lucky to got chance to work on .Net 1.1, 2.0 and now working on .Net 3.5. I have worked in both C# and VB.Net for Asp.net Projects. I can also provide Sharepoint development needs. I can efficiently switch role from Tech Lead and Developer. I have comprehensive knowledge of Asp.net Development. I have been award Microsoft Most Valuable Award twice in Asp.net Technology.

Blog: http://dotnetguts.blogspot.com

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!