This is a migrated thread and some comments may be shown as answers.

Problem with RadDocumentPane closing

1 Answer 105 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 07 Mar 2013, 08:05 AM
Hello. I have one problem. When I click button "Close" on RadDocumentPane I see that pane is closed. But when I try to save layout I see that this pane is hidden. I need to disable hidding pane when I click button "Close". How ca I do it? Thanks.

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 11 Mar 2013, 03:17 PM
Hi Sergey,

By design when a Pane's Close button is pressed the its IsHidden property is set to True, this is done in order to be able to show the closed Pane at a later stage if needed.

You can permanently remove the Pane by calling its RemoveFromParent() method. You could do that in the Close event of the Docking control. The next code snippet shows the described approach:
in the xaml:
<telerik:RadDocking x:Name="dock" Close="dockClose">
           ...
</telerik:RadDocking>

and in the code behind:
private void dockClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
{
    var closedPanes = e.Panes as IEnumerable<RadPane>;
    foreach (var pane in closedPanes)
    {
        pane.RemoveFromParent();
    }
}

All the best,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Sergey
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or