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

Close RadPane Programatically C#

2 Answers 151 Views
Docking
This is a migrated thread and some comments may be shown as answers.
crazy05
Top achievements
Rank 1
crazy05 asked on 24 Mar 2015, 06:19 PM
Hello,

How to close RadPane Programatically on Click of a button ?

2 Answers, 1 is accepted

Sort by
0
crazy05
Top achievements
Rank 1
answered on 24 Mar 2015, 06:26 PM
Here is my Code

<telerik:RadButton Content="Close" x:Name="button4" Command="{Binding ClosePaneCommand}" />

public ICommand ClosePaneCommand
{
get
{
return new RelayCommand(ClosePaneExecute);
}
}
0
Nasko
Telerik team
answered on 25 Mar 2015, 02:17 PM
Hello Ram,

When RadPane is closed (by clicking the close button for example) actually its IsHidden property is set to "True", in order to made it visible again when needed. So, you could close a pane pragmatically in code behind by just setting the IsHidden property to "True". However, if you'd like to close it permanently you could use the RemoveFromParent method. For your concrete scenario with the Button you need to pass the Pane you need to close as a CommandParameter.

Please, check the following article from our help documentation that provides more detailed information about the closing of the Panes:
http://docs.telerik.com/devtools/silverlight/controls/raddocking/features/panes/radpane#closing-radpane-instances

You could also check that sample project from our SDK Repository that demonstrates how to permanently close a Pane using the RemoveFromParent method.

Hopes this helps.

Regards,
Nasko
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Docking
Asked by
crazy05
Top achievements
Rank 1
Answers by
crazy05
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or