We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the notification on dock window resizing of WPF DockingManager?

Platform: WPF |
Control: DockingManager |
Published Date: May 31, 2018 |
Last Revised Date: August 3, 2021 |
.NET Framework: 4.5

Window Resizing event of WPF DockingManager will be triggered when the size of the dock window is changed during resize operation. Sender of the Window Resizing event contains the information about the resized element and the event arguments contains the information about the current size of the Dock element. For instance, we have displayed the information about the resized element in the output window. The following code example demonstrate the same,


<syncfusion:DockingManager x:Name="docking" WindowResizing="Docking_WindowResizing">
  <ContentControl syncfusion:DockingManager.Header="Docking Left" syncfusion:DockingManager.SideInDockedMode= "Left" />
  <ContentControl syncfusion:DockingManager.Header="Docking Top"  syncfusion:DockingManager.SideInDockedMode= "Top"/>
  <ContentControl syncfusion:DockingManager.Header="Docking Right"  syncfusion:DockingManager.SideInDockedMode= "Right"/>
  <ContentControl syncfusion:DockingManager.Header="Docking Bottom"  syncfusion:DockingManager.SideInDockedMode="Bottom" />           


private void Docking_WindowResizing(object sender, WindowResizingEventArgs e)
  if (sender is DockedElementTabbedHost && (sender as DockedElementTabbedHost).HostedElement != null)
    string header = DockingManager.GetHeader((sender as DockedElementTabbedHost).HostedElement).ToString();
    Console.WriteLine("Resized element header and size is" + header + "," + e.DesiredHeight + "," + e.DesiredWidth);

View sample in GitHub.

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile