Is there a way to prevent users resizing a pane manually, ie so it will continually size to content?
Or a way to re-assert this setting programatically, once the pane has been sized manually?
Thanks
By default a SplitPane will sized based on the size needed by the contents since its Width/Height if left at its default value of double.Nan. Once the splitter bar has been used to resize the pane, the Width (for split panes docked left/rigth) and Height (for those docked top/bottom) is set based on the position at which the splitter is released. To reset the split pane to be sized to content you would need to set its Width/Height back to double.Nan.
Currently there is no way to prevent the SplitPane from having a splitter bar or to keep that splitter bar from being ui interactive. You should submit a suggestion for adding this functionality but I would recommend including as much detail about the functionality you require. The splitpane can contain more than one ContentPane and panes can be dragged into/out of the SplitPane so it would be best if you included details about how you want to use it to provide the context for which such a feature might be implemented.
I tried using an event like this:
{
}
Where 'editSplitPane' is the splitpane containing the contentpane. I wanted to reset 'size to content' every time the pane is pinned or unpinnded. However it doesn't work.
Help!
PS. Just messing around with Snoop - could I style the PreviewMouseDown event on UnpinnedTabFlyoutSplitter to kill the resize event?
I did:
<Style TargetType="igDock:UnpinnedTabFlyoutSplitter"> <EventSetter Event="PreviewMouseDown" Handler="PaneResize" /> </Style> <Style TargetType="igDock:DockedPaneSplitter"> <EventSetter Event="PreviewMouseDown" Handler="PaneResize" /> </Style>
With PaneResize just doing e.Handled = true to squash the event.
It does the job, but there is still some weirdness when a self-sizing grid goes from unpinned, to pinned, to unpinned again.
I wonder if i can put the self-sizing grid in some kind of scrollable container? Hence the dock pane can happily fix the size when required, but my grid can also self-determine its size?
The code you listed would prevent all unpinned/dockarea splitter resizing. I was going on the assumption that you have some panes that can be resized. With regards to going from unpinned to pinned, I believe there was another post previously about this where I mentioned that we follow VS and snapshot the size of the pane when it is unpinned and use that as the flyout size which is what VS does but that we would change this in a subsequent hotfix to let the flyout autosize (at least initially until it is resized with the splitter) if the containing splitpane pane has not been sized.
With regards to a scrollable container, yes, you can put your content into a ScrollViewer.
Hi Andrew,
Thanks for the help. I've gone to using ScrollViewers around my grid - which seems to nicely decouple the self-sizing grids from the (possibly) fixed size dock panes. It seems a reasonable compromise!
Thanks again for the assistance,