The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

WhenAnyMixin.

WhenAnyValue<TSender, T1, T2, T3, T4, T5>(TSender, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>) Method

Summary

WhenAnyValue allows you to observe whenever the value of 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<(T1, T2, T3, T4, T5)> WhenAnyValue<TSender, T1, T2, T3, T4, T5>(this TSender sender, Expression<Func<TSender, T1>> property1, Expression<Func<TSender, T2>> property2, Expression<Func<TSender, T3>> property3, Expression<Func<TSender, T4>> property4, Expression<Func<TSender, T5>> property5)

Type Parameters

Name Description
TSender
T1
T2
T3
T4
T5

Parameters

Name Type Description
sender TSender The object where the property chain starts.
property1 Expression<Func<TSender, T1>> The 1 property chain to reference. This will be a expression pointing to a end property or field.
property2 Expression<Func<TSender, T2>> The 2 property chain to reference. This will be a expression pointing to a end property or field.
property3 Expression<Func<TSender, T3>> The 3 property chain to reference. This will be a expression pointing to a end property or field.
property4 Expression<Func<TSender, T4>> The 4 property chain to reference. This will be a expression pointing to a end property or field.
property5 Expression<Func<TSender, T5>> The 5 property chain to reference. This will be a expression pointing to a end property or field.

Return Value

Type Description
IObservable<(T1, T2, T3, T4, T5)>