Accessing the ContentControl 'Wrapper' when ItemContainerRetentionMode is set to Wrapped

Docking/MDI for WPF Forum

Posted 10 years ago by Andrew Hanlon
Version: 14.2.0610

I am using both the MVVM (binding) scenario and nested DockSites. 

When a window is closing, I need to be able to persist the child DockSite's layout. This requires accessing the child DockSite from the parent WindowClosing event.

How can I access the content control 'wrapper' associated with a DockingWindow when using the 'Wrapped' ItemContainerRetentionMode? 

This is needed in order to find the child DockSite.


[Modified 10 years ago]

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Andrew,

When you are using ItemContainerRetentionMode.Wrapped, a ContentControl will be set to the docking window's Content property.  The Content property of the ContentControl should end up becoming the data item.  Thus you could get the outer docking window's Content (which should be a ContentControl) and walk down its visual tree to get to your nested DockSite.

Actipro Software Support

Posted 10 years ago by Andrew Hanlon

Perfect, that solved it - I had been looking at the content prior to turning on the Wrapped mode, and had dismissed it as empty. Thanks once again for the help. 

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

Add Comment

Please log in to a validated account to post comments.