D
D
Dartware2019-11-18 15:34:56
User interface
Dartware, 2019-11-18 15:34:56

How to highlight the ListBox element in WPF, relative to which the context menu opens?

I have a ListBox with many items. Each element is highlighted in a different color on hover.
5dd28e8370802134164978.png
This is the result of a classic view trigger:
5dd28e9f86130905779365.png
Each element has a context menu.
5dd28eac225e5701526388.png
However, when this menu appears, the element is no longer highlighted in a different color. This is not the desired behaviour.
It should be like this: The
5dd28eb7dc9f9204891923.pngscreenshot is the result of the Photoshop graphic editor.
Actually the question is: is it possible to achieve such behavior in WPF when opening the context menu and how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-11-18
@NeiroNx

Most likely it should be selected (select) - then it will be selected. If the selection is used for other purposes, then save and then select the former again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question