Link selection hides additional controls on LinkPanel

Hi,

I’ve defined such a link datatemplate:

<DataTemplate x:Key="Bool" DataType="{x:Type go:Part}">

            <go:LinkPanel go:Part.SelectionElementName="Path" go:Part.SelectionAdorned="True" go:Part.Reshapable="True"
                         go:Part.SelectionAdornmentTemplate="{StaticResource LinkSelectionAdornmentTemplate}" DataContext="{Binding Path=Data}">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <command:EventToCommand PassEventArgsToCommand="True" Command="{Binding Path=MouseButtonDownCommand}"></command:EventToCommand>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <go:Link.Route>
                    <go:Route Routing="AvoidsNodes" Curve="JumpOver" RelinkableFrom="True" RelinkableTo="True" Corner="4" />
                </go:Link.Route>
                <go:LinkShape Stroke="#e7e8ea" StrokeThickness="5" />

                <go:LinkShape x:Name="Path" StrokeThickness="3">
                    <go:LinkShape.Style>
                        <Style TargetType="{x:Type go:LinkShape}">
                            <Setter Property="Stroke" Value="Black" x:Uid="ML_0052"></Setter>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Path=(logicConfig:ConfigLinkDiagramModel.IsValidLogicController)}" Value="False" x:Uid="ML_0053">
                                    <Setter Property="Opacity" Value=".3" x:Uid="ML_0054" />
                                    <Setter Property="StrokeDashArray" Value="1 10" x:Uid="ML_0055" />
                                    <Setter Property="Stroke" Value="Red" x:Uid="ML_0056"></Setter>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </go:LinkShape.Style>
                </go:LinkShape>
                <go:LinkShape Stroke="Transparent" IsHitTestVisible="True" StrokeThickness="30" />

                <documents:ConversionControl go:LinkPanel.Alignment="1 1" go:LinkPanel.Index="-1" go:LinkPanel.Orientation="Along"
                       Visibility="{Binding Path=(logicConfig:ConfigLinkDiagramModel.HasConversion),
                                       Converter={StaticResource VisibilityConverter}}">
                </documents:ConversionControl>
                <StackPanel Background="Transparent" x:Name="VisualItem">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="22" />
                            <RowDefinition Height="12" />
                        </Grid.RowDefinitions>
                        <c1:C1NumericBox Grid.Row="0" Style="{StaticResource C1NumericBoxLogicPrioritySetter}" Value="{Binding Path=(logicConfig:ConfigLinkDiagramModel.Priority),Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Minimum="1"
                                         Maximum="{Binding Path=(logicConfig:ConfigLinkDiagramModel.MaxPriority), Mode=TwoWay}" Width="49" />
                        <Border Grid.Row="1" BorderBrush="{StaticResource PropertyGridForeground}" BorderThickness="1,0,1,1" Width="34" Height="12" HorizontalAlignment="Left" Background="White" VerticalAlignment="Top">
                            <TextBlock LineStackingStrategy="BlockLineHeight" LineHeight="11" FontSize="11" Foreground="{StaticResource PropertyGridForeground}" Text="[Bool]" TextAlignment="Center" x:Uid="ML_0065" />
                        </Border>
                    </Grid>
                </StackPanel>
            </go:LinkPanel>
        </DataTemplate>

and also an LinkSelectionAdornmentTemplate:

 <DataTemplate x:Key="LinkSelectionAdornmentTemplate">
        <go:SelectionHandle go:NodePanel.Figure="None" Stroke="DarkSalmon"  StrokeThickness="4" go:Part.Selectable="False" />
  </DataTemplate>

After selecting our link in the diagram, I would like our element with name “VisualItem” to be visible above the adorner, not below it. How to achive that?

Best regards.

By “above” do you mean in front of, or do you mean at smaller Y position?

In front of.

It might be easiest not to use a selection Adornment at all for Links – don’t set SelectionAdorned to true. Instead change the color of one of your LinkShapes when the Link is selected.