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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Docking Panel Close/Hide Button Event?

Thread ID:





84415 Jun 30,2009 05:12 PM UTC Jul 6,2009 11:54 AM UTC WinForms 6
Tags: Tools
Asked On June 30, 2009 05:12 PM UTC

Hi, how can i raise an event when i click the close button (X) of a docking panel?

Thanks, David.

Replied On June 30, 2009 05:40 PM UTC

OK, i have found the click event of this.dockingManager1.CaptionButtons["CloseButton"] and i can successfully raise this event when i close a panel.

Only problem now is, how can i tell which panel i closed or how can i get the name of the docked control that was closed?

Replied On July 1, 2009 10:24 PM UTC

Ok, scrap what i asked for, what i actually need is a way of raising an event when a docked control is set to "Hide", not just using the close button, but also by selecting hide from the context menu.


Fathima Shalini P [Syncfusion]
Replied On July 2, 2009 12:50 PM UTC

Hi David,

Thank you for your interest in Syncfusion Products.

When closing the DockedPanel using close button or using ContextMenu, DockVisibilityChanging and DockVisibilityChanged event. Using the event's Control property we can easily trace out the control being closed. Kindly refer to the provided documentation links that depicts this:



Please let me know if any concerns.


Replied On July 2, 2009 11:55 PM UTC

I can't get it to work, it seems that the DockVisibilityChanged event never gets fired. I tried calling a simple MessageBox, but it still doesn't work when i click the "close" button or press "hide" from the contextmenu.

I have no idea why this event doesn't work.

I've also tried using other events like AutoHideAnimationStart, and i still can't get it to fire. It seems that the dockingmanager isn't responding to events?

Is this a bug or something?

Replied On July 3, 2009 12:10 AM UTC

Seems that the events only get fired when I add the eventhandler within the BeginInit() and EndInit() statements. It doesn't seem to work when i just add them using the Events panel in the properties window.

Anyway thanks for your help.

Fathima Shalini P [Syncfusion]
Replied On July 6, 2009 11:54 AM UTC

Hi David,

Thank you for your update.

I tested the issue with the simple sample in which I have docked two panels and added event handlers using properties window at design time. I could see DockVisibilityChanged and DockVisibilityChanging events triggered when closing the docking control both by clicking the close button and using Hide option.


Please let me know if any concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon