Hi, I'm using a popupmenu with a Listview to move items up/down or top/bottom.

This is how I have the menu.


The problem is that when I hover the mouse cursor over "Move Up" or "Move Down", then those items are automatically 'clicked' as soon as the submenu's "Move to Top" or "Move to Bottom" become visible. The code behind "Move Up" or "Move Down" runs and moves the Listview items up or down and that shouldn't happen.

The other problem is that the menu won't disappear when I do manually click on the "Move Up" or "Move Down" menu items.

Is there any way to fix that? I rather not change the way the menu items are arranged and keep it the way it is.

This question has probably been asked before, but I couldn't find any similar threads.