Adding document windows, re-add fail.

Docking/MDI for WPF Forum

Posted 14 years ago by horhalau
Version: 9.2.0507
I have this :

<docking:DockSite Name="dockSite">
        <docking:TabbedMdiContainer Name="TabbedMDIC" >

//Adding a new document window
DocumentWindow docuWindow = new DocumentWindow(dockSite1);
When I add a document window, it works, but when i close all open document windows and re-add another, Activate() throws "This operation is invalid since the DockingWindow has not yet been registered with a DockSite."

I've checked some solutions in other similar threads but none worked.

What would be the issue ?

Thank you

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Note that DocumentWindows will by default "destroy" themselves when closed. Destroy means that they remove their DockSite affiliation. If you want to be reusing DocumentWindow instances after they are closed (more like ToolWindows), then you need to set DockSite.AreDocumentWindowsDestroyedOnClose to false.

Alternatively you can call dockSite.DocumentWindows.Add(yourDocumentWindow) before calling Activate(). That will re-register it.

Actipro Software Support

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.