Hey guys!
I have the following strunctire:
PaneToolWindow -> SplitPane -> ContentPane.
How can I disable ability to close window? Setting AllowClose to false doesn't help because I still can close it via close button in Start Task Bar.
I also tried to set e.Cancel to true for Closing event but in this case after docking the window I am getting extra pane tool window (as it was not closed due to setting e.Cancel flag to true).
Hello Maksim,Thank you for contacting Infragistics Developer Support.
The close button existing on the PaneToolWindows that are used for the floating panes in the XamDockManager are not affected by the close-related properties on the panes. This is because by default, the XamDockManager uses a WPF Window with its WindowStyle property set to ToolWindow to wrap the floating panes. So, this close button is essentially the same as the one that exists in your typical WPF window, in other words.
To remove this close button, I would recommend handling the ToolWindowLoaded event of the XamDockManager. This event will allow you to retrieve the PaneToolWindow as it loads via the e.Window property of the event arguments. From here, you can set the PaneToolWindow’s UseOsNonClientArea property to “false,” which will cause the window provide the chrome for the window itself, rather than using its built-in template to display the window chrome that includes the close button. This will essentially hide the close button, and prevent closure of the PaneToolWindow.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer