AvaloniaObject.

SetAndRaise<T>(AvaloniaProperty<T>, T, AvaloniaObject.SetAndRaiseCallback<T>, T) Method

Summary

Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
Namespace
Avalonia
Containing Type
AvaloniaObject

Syntax

protected bool SetAndRaise<T>(AvaloniaProperty<T> property, ref T field, AvaloniaObject.SetAndRaiseCallback<T> setterCallback, T value)

Type Parameters

Name Description
T The type of the property.

Parameters

Name Type Description
property AvaloniaProperty<T> The property.
field T The backing field.
setterCallback AvaloniaObject.SetAndRaiseCallback<T> A callback called to actually set the value to the backing field.
value T The value.

Return Value

Type Description
bool True if the value changed, otherwise false.