Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
wpfコンテキストに2つのメニュー項目があります。それらをコマンドでバインドします。両方の項目が使用できない場合、つまり両方のコマンドを実行できない場合、コンテキストメニューを非表示にするにはどうすればよいですか?
ContextMenuOpening イベントのイベント ハンドラーを追加します。ContextMenuEventArgs オブジェクトの Handled プロパティを true に設定すると、コンテキスト メニューが開きません。