WhenAnyMixin.

WhenAny<TSender, TRet, T1, T2>(TSender, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, TRet>) Method

Summary

WhenAny allows you to observe whenever one or more properties on an object have changed, providing an initial value when the Observable is set up, unlike ObservableForProperty(). Use this method in constructors to set up bindings between properties that also need an initial setup.
Namespace
ReactiveUI
Containing Type
WhenAnyMixin

Syntax

public static IObservable<TRet> WhenAny<TSender, TRet, T1, T2>(this TSender This, Expression<Func<TSender, T1>> property1, Expression<Func<TSender, T2>> property2, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, TRet> selector)

Type Parameters

Name Description
TSender
TRet
T1
T2

Parameters

Name Type Description
This TSender
property1 Expression<Func<TSender, T1>>
property2 Expression<Func<TSender, T2>>
selector Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, TRet>

Return Value

Type Description
IObservable<TRet>