Answer the question
In order to leave comments, you need to log in
Reactive IObservable binding?
Hello! Dealing with ReactiveUI + DynamicData(SourceList, SourceCache).
I am making a validation class and I need to bind IsValid to a collection. If the collection has at least 1 element, then IsValid = false.
private readonly SourceList<ValidationResult> _results;
public IObservable<bool> IsValid
public ValidationManager()
{
_results = new SourceList<ValidationResult>();
IsValid = _results.Connect().IsEmpty();
//Насколько я понял такой вариант можно применить к свойствам, но не к коллекциям
IsValid = this.WhenAnyValue(x => x._results).Select(x => x.Count == 0);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question