We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How do I know the docking window which is currently being closed?

 

You can use the DockVisibilityChanged event to know the control visibility status. This event triggers after the control's visibility has changed (i.e when you click on the "x" button of the docking windows).

You can also use dockingManager.GetDockVisibility(control) method to know the current status of the docking window.

Note: When we close the docking window using the "x" button, it only hides the window and does not dispose the docked controls.

C#

//this event triggers when the control's visibility has changed.

private void dockingManager1_DockVisibilityChanged(object sender, Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs arg)

{

//GetDockVisibility method gives the detail of the docked control visibility

if(this.dockingManager1.GetDockVisibility(arg.Control)==false)

{

//DockVisibilityChangedEventArgs instance arg holds the control being changed the visibility

MessageBox.Show(this.dockingManager1.GetDockLabel(arg.Control)+" "+" window is closed.");

}

}

VB

'this event triggers when the control's visibility has changed.

Private Sub dockingManager1_DockVisibilityChanged(ByVal sender As Object, ByVal arg As Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs) Handles

dockingManager1.DockVisibilityChanged

'GetDockVisibility method gives the detail of the docked control visibility

If Me.dockingManager1.GetDockVisibility(arg.Control)=False Then

'DockVisibilityChangedEventArgs instance arg holds the control being changed the visibility

MessageBox.Show(Me.dockingManager1.GetDockLabel(arg.Control)+" "+" window is closed.")

End If

End Sub

Article ID: Published Date: Last Revised Date: Platform: Control:
1310 04/30/2011 07/10/2014 Windows Forms DockingManager
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.