TabbedMdiHost closed when last document is closed?

Docking/MDI for WPF Forum

Posted 16 years ago by dmelinosky
Hi there,

I set up my DockSite in my main window like this

         <!-- DockSite, the contents of the window are used of dockable Toolwindows and Documents -->
        <docking:DockSite x:Name ="dockSite" regions:RegionManager.RegionName="DockRegion">
                    <docking:TabbedMdiHost x:Name="tabbedMdiHost">
Then i programmatically add document windows like this:

                DocumentWindow window = new DocumentWindow(this.WrappedSite, windowName, windowTitle, imageSource, view);

This all works great until I close the last window. When I close the last window, it seems the Mdi containers also close and if i try to add another window, I get an exception saying:

DockSite must contain at least one MdiRootContainer element to open a new DocumentWindow.

Is there anyway to prevent this behavior? If not, where should I start looking to catch an event to recreate a MdiRootContainer?

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Thanks, that's a known issue. I've made a quick temporary fix for it so that it won't throw the exception. This fix will be in the next build.

We still need to complete an overhaul of the MDI processing code to be a bit more generic too.

Actipro Software Support

Posted 16 years ago by dmelinosky
Ok, thanks. I was able to duplicate it in the sample browser so I figured it must be a known issue.
The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.