Get Link Label

I have a data template for link as follows


<DataTemplate x:Key="{x:Static local:Constants.ASSIGNMENTLINK}">
    <go:LinkPanel go:Part.SelectionElementName="Path">
        <go:Link.Route>
            <local:MainRoute Routing="{Binding Path=Data.Routing}" Curve="JumpOver" Adjusting="End" Corner="1" />
        </go:Link.Route>
        <go:LinkShape x:Name="Path" StrokeThickness="{x:Static local:Preferences.ASSIGNMENT_THICKNESS}" />
<span style="white-space: pre;">  </span>      <strong><TextBlock Text="{Binding Path=Data.Number}" go:LinkPanel.Offset="0 10" go:LinkPanel.Orientation="Upright"
                   TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" /></strong>
    </go:LinkPanel>
</DataTemplate>

I want to iterate through all the links in the diagram and get to the textblock info (text, size, location etc. ) for each TextBlock in each link so that I can export the whole diagram to an external CAD system

I can iterate through each link using digram.links collection but I do not know how to find the textblock inside the link, I tried LinkPanel.Children etc. but no use.

Can someone please suggest how I can get to TextBlock info programatically?

Give the TextBlock an x:Name in the DataTemplate, and then use Part.FindNamedDescendant.

Use Part.GetElementPoint to get its position.

Thanks Walter.

One more thing.

I have set the LinkPanel.Orientation of TextBlock to be Upright which means that it could be rotated vertically or it could be Horizontal depending on the midpoint angle of its link.

Is there a way to find whether Textblock is in Vertical or Horizontal direction?