I have the following problem:
I would like to show a context menu in a list view depending on the selected items of the list view. What I did so far:
I created a listview and assigned a context menu to it. Then I binded the ItemsSource property of the context menu to the SelectedItems property of the list view and assigned a converter for this binding to do some special handling depending on the selected
When running the application I recognized that the converter will not be called every time the context menu pops up. It seems like that if you switch the context menus very fast (by right clicking on different items in the list view in very short intervals)
the converter will not be called, but if you click with a lower frequency (or just wait one second or two until you release the right mouse button again) everything works fine.
I have the following code sample which reproduces the issue on my machine. The code just creates a list view, fills it with some example strings and implements a converter which just increments a static int every time the converter of the context menu is
To check if the problem is really the converter and not an update of the ItemsSource, you can uncomment the first context menu in the xaml file and comment the second one, then you will recognize that the context menu will show the cor
View Complete Post