Close RadPane Programatically C#

3 posts, 0 answers
  1. crazy05
    crazy05 avatar
    72 posts
    Member since:
    Sep 2014

    Posted 24 Mar 2015 Link to this post

    Hello,

    How to close RadPane Programatically on Click of a button ?
  2. crazy05
    crazy05 avatar
    72 posts
    Member since:
    Sep 2014

    Posted 24 Mar 2015 Link to this post

    Here is my Code

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

    public ICommand ClosePaneCommand
    {
    get
    {
    return new RelayCommand(ClosePaneExecute);
    }
    }
  3. DevCraft banner
  4. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 25 Mar 2015 Link to this post

    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.

     
Back to Top