Controling the closing of docked windows

3 posts, 0 answers
  1. DConroy
    DConroy avatar
    7 posts
    Member since:
    Apr 2007

    Posted 04 May 2007 Link to this post

    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. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 08 May 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. DConroy
    DConroy avatar
    7 posts
    Member since:
    Apr 2007

    Posted 08 May 2007 Link to this post

    Ok, thanks.  That will be a very good enhancement, to us at least. :)

    We are continuing to evaluate and things look good.
Back to Top