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?
PSPrakash S Syncfusion Team July 18, 2002 07:54 AM
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.