Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Locking layout
posted

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.

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    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.

Children