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

DockingManager RoutedEvent

Hi,
The DockingManager doesn`t eem to have any RoutedEvents on it in particular the DockStateChanged event as it would be good if child elements could handle any necessary cleanup on closing.
Is this by design?Whats the best alterntive for DockingManager children to handle cleanup on being Hidden?

Thanks
Darran


3 Replies

YA Yasvanth Syncfusion Team December 15, 2011 08:45 AM UTC

Hi Darran

We have created a sample to illustrate "DockStateChanged Event in DockingManager”.When the Dock state is Changed to Hidden that particular child is removed from the DockingManager and this operation is done in DockStateChanged event. You can download the attached sample

Please let us know if our sample satisfied your requirement and revert us in case of any queries.

Regards,

Yasvanth.




DockingManager_Sample_WPF_163d0749.zip


DW Darran White December 15, 2011 02:14 PM UTC

Hi,
Thanks for the example what I menat was it would be good if the child element in the docking manager could listen to an event to know it is being closed such as via a RoutedEvent. Then it would be able to do any cleanup before its closed. So in our case to cleanly close down we should tell the server the particular child is closing.

We`re using prism so I`m using the EventAggregator to publish an event which the child listens to, to know it should close so its not the end of the world I just thought a RoutedEvent would be a cleaner way of accomplishing the task.

regards

Darran



SN Surya Narayanan G Syncfusion Team December 27, 2011 01:28 PM UTC

Hi Darran,

Thanks for the patience.

We have created a sample to illustrate DockstateChanging Event in DockingManager using Prism which you can download under the following location.
In this sample, DockingManager has a DockstateChanging Event which fires before the Dockstate is changed. Using this Handler we can perform the cleaning up operation before the state is being changed. After this handler, DockStateChanged Event will be fired and here we can remove the complete element or region.

Please let me know if the sample helps.

Regards
Surya Narayana




CS_91972e44.zip

Loader.
Live Chat Icon For mobile
Up arrow icon