
Hello,
Here's my setup:
I have a window that contains a TabbedMidiHost, to which DocumentWindows are added at runtime:Each DocumentWindow contains a UserControl like the following:
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
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 />
<UserControl>
<Grid>
<ToolBar />
<docking:DockSite>
<docking:SplitContainer>
<docking:Workspace />
<docking:ToolWindowContainer />
- 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