New to Telerik UI for WPF? Download free 30-day trial

Close RadPane Instances

Each RadPane is closable by default via the Close button or the Hide menu item shown on the snapshots above.

You can also hide/show your RadPane instances programmatically using the boolean RadPane's property IsHidden. When a RadPane is closed it is actually hidden and you can always make it visible again when needed.

When you set the IsHidden property of a RadPane to True or close it, it is actually removed from the visual tree.

Example 1: Set IsHidden

<telerik:RadPane x:Name="radPane" IsHidden="True"/> 

Example 1: Set IsHidden

radPane.IsHidden = true; 
radPane1.IsHidden = True 

To learn how to disable the close button or how to handle the RadDocking's PreviewClose event take a look at the How to Disable the Close Button topic.

CloseTabsOnMouseMiddleButtonDown

To close the panes of a RadPaneGroup on the click of the mouse middle button you can set the CloseTabsOnMouseMiddleButtonDown property of the RadPaneGroup to True.

Example 2: Set CloseTabsOnMouseMiddleButtonDown

<telerik:RadPaneGroup CloseTabsOnMouseMiddleButtonDown="True"> 
    <!-- ... --> 
</telerik:RadPaneGroup> 

Example 2: Set CloseTabsOnMouseMiddleButtonDown

radPaneGroup.CloseTabsOnMouseMiddleButtonDown = true; 
radPaneGroup.CloseTabsOnMouseMiddleButtonDown = True 

ClosePane Command

As of R3 2020, you can use the new ClosePane command to close the currently active pane. An example of how to use the command can be found in this article.

See Also

In this article