SetPropertyHelper.Set<T>(ref T, T, Action<T>) Method
Updates the field value if the new value is different. The method invokes the specified callback if the field value changes.
Namespace: DevExpress.Maui.Mvvm
Assembly: DevExpress.Maui.Mvvm.dll
NuGet Package: DevExpress.Maui.Mvvm
Declaration
public static bool Set<T>(
ref T storage,
T value,
Action<T> changedCallback
)
Parameters
Name | Type | Description |
---|---|---|
storage | T | A reference to the target field. |
value | T | The new field value. |
changedCallback | Action<T> | A callback that invokes if the underlying value changes. The callback accepts the old field value. |
Type Parameters
Name | Description |
---|---|
T | The type of the target field. |
Returns
Type | Description |
---|---|
Boolean |
|
See Also