MenuItem List があり、切り取り、コピー、貼り付けなどの ApplicationCommnds を使用しています。コマンドが無効になっているときに何らかの処理を実行したいのですが、スタイルが機能していません。私の場合は機能しません。したがって、明示的に設定しようとします。
<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>