AvaloniaObject.

SetAndRaise<T>(AvaloniaProperty<T>, 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, 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.
value T The value.

Return Value

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