我正在尝试获取 WPF ReactiveUI 框架的新视图 ctor 绑定来绑定正在处理按钮单击的 ReactiveCommand 以连接到 TextBox MouseDown/click 事件。以下不起作用。
public partial class KeypadNumberView
: IKeypadNumberView
, IViewFor<IOnScreenKeyboard>
{
public KeypadNumberView()
{
ViewModel = new KeyboardViewModel();
InitializeComponent();
this.Bind(ViewModel, x => x.EnteredText);
this.BindCommand(ViewModel, vm => vm.Delete, v => v.EnteredText, "MouseDown" ); // doesn't work
this.BindCommand(ViewModel, vm => vm.Delete); // <== works