How to Float a PaneGroup in Code-Behind

Environment

Product RadDocking for WPF

Description

How to undock a RadPaneGroup programmatically.

Solution

To achieve this requirement you can create the following helper method.

Example 1: Create the helper method to float a RadPaneGroup

    public void FloatGroup(RadPaneGroup paneGroup) 
    { 
        var panes = paneGroup.EnumeratePanes().ToList(); 
        var firstPane = panes[0]; 
 
        firstPane.MakeFloatingDockable(); 
        for (var i = 1; i < panes.Count(); i++) 
        { 
            panes[i].RemoveFromParent(); 
            firstPane.PaneGroup.AddItem(panes[i], DockPosition.Center); 
        } 
    } 
You can then use this method to undock any RadPaneGroup.

Example 2: Use the FloatGroup helper method

    this.FloatGroup(this.paneGroup1); 

See Also

In this article
Not finding the help you need? Improve this article