Hi, i have a problem, that when i copy some parts, in my sample 2 nodes and 1 link, then the link does not have the same curve as the original one.
In the following image, you can see, the original top link is a bezier curve, and the copied bottom link suddenly ain’t a bezier curve.
My link template is pretty straight forward:
<DataTemplate x:Key="LinkTemplate">
<go:LinkPanel go:Part.SelectionElementName="Path" go:Part.SelectionAdorned="True"
go:Part.SelectionAdornmentTemplate="{StaticResource LinkSelectionAdornmentTemplate}"
go:Part.Reshapable="True">
<go:Link.Route>
<go:Route Routing="Normal" Curve="Bezier"
FromEndSegmentDirection="RotatedNodeOrthogonal"
ToEndSegmentDirection="RotatedNodeOrthogonal"
RelinkableFrom="True" RelinkableTo="True"
LinkReshapeHandleTemplate="{StaticResource LinkReshapeHandleTemplate}" />
</go:Link.Route>
<!--This is the from-arrow-->
<Path Fill="{Binding Path=Data.BackColor}"
go:LinkPanel.FromArrow="{Binding Path=Data.FromArrow}"
go:LinkPanel.FromArrowScale="{Binding Path=Data.FromArrowScale}" />
<!--This is transparent thicker shape for easier selection-->
<go:LinkShape Stroke="Transparent" StrokeThickness="5" />
<!--This is the actual from-to path-->
<go:LinkShape x:Name="Path"
Stroke="{Binding Path=Data.BackColor}"
StrokeDashArray="{Binding Path=Data.DashArray}"
StrokeThickness="{Binding Path=Data.Thickness}" />
<!--This is the to-arrow-->
<Path Fill="{Binding Path=Data.BackColor}"
go:LinkPanel.ToArrow="{Binding Path=Data.ToArrow}"
go:LinkPanel.ToArrowScale="{Binding Path=Data.ToArrowScale}" />
<!--This is the from-text-->
<TextBlock Text="From" go:LinkPanel.Index="0"
go:LinkPanel.Offset="NaN NaN"
go:LinkPanel.Orientation="Upright" />
<!--This is the mid-text-->
<TextBlock Text="Mid"
go:LinkPanel.Offset="0 NaN"
go:LinkPanel.Orientation="Upright" />
<!--This is the to-text-->
<TextBlock Text="To" go:LinkPanel.Index="-1"
go:LinkPanel.Offset="NaN NaN"
go:LinkPanel.Orientation="Upright" />
</go:LinkPanel>
</DataTemplate>
If i drag and drop a new link, then the curve is good, just when i copy a link, i ran into this behavior?
Any idea why this is happening? - Or solution of how i could solve this?
I also tried, to add a “Curve” property to my link data. and bind it within the template, same result. - Copied link curves are never Bezier.