WPF Binding Question - Change Label Text based on Modifier Key Control

Posted by Chuck Savage on Stack Overflow See other posts from Stack Overflow or by Chuck Savage
Published on 2010-05-28T18:05:31Z Indexed on 2010/05/28 18:21 UTC
Read the original article Hit count: 400

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf