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. Image for the cookie policy date

Canceling the DockStateChanging

Anyone know how to cancel the DockStateChanging event of the DockingManager? I have a form which has a panel that is docked to a DockingManager control. At design time, I've configured it to dock on the left side. I do not want the users to be able to dock it any other place on the form. Thus, if I can cancel the DockStateChanging event, I can ensure that the DockingState will never change. Any ideas on how to cancel the event? If not, any alternative ways in which I can approach this problem? Arif.

1 Reply

PS Prakash S Syncfusion Team July 18, 2002 12:54 PM UTC

Arif, The DockStateChanging and DockStateChanged are just notification events and do not allow you to cancel the operation. To interrupt dock operations, you will have to provide a handler for the DockingManager.DockAllow event and based on the DockAllowEventArgs parameter, either allow or cancel the event. The DockAllow event will only enable you customize dock/dock-in-float operations. The controls will still be free to float as a unique floating window. Handling this event is demonstrated in the DockingWindows\SDIDemo sample. Prakash Syncfusion, Inc.

Live Chat Icon For mobile
Up arrow icon