I have a context menu, that I’d like to change the Header based on whether the Control Key is pressed or not.
Right now I have,
<MenuItem Header="Send To">
<MenuItem ... />
<MenuItem ... />
</MenuItem>
I’d like based on the Control Key being down to be,
<MenuItem Header="Move To">
<MenuItem ... />
<MenuItem ... />
</MenuItem>
All I really need to do is change the Header text, because inside the code I know how to check for the Modifier key being Control.
Bind the
Headerto some property in your view model, and have it change (with notification) when the modifier key is pressed.