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

Detect Floating Window Closed

1 Answer 104 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 2
Guru asked on 23 Sep 2011, 05:41 PM
I have an issue with detecting floating panes being closed.

On our dock manager we use both PaneStateChange and ActivePaneChanged to try to track which panes in the dock mgr are visible and give the user visual options to show and hide panes.

When a pane is floating and they click the close button, sometimes the ActivePaneChanged event will fire and sometimes it doesn't leaving our pane visual switchboard incorrect.

What would be the sure way to detect floating panes being closed?

Preferrably a trigger from the dock manager because some of our panes are dynamically generated at runtime and I would rather not have triggers attached to every possible pane for this purpose.

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 27 Sep 2011, 02:40 PM
Hello Zack,

You can use the PreviewClose event of the Docking control. There from the event arguments you can get the Pane which was closed and check if it is floating, for example:

private void RadDocking_PreviewClose(object sender, StateChangeEventArgs e)
{
    RadPane[] panes = e.Panes as RadPane[];
    RadPane pane = panes[0];
    if (pane.IsFloating == true)
    {
           //DO some work 
    }
}

Hope this helps.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Docking
Asked by
Guru
Top achievements
Rank 2
Answers by
Konstantina
Telerik team
Share this question
or