Link Route

Hi,

I defined a link template specifically for my root node. Also I defined FromSpot to some coordinates in my Root Node template. Now when I execute my code the Link Template that comes out has some curves. here id the screen shot.

Here is the link template code that I defined:

<DataTemplate x:Key="RootLinkTemplate">
    <Path go:LinkPanel.IsLinkShape="True" Stroke="Black" StrokeThickness="1" go:Link.SelectionAdorned="False">
        <go:Link.Route>
            <go:Route Routing="Orthogonal" Corner="3" />
        </go:Link.Route>
    </Path>
</DataTemplate>
I want it to come as a straight vertical line like it comes in other nodes when we set FromSpot to MiddleBottom. Please suggest me something.

Thanks.

How did you define the port(s) on the root node?

Did you set any port spots on the TreeLayout?

This what I have written in my TreeLayout:

<golayout:TreeLayout x:Name="myTreeLayout" ConditionFlags="NodeAdded LinkAdded" TreeStyle="LastParents" Angle="90" LayerSpacing="35" AlternateAngle="0" AlternateAlignment="Start"
                     AlternateNodeIndent="10" AlternateNodeIndentPastParent="1.0" AlternateNodeSpacing="20" AlternateLayerSpacing="30" AlternateLayerSpacingParentOverlap="1.0"
                     AlternatePortSpot="0 1 20 0" AlternateChildPortSpot="MiddleLeft" SetsPortSpot="False">
</golayout:TreeLayout>

I suspect that specifying a Spot of “0 1 …” causes the link to connect at the 45-degree angle.
Try a slightly different value, like “0.01 1 …”.
I’m sorry that I can’t check the code at the moment to confirm this suspicion.