I am switching to the latest version of ReactiveUI (7.0), and I am facing some incompatibilities and would like to know the suggested way to handle this:
ReactiveUI 6.x
Texts.Events().MouseUp .InvokeCommand(ViewModel, x => x.DoSomething);
Now this throws an exception:
The command requires parameters of type System.Reactive.Unit, but the resulting parameter is of type System.Windows.Input.MouseButtonEventArgs.
I fixed it using the following code, but is it correct?
Texts.Events().MouseUp .Select(x => Unit.Default) .InvokeCommand(ViewModel, x => x.DoSomething);
source share