I want that my link starts and ends in the center of my nodes. So I looked at the Link Demo and I simply tried Node.ToSpot=Center and Node.FromSpot=Center but it makes no effects.
The node here is the rectangle and I want that my like ending by orange circle starts and ends in the center of the red rectangle. I don’t if it can be an issue but the Red Node is a LabelNode the horizontal link…
Node Template:
<go:NodeShape go:NodePanel.Figure="Rectangle" Fill="Red" Width="50" Height="15"
go:Node.LinkableSelfNode="False" go:Node.LinkableMaximum="1"
Stroke="Transparent"
StrokeThickness="1"
go:Node.PortId="">
<go:Node.LinkableFrom>
<MultiBinding Mode="TwoWay">
<MultiBinding.Converter>
<local:IsExchangerLinkableConverter />
</MultiBinding.Converter>
<Binding Path="Node.Diagram.AddingTool.CanAddItem" />
<Binding Path="Node.Diagram.AddingTool.ItemType" />
</MultiBinding>
</go:Node.LinkableFrom>
<go:Node.LinkableTo>
<MultiBinding Mode="TwoWay">
<MultiBinding.Converter>
<local:IsExchangerLinkableConverter />
</MultiBinding.Converter>
<Binding Path="Node.Diagram.AddingTool.CanAddItem" />
<Binding Path="Node.Diagram.AddingTool.ItemType" />
</MultiBinding>
</go:Node.LinkableTo>
<go:NodeShape.Cursor>
<MultiBinding Mode="TwoWay">
<MultiBinding.Converter>
<local:ExchangerNodeCursorConverter />
</MultiBinding.Converter>
<Binding Path="Node.Diagram.AddingTool.CanAddItem" />
<Binding Path="Node.Diagram.AddingTool.ItemType" />
</MultiBinding>
</go:NodeShape.Cursor>
</go:NodeShape>
</go:NodePanel>
</DataTemplate>
Link Template:
<go:Link.Route>
<go:Route Routing="Normal" Curve="JumpGap" MouseLeftButtonDown="OnExchangerDoubleClick"
RelinkableFrom="True" RelinkableTo="True"
FromEndSegmentDirection="RotatedNodeOrthogonal"
ToEndSegmentDirection="RotatedNodeOrthogonal"
LinkReshapeHandleTemplate="{StaticResource LinkReshapableHandleTemplate}" />
</go:Link.Route>
<go:LinkShape Stroke="Transparent" StrokeThickness="10" />
<go:LinkShape x:Name="Path"
StrokeThickness="{Binding Path=Data.Highlight, Converter={StaticResource theStrokeThicknessConverter}}"
Stroke="{Binding Path=Data.Highlight, Converter={StaticResource theStrokeColorConverter}}" />
<Path Fill="Orange" go:LinkPanel.FromArrow="Circle" go:LinkPanel.FromArrowScale="1" />
<Path Fill="Orange" go:LinkPanel.ToArrow="Circle" go:LinkPanel.ToArrowScale="1" />
<TextBlock Text="{Binding Data.Data.Name,Mode=TwoWay}"
TextWrapping="Wrap"
Margin="2,0,0,0"
go:LinkPanel.Offset="0 NaN" go:LinkPanel.Orientation="Upright45"
go:Part.TextEditable="True"/>
</go:LinkPanel>
</DataTemplate>