Articles in this section
Category / Section

How to collapse the center drag provider of the WPF DockingManager?

1 min read

DockAbility property of WPF DockingManager has been used to set the desired dock side for the child element. To collapse the center, drag provider of DockingManager, we can set Dockablity of each child element of DockingManager to Horizontal and Vertical. The following code demonstrates the same,

C#

public partial class MainWindow : Window
{
  public MainWindow()
  {
    InitializeComponent();
            docking.Loaded += Docking_Loaded;
  }
 
  private void Docking_Loaded(object sender, RoutedEventArgs e)
  {
    foreach(var child in docking.Children)
    {
      DockingManager.SetDockAbility(child as DependencyObject, DockAbility.Horizontal | DockAbility.Vertical);
    }
  }
}

 

Note:

Multiple values of DockAbility cannot be set though xaml.

 

Collapse center drag provider of WPF DockingManager

View sample in GitHub.

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