Close context menu on ToolWindow closes DocumentWindow

Docking/MDI for WPF Forum

Posted 15 years ago by Jeff Key
Version: 4.5.0486

Here's my setup:

I have a window that contains a TabbedMidiHost, to which DocumentWindows are added at runtime:

    <docking:TabbedMdiHost />
Each DocumentWindow contains a UserControl like the following:

    <ToolBar />
        <docking:Workspace />
        <docking:ToolWindowContainer />
The problem is that the ToolWindows in the ToolWindowContainer ALWAYS contain a Close context menu item. I've turned off the following:

- DockSite.CanToolWindowsClose
- DockSite.ToolWindowsHaveOptions
- ToolWindow.CanClose
- ToolWindow.HasOptions

..and the Close menu item is still there.

This is a problem because clicking the Close menu item (on the ToolWindow context menu) closes the entire document window.

I've found that the only setting that influences this Close menu item is DocumentWindow.CanClose, which disables it if set to false. Unfortunately, this is undesirable, as the user needs to close the document window.

Here's my question: Is this expected behavior? If so, how do I remove the DocumentWindow's Close menu item from the ToolWindows' context menu?


Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Jeff,

It sounds like that could be a minor bug. We're planning on getting a maintenance release out shortly so if you can create a simple project that repros the issue and email it over, we'll take a look and maybe get a fix out soon. Thanks!

Actipro Software Support

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Jeff,

Thanks for the repro. We found the problem and have it fixed for the next maintenance release.

Actipro Software Support

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.