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

Controling the closing of docked windows

2 Answers 107 Views
Dock
This is a migrated thread and some comments may be shown as answers.
DConroy
Top achievements
Rank 1
DConroy asked on 04 May 2007, 05:13 PM
I know that you need to unregister dockpanels in order to remove them from the manager.

But how would I know when to do this?  You have closebuttonvisible property to disable the close  button, (even though it doesn't truly close), but how would I be able to determine that the user clicked it, since there doesn't seem to be a way to determine how the panel was hidden.

If the user selects hide from the dropdown, or closes it with the button, how can I tell the difference? I want to remove the panel if the close button is used.

2 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 08 May 2007, 09:12 AM
Hello DConroy,

Currently you may use DockingStateChanged and DockingStateChanging events. In our next SP1 release we will add also Closed, Closing and Deactivated event for better control over the DockPanel instances.

private void dockingManager1_DockingStateChanging(object sender, Telerik.WinControls.Docking.DockingChangingEventArgs e)  
{  
    string message = "DockObject previous state: ";  
    IDockable window = e.DockObject as IDockable;  
    if (window != null) message = window.Text + " previous state: ";  
    AddLog(message + e.PreviousDockableState, true);  

private void dockingManager1_DockingStateChanged(object sender, Telerik.WinControls.Docking.DockingChangedEventArgs e)  
{  
    string message = "DockObject current state: ";  
    IDockable window = e.DockObject as IDockable;  
    if (window != null) message = window.Text + " current state: ";  
    AddLog(message + e.DockState, true);  
    AddLog("", true);  


Best wishes,
Julian Benkov
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
DConroy
Top achievements
Rank 1
answered on 08 May 2007, 12:59 PM
Ok, thanks.  That will be a very good enhancement, to us at least. :)

We are continuing to evaluate and things look good.
Tags
Dock
Asked by
DConroy
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
DConroy
Top achievements
Rank 1
Share this question
or