I have MenuItem List and using the ApplicationCommnds like cut,copy,paste.I want to do some thing when Command is disable.But style not working on it.Default behaviour of ApplicationCommand is ii automatically set the foregroud grey if it disable.But it not working in my case.So i explicitly try to set it.
<TextBox x:Name="AssignmentTextBox" >
<TextBox.ContextMenu>
<ContextMenu Background="White">
<MenuItem Command="ApplicationCommands.Undo" Style="StaticResource _MenuItem}"/>
<Separator />
<MenuItem Command="ApplicationCommands.Cut" Style="{StaticResource _MenuItem}"/>
<MenuItem Command="ApplicationCommands.Copy" Style="{StaticResource _MenuItem}" />
<MenuItem Command="ApplicationCommands.Paste" Style="{StaticResource _MenuItem}"/>
<Separator />
<MenuItem Command="ApplicationCommands.SelectAll" Style="{StaticResource _MenuItem}"/>
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>