Click or drag to resize

ObservableObjectBaseSetPropertyT Method (T, T, ExpressionFuncT, ActionT, T)

Sets the property and raises the PropertyChanged event for the property identified by the specified property expression.

[NotifyPropertyChangedInvocator]

Namespace:  TomsToolbox.Wpf
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll)
Syntax
protected bool SetProperty<T>(
	ref T? backingField,
	T value,
	Expression<Func<T>> propertyExpression,
	Action<T, T> changeCallback
)

Parameters

backingField
Type: T
The backing field for the property.
value
Type: T
The value.
propertyExpression
Type: System.Linq.ExpressionsExpressionFuncT
The expression identifying the property.
changeCallback
Type: SystemActionT, T
The callback that is invoked if the value has changed. Parameters are (oldValue, newValue).

Type Parameters

T
The type of the property.

Return Value

Type: Boolean
True if value has changed and the PropertyChange event was raised.
See Also