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

Docking/MDI for WPF Forum

Posted 5 years ago by Andrew Hanlon
Version: 14.2.0610
Avatar

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.

Thanks.

[Modified 5 years ago]

Comments (2)

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

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 5 years ago by Andrew Hanlon
Avatar

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 (v2019.1 build 0683) 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.