Skip to content

Applies to

netstandard2.0, net462

public static IObservable<TReturn> WhenChanged<TObj, TReturn>(this TObj objectToMonitor, Expression<Func<TObj, TReturn>> propertyExpression) where TObj : class, INotifyPropertyChanged

Summary: Notifies when the specified property changes.

Type parameters

NameDescription
TObjThe type of initial object.
TReturnThe eventual return value.

Parameters

NameTypeDescription
objectToMonitorTObjThe object to monitor.
propertyExpressionExpression>The expression to the object.

Returns: IObservable -- An observable that signals when the property specified in the expression has changed.

Exceptions

TypeCondition
System.ArgumentNullExceptionEither the property expression or the object to monitor is null.
System.ArgumentExceptionIf there is an issue with the property expression.