nested docksite event bubbling

Docking/MDI for WPF Forum

Posted 15 years ago by Mark Benda
Version: 9.1.0505
I have nested docksites. The outer docksite contains document windows and within the document window there is a docksite that contains toolwindows. When I have a toolwindow event, i.e. window closed or window dragging or dragged, both the inner and outer docksite receive the messages.

Is that the correct intention of the events?

For a workaround I have to ensure that both docksites contain the event handlers that handle the same events and those I don't want to bubble to the outer docksite I call e.handled="true".

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mark,

Yes, the events are intended to bubble up the visual tree. If you have one DockSite inside another DockSite, then any events from the inner DockSite would bubble up to the outer DockSite.

You could verify that the DockSite associated with the window is the same as the one you attached the handler to. You can use DockSite.GetDockSite(DependencyObject), or if you have a DockingWindow (which includes ToolWindow and DocumentWindow) you can use the DockingWindow.DockSite property.

Actipro Software Support

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.