Zindex issue

Hi,
I have two dataTemplates: myPaint and linkTemplateUI.
myPaint contains InkCanvas,
linkTemplateUI is used for connection between nodes and contains link with “(…)” text.
Here are images when myPaint and linkTemplateUI located next to each other (on the left) and when I drag linkTemplateUI to be on top of myPaint:


How I can change z-index so linkTemplateUI. won’t be visible when I drag myPaint over it.
Here are DateTemplates:

<DataTemplate x:Key="myPaint">

<go:NodePanel Name="paintNodePanel"
              go:Part.LayoutId="None"
              go:Node.Location="{Binding Path=Data.LocalLocation, Mode=TwoWay}"
              go:Node.LocationElementName="inkCanvas"
              Sizing="Fixed"
              go:LinkPanel.Orientation="None"
              go:Part.Resizable="True"
              go:Part.SelectionAdorned="True"
              go:Part.Movable="True"
              go:Part.ResizeElementName="paintBorder"
              go:Part.SelectionElementName="paintBorder"
              MouseLeftButtonDown="richEdit_MouseLeftButtonDown"
              IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type go:Diagram}},    Path=DataContext.SelectedItem,Converter={StaticResource VSReadOnlyConverter}}"
              go:Node.ZOrder="1000">

	<Border BorderBrush="Black"
	        BorderThickness="1"
	        x:Name="paintBorder"
	        Width="{Binding      Path=Data.FTVisualGate.GateWidth,Mode=TwoWay}"
	        Height="{Binding Path=Data.FTVisualGate.GateHeight,Mode=TwoWay}">
		<StackPanel x:Name="paintStackPanel"
		            IsEnabled="False"
		            LostFocus="NodePanel_LostFocus">

			<Button Click="PaintButton_Click"
			        FocusManager.FocusedElement="{Binding ElementName=inkCanvas}">
				Clear
			</Button>

			<InkCanvas Name="inkCanvas"
			           Strokes="{Binding Path=Data.FTVisualGate.VisualContent, Mode=TwoWay,Converter={StaticResource customdataconverter}}"
			           Background="White">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="StrokeCollected">
						<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type go:Diagram}},          Path=DataContext.EndPaintingStrokeCommand}"
						                       CommandParameter="{Binding ElementName=inkCanvas}">
						</i:InvokeCommandAction>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</InkCanvas>
		</StackPanel>
	</Border>
</go:NodePanel>
  <DataTemplate x:Key="linkTemplateUI">

<go:LinkPanel    go:Part.SelectionAdorned="True" go:Link.SelectionElementName="{Binding Data.SelectionLinkName,Mode=TwoWay}" >
	<go:Link.Route>
		<go:Route Routing="Orthogonal" FromSpot="BottomCenter" ToSpot="TopCenter"  />
	</go:Link.Route>
	<go:LinkShape x:Name="Path" StrokeThickness="1" Stroke="Black" />
	<!--NodePanel: go:LinkPanel.Offset="-12 -53" first parameter:+down,-up, second:+left, -right -->
	<go:NodePanel Sizing="Auto"  go:LinkPanel.Orientation="None"  go:LinkPanel.Offset="-12 -53"  go:LinkPanel.Index="-1">
		<Grid>
			<!--HorizontalAlignment="Right" VerticalAlignment="Center"-->
			<!--TextBox : Margin="100,10,0,10-->
			<TextBox Width="200"  BorderThickness="0"  x:Name="commentLabel" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="100,10,0,10"  Text="{Binding Data.GateData.LinkComment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"   FontWeight="Bold" IsReadOnly="{Binding Path=Data.ISCommentReadOnly}">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="LostFocus">
						<i:InvokeCommandAction Command="{Binding Path=Data.SaveControl}" CommandParameter="{Binding}">
						</i:InvokeCommandAction>
					</i:EventTrigger>
					<i:EventTrigger EventName="GotFocus">
						<i:InvokeCommandAction    Command="{Binding Path=Data.EnterControl}" CommandParameter="{Binding}" />
					</i:EventTrigger>
					<i:EventTrigger EventName="KeyDown">
						<i:InvokeCommandAction    Command="{Binding Path=Data.EditBegun}" CommandParameter="{Binding}"  />
					</i:EventTrigger>

				</i:Interaction.Triggers>

				<TextBox.InputBindings>
					<KeyBinding Key="Esc" 
               Command="{Binding Path=Data.LeaveControl}" CommandParameter="{Binding}" 
               />
				</TextBox.InputBindings>
				<TextBox.Style>
					<Style TargetType="TextBox">
						<Style.Triggers>
							<DataTrigger Binding="{Binding IsKeyboardFocused, RelativeSource={RelativeSource Self}}" Value="false">
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate TargetType="TextBox">
											<TextBlock  FontWeight="Bold" Text="{TemplateBinding Text}" Width="150"  Margin="4,10,0,10" TextTrimming="CharacterEllipsis" HorizontalAlignment="Left"  VerticalAlignment="Top">
											</TextBlock>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</DataTrigger>
						</Style.Triggers>
					</Style>
				</TextBox.Style>
			</TextBox>
			<TextBlock IsHitTestVisible="False" HorizontalAlignment="Left"  Margin="100,0,0,0" VerticalAlignment="Center" Text="(...)"    Foreground="DarkGray">
				<TextBlock.Style>
					<Style TargetType="{x:Type TextBlock}">
						<Setter Property="Visibility" Value="Collapsed"/>
						<Style.Triggers>
							<DataTrigger Binding="{Binding Text, ElementName=commentLabel}" Value="">
								<Setter Property="Visibility" Value="Visible"/>
							</DataTrigger>
						</Style.Triggers>
					</Style>
				</TextBlock.Style>
			</TextBlock>

		</Grid>
	</go:NodePanel>

</go:LinkPanel>


  </DataTemplate>

You could set go:Part.LayerName="Foreground". If you are already using the “Foreground” LinkLayer for other reasons, you could add a LinkLayer at the desired ordering position.

Thanks, this worked for me