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.
Syncfusion Feedback

Docking Panel Close/Hide Button Event?

Thread ID:

Created:

Updated:

Platform:

Replies:

84415 Jun 30,2009 05:12 PM UTC Jul 6,2009 11:54 AM UTC Windows Forms 6
loading
Tags: Tools
David
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.

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?

David
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.

Anyone?

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:

http://help.syncfusion.com/ug_72_new/toolswin/HowToPreventClosingOfDockedWindow.html

http://help.syncfusion.com/ug_72_new/toolswin/DocVisibilityChangedEvent1.html

Please let me know if any concerns.

Regards,
Fathima

David
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?

David
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.

http://files.syncfusion.com/support/Tools.Windows/7.2.0.37/F84415/main.htm

Please let me know if any concerns.

Regards,
Fathima

CONFIRMATION

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.

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

;