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

How to Dynamically Close a RadPane

1 Answer 181 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Clarian Villamayor
Top achievements
Rank 1
Clarian Villamayor asked on 24 Jul 2012, 08:31 AM
Hi,

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); ...
                	}
        } 
        }

Thanks,
Clarian

1 Answer, 1 is accepted

Sort by
0
Lancelot
Top achievements
Rank 1
answered on 24 Jul 2012, 07:27 PM
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,
Lancelot
Tags
Docking
Asked by
Clarian Villamayor
Top achievements
Rank 1
Answers by
Lancelot
Top achievements
Rank 1
Share this question
or