Binding inside a DataTemplate

Perhaps it is me who is not yet a beast in WPF, but I have diffculty to bind something inside a DataTemplate to a DependencyProperty on my UserControl.

I tried to use the RelativeSource (see the code below) to back up to the UserControl but without success.
*Note: Network is a property of NetworkGrid.

            <go:LinkPanel go:Part.SelectionElementName="Path" go:Part.SelectionAdorned="True" Visibility="Visible"
                      go:Part.SelectionAdornmentTemplate="{StaticResource LinkSelectionAdornmentTemplate}"

                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Name=" />
                        <TextBlock Text="{Binding Path=Data.Data.Name}" FontWeight="Bold" />
                        <TextBlock Text="      From=" />
                        <TextBlock Text="{Binding Path=Data.From}" />
                        <TextBlock Text="  To=" />
                        <TextBlock Text="{Binding Path=Data.To}" />
                    <go:Route Routing="Orthogonal" Curve="JumpGap"  
                          RelinkableFrom="True" RelinkableTo="True" 
                          LinkReshapeHandleTemplate="{StaticResource LinkReshapableHandleTemplate}" />
                <go:LinkShape Stroke="Transparent" StrokeThickness="5" />
                <go:LinkShape x:Name="Path" StrokeThickness="{Binding Path=Data.Highlight, Converter={StaticResource theStrokeThicknessConverter}}">
                        <MultiBinding Mode="OneWay"  UpdateSourceTrigger="PropertyChanged"  >

                            <Binding Path="Data.Data"/>
                           <b> <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type local:NetworkGrid}}" Path="Network" /></b>

Try setting Diagram.PartManager.AddsToLogicalTree to true. (This is for WPF only, obviously.)

euhhh…I don’t see AddsToLogicalTree anywhere…

Oops – that’s a new feature in version 1.3. Sorry about my confusion there.

Maybe you could set Diagram.Tag to refer to the desired data (“Network?”), and then data-bind the property in the link to “{Binding Path=Link.Diagram.Tag}”. Or something like that.

Thank, it works!!