Custom Relink Adornment Template

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

Try wrapping it with a go:LinkPanel, so that that panel can arrange its (single) element properly.

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

You set the Index for both to -1, so they are both supposed to be at the “to” end.

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

Try different Alignment Spots – I thought you had gotten what you wanted before with the “Pink” handle that was aligned Spot.MiddleLeft.