Close context menu on ToolWindow closes DocumentWindow

Docking/MDI for WPF Forum

Posted 10 years ago by Jeff Key
Version: 4.5.0486
Avatar
Hello,

Here's my setup:

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

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

<UserControl>
  <Grid>
    <ToolBar />
    <docking:DockSite>
      <docking:SplitContainer>
        <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?

Thanks,
Jeff

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 (v2018.1 build 0675) 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.