AvalonDock 2.0 increases capture size
Is there a way to increase the capture size (or gridsplitter
) in AvalonDock 2.0 ? I find it difficult to resize the docks as I have to position the cursor at the exact pixel where the dock (or dock) border is.
EDIT: I would also like to keep the visual size as it is now, but make it easier to resize the panels.
Thanks in advance!
+3
source to share
2 answers
For those who stumbled upon this question like me.
IamJose's answer didn't work for me. However, as Filippo Vigani pointed out, you need to set a negative margin (why? Who knows!).
I need a grid divider width of 5. And this worked for me:
<avalonDock:DockingManager
AnchorablesSource="{Binding Tools}"
DocumentsSource="{Binding Documents}"
AllowMixedOrientation="True"
GridSplitterWidth="10"
GridSplitterHeight="10">
<avalonDock:DockingManager.Theme>
<avalonDock:MetroTheme />
</avalonDock:DockingManager.Theme>
<avalonDock:DockingManager.LayoutUpdateStrategy>
<helpers:LayoutUpdateStrategy />
</avalonDock:DockingManager.LayoutUpdateStrategy>
<!--<avalonDock:DockingManager.LayoutItemContainerStyle>
<Style TargetType="{x:Type avalonDock:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}" />
</Style>
</avalonDock:DockingManager.LayoutItemContainerStyle>-->
<avalonDock:DockingManager.LayoutItemContainerStyleSelector>
<helpers:AutobinderLayoutSelector>
<helpers:AutobinderLayoutSelector.DocumentStyle>
<Style TargetType="{x:Type avalonDock:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}" />
<Setter Property="Margin" Value="-5" />
</Style>
</helpers:AutobinderLayoutSelector.DocumentStyle>
<helpers:AutobinderLayoutSelector.ToolStyle>
<Style TargetType="{x:Type avalonDock:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}" />
<Setter Property="Margin" Value="-5" />
<!--<Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter={x:Static Visibility.Hidden}}"/>
<Setter Property="ContentId" Value="{Binding Model.ContentId}"/>
<Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/>-->
</Style>
...
So, -5 negative margin on documents / tools and grid divider width and height 10.
0
source to share