Hello,
I want to create a different resizing template, with ellipses instead of rectangles and different colours. I came so far to define the template and display it on the node but as there are no examples on how to get it to work, I’m unable to find out how to get the actual resizing functionality in it.
This is what I have:
<Style x:Key="ResizeAnchorStyle"
TargetType="Ellipse">
<Setter Property="Stroke" Value="Green" />
<Setter Property="Fill" Value="#80008000" />
<Setter Property="Width" Value="7" />
<Setter Property="Height" Value="7" />
<Setter Property="StrokeThickness" Value="1" />
</Style>
<DataTemplate x:Key="ResizeAdornmentTemplate">
<go:SpotPanel>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="TopLeft"
Cursor="SizeNWSE"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="MiddleTop"
Cursor="SizeNS"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="TopRight"
Cursor="SizeNESW"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="MiddleLeft"
Cursor="SizeWE"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="MiddleRight"
Cursor="SizeWE"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="BottomLeft"
Cursor="SizeNESW"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="MiddleBottom"
Cursor="SizeNS"/>
<Ellipse Style="{StaticResource ResizeAnchorStyle}"
go:SpotPanel.Spot="BottomRight"
Cursor="SizeNWSE"/>
</go:SpotPanel>
</DataTemplate>
But of course no resizing happens when I try to click+drag one of the anchor points, only the standard dragselect.