How to Dynamically Close a RadPane

2 posts, 0 answers
  1. Clarian Villamayor
    Clarian Villamayor avatar
    13 posts
    Member since:
    Jun 2010

    Posted 24 Jul 2012 Link to this post


    I wish to have a shotcut key for closing a RadPane from my container (RadDocking). e.g. CTRL + Shift + W

    How can I simulate the clicking of the close (x) button when user types the shortcut key i defined?

    Something like below.

            private void MainPage_KeyUp(object sender, KeyEventArgs e)
            { if (IsCtrlShift())

                     switch (e.Key)
                         case Key.W: this.PaneContainer.PreviewClose(this.PaneContainer.ActivePane); ...

  2. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 24 Jul 2012 Link to this post

    Hi Clarian,

    This link will bring you to the events overview for the RadDocking control. There is a Close event that you may find useful. However, the attribute you're looking for is Hidden. RadPanes (once instantiated) are hidden. To the user, this means closed, but to you it is this:

    radPane.IsHidden = true;

    You can find more on how to programmatically influence the RadPanes here.

    Good Luck,
  3. DevCraft R3 2016 release webinar banner
Back to Top