I would like to be able to completely "freeze" the layout of the panes contained within xamDockManager. The idea is to have a setup mode, in which the user can arrange and resize the panes, and then an operating mode in which the pane sizes and layout are locked down.
I can accomplish most of what I want using the existing ContentPanel properties, however there are two problems I'm struggling with:
Any suggestions for solving either of these problems?
dmackersie said:I cannot consistently prevent panels from being resized. Setting properties such as MinWidth and MaxWidth works in a few cases, but not consistently.
Instead of setting those properties perhaps you can create a Style that targets PaneSplitter with a setter that sets IsHitTestVisible to false. If you're not setting the Theme property you can probably put this into the application's resources so it affects the floating windows. If you're setting the Theme then you'll probably need to put this into the Resources of the xamDockManager as well as the Resources of any PaneToolWindow (i.e. hook the ToolWindowLoaded and have added it into each toolwindow's resources) since the Theme's local style will take precendence otherwise.
dmackersie said:I cannot completely prevent panes from being dragged around and re-docked. For example, if a pane is docked on the left side, I can prevent it from becoming floating or docked on the right side, but I cannot prevent it from being dragged to a new docked location on the left side
You could handle the PaneDragStarting and set Cancel to true if you want to prevent all drag operations. If you want to selectively prevent the operations then you can handle the PaneDragOver but the docking indicators will be shown since we need to show them to find out which one you're over to find out what the resulting drop operation would be in order to raise the event.
Setting the style <Setter Property="IsHitTestVisible" Value="False"/> on target PaneSplitter did not work, however, setting it on the derived classes DockedPaneSplitter, SplitPaneSplitter, and UnpinnedTabFlyoutSplitter DID work.
Handling PaneDragStarting worked perfectly, as described.
Both problems solved - thanks!