Answer the question
In order to leave comments, you need to log in
How to access MenuItem in ContextMenu?
My application shows a tray icon, when clicked, a context menu is displayed in which the first 4 items IsCheckable=True.
But I can't figure out how to check them and remove them in code-behind.
I can’t find anything in Google other than data binding, but in my scenario, the checkbox should be on only one of the 4 items and I thought to switch them in the code, but I don’t know how to access them from the code.
Or am I reinventing the wheel and in WPF there is functionality for such menus with switchable items?
Answer the question
In order to leave comments, you need to log in
I can’t find anything in Google other than data binding, but in my scenario, the checkbox should be on only one of the 4 items and I thought to switch them in the code, but I don’t know how to access them from the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question