SetAndRaise<T> Method
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
Definition
Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
protected bool SetAndRaise<T>(
DirectPropertyBase<T> property,
ref T field,
T value
)
Protected Function SetAndRaise(Of T) (
property As DirectPropertyBase(Of T),
ByRef field As T,
value As T
) As Boolean
member SetAndRaise :
property : DirectPropertyBase<'T> *
field : 'T byref *
value : 'T -> bool
Parameters
- DirectPropertyBase(T)
- The property.
- T
- The backing field.
- T
- The value.
Type Parameters
- The type of the property.
Return Value
Boolean
True if the value changed, otherwise false.