Deserialized layout has empty TabbedMdiContainer

Docking/MDI for WPF Forum

Posted 3 years ago by Andrew Hanlon
Version: 16.1.0630
Avatar

When deserializing a lazy-loaded layout that had been saved with open documents, but where there are currently no open document windows, an empty TabbedMdiContainer is shown, which is not visually appealing / a good UX.

This behaviour can be quickly mocked-up in the serialization sample by setting the xaml to look like:

...
<docking:Workspace>
    <docking:TabbedMdiHost/>
</docking:Workspace>
...

- Then adding code to programmatically add a DocumentWindow to the docksite from one of the ToolWindow commands.

- Set the DockSite to Serialize DocumentWindows, and use either the discard or lazy-load modes.

- Save the layout and switch between samples.

 

Is there a proper way to prevent this behaviour?

 

My current workaround is that in the TabbedMdiContainer Style, I added a Trigger to change the Visibility to Hidden when the SelectedWindow is null (I believe only possible when no documents are open).

 

Thanks

Comments (2)

Posted 3 years ago by Andrew Hanlon
Avatar

I checked the previous version's XAML and can see that there is a trigger on the 'HasWindows' property to hide the container. Seems this functionailty is missing form the new version.

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

Hi Andrew,

Thanks for reporting this.  We've got it fixed now for the next maintenance release.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) 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.