rwdial
April 2, 2012, 4:49pm
1
I am trying to change the relinking adornment, but am running into trouble positioning the new handle.
I have this for my adornment template:
<DataTemplate x:Key="ReLinkToHandleTemplate">
<go:ToolHandle go:NodePanel.Figure="Ellipse" Width="8" Height="8" Fill="Green" Stroke="Black" StrokeThickness="1"
go:LinkPanel.Alignment="MiddleRight" go:LinkPanel.Orientation="Along" go:LinkPanel.Index="-1" />
</DataTemplate>
and in my Link.Route template I have RelinkToAdornmentTemplate="{StaticResource ReLinkToHandleTemplate}"
I’m sure this is something simple, but for whatever reason I can’t get it positioned properly.
Thanks
Ryan
walter
April 2, 2012, 5:19pm
2
Try wrapping it with a go:LinkPanel , so that that panel can arrange its (single) element properly.
rwdial
April 2, 2012, 5:46pm
3
My templates are now:
<DataTemplate x:Key="ReLinkToHandleTemplate">
<go:LinkPanel>
<go:ToolHandle go:NodePanel.Figure="Ellipse" Width="8" Height="8" Fill="Green" Stroke="Black" StrokeThickness="1"
Cursor="Hand" go:LinkPanel.Alignment="MiddleRight" go:LinkPanel.Orientation="Along" go:LinkPanel.Index="-1" />
</go:LinkPanel>
</DataTemplate>
<DataTemplate x:Key="ReLinkFromHandleTemplate">
<go:LinkPanel>
<go:ToolHandle go:NodePanel.Figure="Ellipse" Width="8" Height="8" Fill="Pink" Stroke="Black" StrokeThickness="1"
Cursor="Hand" go:LinkPanel.Alignment="MiddleLeft" go:LinkPanel.Orientation="Along" go:LinkPanel.Index="-1" />
</go:LinkPanel>
</DataTemplate>
Which looks like this:
So the From handle is showing up where the To handle should be, and the To handle is on top of the arrowhead… what else am I missing?
Thanks
walter
April 2, 2012, 7:31pm
4
You set the Index for both to -1, so they are both supposed to be at the “to” end.
rwdial
April 3, 2012, 11:23am
5
I’ve now got them both on the right end, but the To end is still over top of the arrowhead instead of at the end like it was by default… It looks like this:
How do I move it off of the arrow?
Thanks
walter
April 3, 2012, 11:56am
6
Try different Alignment Spots – I thought you had gotten what you wanted before with the “Pink” handle that was aligned Spot.MiddleLeft.