Prevent selecting node when clicking on outer port

Hi Walter,

if i left click on a node, the node is getting selcted:
image

On a node with additional ports, when i click on a port, then the whole corresponding node is getting selected too:
image

Is there a way, that i can prevent a node getting selected when i click on one of its outer ports?

I had a look at the “Dynamic Ports” sample and moreless copied it. - But there it also behaves like this: (Clicked on Red Bottom Port)
image

Many thanks meanwhile, Hannes

Solved.

    public class InertListBoxItem : ListBoxItem
    {
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);
            e.Handled = false;
        }

        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
        {
            e.Handled = true;
            base.OnMouseLeftButtonUp(e);
        }
    }