Is there a way to totally disable docking in the latest release or in upcoming releases? We want to allow docking only for certain users.
If not is there a way by which I could achieve the same.
Thanks.
Works fine. Thanks for good tip.
You could create a Style for the various splitter types (i.e. SplitPaneSplitter for the splitter bar within a split pane that resizes the children, DockedPaneSplitter for the splitter bar used to resize the docked root SplitPanes, and UnpinnedTabFlyoutSplitter for the splitter bar within the unpinned flyout that resizes the flyout) and set the IsEnabled to false. e.g.
Note, if you have floating panes you would need to hook the ToolWindowLoaded and add these styles to the resources of the ToolWindow as well so it affects the floating panes.
And is there any simple trick for preventing resizing/moving SplitPanes, so the current layout is Fixed and cannot be changed in any way?
I've seen this request a couple of times before but it seems like each person has a different concept of what that would mean - i.e. does it prevent docking, does it prevent pinning/unpinning, does it prevent resizing of splitters (all or just some - e.g. resizing the unpinned flyout would be ok), can the user still float something explicitly through the commands (e.g. context menu), etc. So currently there is no property to lock the layout per se.
If you just want to disable docking completely then you could use the GetPanes method to enumerate the ContentPanes and set their AllowDocking property to false (or create your own attached property and bind the AllowDocking to that as you create each ContentPane). If you just wanted to disable dragging but still allow the user to toggle the state from floating to docked, you could instead try handling the PaneDragStarting and setting e.Cancel to true.