Home>
It is

Hello WPF beginner.

Prism.Unity 7.2.0
Reactiveproperty 6.1.4

I want to set ObservehasErrors of ReactiveProperty and other conditions as the condition of ReactiveCommand.

ACommand = new []
{
    A. ObserveHasErrors,
    B. ObserveHasErrors,
    C. ObserveHasErrors,
} .CombineLatest (x =>x.All (y =>! Y)). ToReactiveCommand ();

For example, what if I want to add a condition that the value of property D is 10 to these three conditions?

  • Answer # 1

    Because I haven't used ReactiveProperty properly, I'm not very confident, but I feel like it's moving ^^;

    ACommand = new []
    {
        A. ObserveHasErrors,
        B. ObserveHasErrors,
        C. ObserveHasErrors,
        D.Select (x =>x! = 10), // reverse because it will be denied at ↓
    } .CombineLatest (x =>x.All (y =>! Y)). ToReactiveCommand ();

    xamarin.forms-How to implement CanExecute in ReactiveCommand-Stack Overflow
    And okazuki is doing Inverse ().