Home > Net >  WPF right-click menu, after binding command, button is not available
WPF right-click menu, after binding command, button is not available

Time:10-05

Xamal file, I tried in the toolBar, Menu, the ContextMenu binding orders, in the toolBar, Menu in normal, why only right-click Menu (ContextMenu) why can't two buttons? The code below
 
XMLNS="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
XMLNS: x="http://schemas.microsoft.com/winfx/2006/xaml"
XMLNS: d="http://schemas.microsoft.com/expression/blend/2008"
XMLNS: MC="http://schemas.openxmlformats.org/markup-compatibility/2006"
XMLNS: local="CLR - namespace: _1. Order entry"
MC: Ignorable="d"
Title="MainWindow" Height="450" Width="800" & gt;

Executed="OpenCommand_Exexuted" & gt;
Executed="NewCommand_Exexuted" & gt;
















CodePudding user response:

Know how to solve, to right-click menu command set CommandTarget
 






CodePudding user response:

Reference: "the bible: WPF programming using c # 2012 and.net 4.5 fourth edition" P227

CodePudding user response:

CodePudding user response:

Mark the
  •  Tags:  
  • C#
  • Related