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

WhenAnyMixin.

WhenAnyValue<TSender, TRet>(TSender, Expression<Func<TSender, TRet>>) Method

Summary

WhenAnyValue allows you to observe whenever the value of a property on an object has 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> WhenAnyValue<TSender, TRet>(this TSender sender, Expression<Func<TSender, TRet>> property1)

Type Parameters

Name Description
TSender
TRet

Parameters

Name Type Description
sender TSender The object where the property chain starts.
property1 Expression<Func<TSender, TRet>> The first property chain to reference. This will be a expression pointing to a end property or field.

Return Value

Type Description
IObservable<TRet>