Layout is not kept when load layout data with CanKeepExistingDocumentWindowsOpen=true

Docking/MDI for WPF Forum

Posted 1 year ago by Yuki
Version: 23.1.3
Avatar

Hello,

Our applicatioin is using serialize/deserialize function.

Some document windows are "CanSerialize = false".

But I'd like to keep its document window when load layout. (I'm using DockSiteLayoutSerializer.CanKeepExistingDocumentWindowsOpen = true)

--> Is it possible?

I will send sample project later.

Best regards,

Comments (2)

Answer - Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you for the sample project.  In the sample, you are setting DockSiteLayoutSerializer.SerializationBehavior = DockSiteSerializationBehavior.All, which effectively clears the MDI area's layout.  The CanKeepExistingDocumentWindowsOpen option will ensure the documents that were open prior to layout load do remain open after layout load, but they have to fit within the new MDI area.  Since you marked the document windows themselves to not serialize, and no other document windows have layout information serialized, no tabbed MDI containers are created during layout load.  The non-serialized document windows end up opening in a new default tabbed MDI container following the layout load since the tabbed MDI host is empty at the time they reopen.

If you change the setting to DockSiteSerializationBehavior.ToolWindowsOnly, then it works how you want since that setting will not alter the MDI area.


Actipro Software Support

Posted 1 year ago by Yuki
Avatar

Hello,

Thank you for your reply.

I understood that document window layout is not remained when DockSiteLayoutSerializer.SerializationBehavior is DockSiteSerializationBehavior.All.

The latest build of this product (v24.1.3) 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.