Context menu on link

Hi,
I put a context menu on Link. It works well when right click on the link but when I select it my context menu doesn’t work. The SelectionAdornated blocks the mouse event. How can I do to fix this issue?
Thanks

Did you implement it as a normal WPF ContextMenu? I don’t see how the node’s selection Adornment could be in front of the ContextMenu.

I implemented my context menu with go:LinkPanel.ContextMenu inside go:DataTemplateDictionary x:Key=“LinkTemplates”

I don’t know what the problem is and can’t guess.

You don’t have this problem in any of the other samples that use ContextMenus, do you? How is your code different from those samples?

I viewed the GoWpf Basic example. I compared with our code and the difference Is that we can modify the direction of our link. Contrariwise, in your example, it can only move the nodes and not the links.
In our code, we overrided the UpdateAdornment method in LinkResharping class (see below).

How I can add right click context menu event (on the link) when I have already the link move behaviour?

public override void UpdateAdornments(Part part)
{
// …

                        var a = route.GetPoint(i);
                        var b = route.GetPoint(i + 1);
                        if (IsApprox(a, b))
                            continue;

                        FrameworkElement toolHandle;

                        // now the handle at the middle of each segment:
                        if (IsApprox(a.X, b.X))
                        {
                            toolHandle = new ToolHandle
                            {
                                Width = 5,
                                Height = Math.Abs(a.Y - b.Y),
                                Fill = Brushes.Transparent,
                                Stroke = Brushes.Transparent,
                                StrokeThickness = 1
                            };
                        }
                        else
                        {
                            toolHandle = new ToolHandle
                            {
                                Width = Math.Abs(a.X - b.X),
                                Height = 5,
                                Fill = Brushes.Transparent,
                                Stroke = Brushes.Transparent,
                                StrokeThickness = 1
                            };
                        }

                   // ...
                        if (IsApprox(a.X, b.X))
                        {
//Here we defined the link move behaviour that blocks the right click context menu event
                           SetReshapeBehavior(toolHandle, ReshapeBehavior.Horizontal);
                            toolHandle.Cursor = Cursors.SizeWE;
                        }
                        else
                        {
                            SetReshapeBehavior(toolHandle, ReshapeBehavior.Vertical);
                            toolHandle.Cursor = Cursors.SizeNS;
                        }

                        panel.Children.Add(toolHandle);
                    }
                }

            //...
            var loc = link.GetElementPoint(path, Spot.TopLeft);
            if (adornment != null)
            {
                adornment.Position = loc;
                adornment.Remeasure();
            }
        }

        link.SetAdornment(ToolCategory, adornment);
    }

Ah, is the problem that an Adornment is catching pointer events, so that the Link doesn’t get them?

Do you want to put the context menu on the Adornment as well as on the Link itself?

Yes, if it’s the solution to have this action along the link. I put a print screen that saw regions where right click works and where not.

Is that because you set up a wide but transparent Adornment along that link segment in order to show the cursor and to support dragging up and down?

Yes, if you have two different elements at the same place, only one can receive pointer events. That’s nothing to do with GoXam.