I have a ListView of items that I'd like to right-click (offering options like delete, rename, etc.) The issue is when right-clicking an item it selects that item. I'd like to avoid that functionality while keeping the context menu available. If multiple items are selected, they should stay selected so the user can delete them via the context menu.
One solution proposed here was to just disable the right mouse button down event on the individual items, but I need that context menu because it's different from the one on the ListView itself. Therefore I seem to be out of ideas.
Edit: I would rather not have to clear items then reset the selection every time because this ListView can contain over 100 items. It is virtualized but still, that was the FIRST thing I thought of and it's my last resort. Keeping a list on the side that I have to constantly sync the ListView with will be annoying and results in lazy code.
I need to be able to multi-select ListView items then right-click and execute a command that will take into account the entire selection.