【发布时间】:2017-04-10 00:14:46
【问题描述】:
我正在使用带有 Windows 窗体和 c# 的 ReactiveUI。我不确定如何从 ReactiveCommand 中访问 EventArgs。
我的看法:
this.BindCommand(ViewModel, vm => vm.FileDragDropped, v => v.listViewFiles, nameof(listViewFiles.DragDrop));
视图模型:
FileDragDropped = ReactiveCommand.Create(() =>
{
// Do something with DragEventArgs
// Obtained from listViewFiles.DragDrop in View
});
如何从 ReactiveCommaand FileDragDropped 中获取 DragDrop EventArgs?
【问题讨论】:
-
我在您发布的代码中没有看到
EventArgs。你能发一个minimal reproducible example吗? -
@bradgonesurfing 这个问题与 Windows 窗体(不是 WPF)有关。
标签: c# .net winforms events reactiveui