Articles in this section
Category / Section

How to set height and width for dock window in DockingManager?

2 mins read

WPF DockingManager allows to set the desired width and height for the dock windows. The window Width and Height value set to “90” based on the container by default.

The desired height and width can be set for the Dock windows through the property DesiredwidthInDockedMode and DesiredHeightInDockedMode with the desired values.

The same has been explained using the following code snippet:

XAML:

//Code explains How to set height and Width in DockedMode 
<Window                
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"        x:Class="Docking.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<syncfusion:DockingManager UseDocumentContainer="True" >
<ContentControl syncfusion:DockingManager.Header="Dock3" Name="Content1" syncfusion:DockingManager.DesiredHeightInDockedMode="80" syncfusion:DockingManager.SideInDockedMode="Bottom"></ContentControl>
<ContentControl syncfusion:DockingManager.Header="Dock1" Name="Content2" syncfusion:DockingManager.DesiredWidthInDockedMode="170" ></ContentControl>
<ContentControl syncfusion:DockingManager.Header="Dock2" Name="Content3" syncfusion:DockingManager.DesiredWidthInDockedMode="170" ></ContentControl>
</syncfusion:DockingManager>
 </Grid>
</Window>
 

 

C#:

//Code explains How to set height and Width in DockedMode 
namespace Docking
{
 public partial class MainWindow : Window
 {
 public MainWindow()
 {
 InitializeComponent();
  DockingManager. SetDesiredHeightInDockedMode (Content1,80);
  DockingManager.SetDesiredWidthInDockedMode(Content2,170);
  DockingManager.SetDesiredWidthInDockedMode(Content2,170);            
  }
  }
  }

 

Output:

                     Output in WPF DockingManager 

Conclusion

I hope you enjoyed learning about how to set height and width for DockWindow in DockingManager.

You can refer to our WPF DockingManage feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF DockingManager documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments
Please sign in to leave a comment
Access denied
Access denied