ObservableObject.SetProperty Method

Definition

Overloads

SetProperty(IntPtr, IntPtr, String)
SetProperty(UIntPtr, UIntPtr, String)
SetProperty<T>(T, T, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

SetProperty<T>(T, T, Action, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

SetProperty<T>(T, T, Action<T,T>, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

SetProperty(IntPtr, IntPtr, String)

protected bool SetProperty (ref IntPtr field, IntPtr newValue, string propertyName = default);
member this.SetProperty : nativeint * nativeint * string -> bool
Protected Function SetProperty (ByRef field As IntPtr, newValue As IntPtr, Optional propertyName As String = Nothing) As Boolean

Parameters

field
IntPtr

nativeint

newValue
IntPtr

nativeint

propertyName
String

Returns

Applies to

SetProperty(UIntPtr, UIntPtr, String)

protected bool SetProperty (ref UIntPtr field, UIntPtr newValue, string propertyName = default);
member this.SetProperty : unativeint * unativeint * string -> bool
Protected Function SetProperty (ByRef field As UIntPtr, newValue As UIntPtr, Optional propertyName As String = Nothing) As Boolean

Parameters

field
UIntPtr

unativeint

newValue
UIntPtr

unativeint

propertyName
String

Returns

Applies to

SetProperty<T>(T, T, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

protected bool SetProperty<T> (ref T field, T newValue, string propertyName = default);
member this.SetProperty : 'T * 'T * string -> bool
Protected Function SetProperty(Of T) (ByRef field As T, newValue As T, Optional propertyName As String = Nothing) As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

propertyName
String

The property name to notify of changes if the values are different.

Returns

True if the property value was changed.

Applies to

SetProperty<T>(T, T, Action, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

protected bool SetProperty<T> (ref T field, T newValue, Action beforeNotifyAction, string propertyName = default);
member this.SetProperty : 'T * 'T * Action * string -> bool
Protected Function SetProperty(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action, Optional propertyName As String = Nothing) As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

beforeNotifyAction
Action

An action to call if the value changes, before notifying property changes.

propertyName
String

The property name to notify of changes if the values are different.

Returns

True if the property value was changed.

Applies to

SetProperty<T>(T, T, Action<T,T>, String)

Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.

protected bool SetProperty<T> (ref T field, T newValue, Action<T,T> beforeNotifyAction, string propertyName = default);
member this.SetProperty : 'T * 'T * Action<'T, 'T> * string -> bool
Protected Function SetProperty(Of T) (ByRef field As T, newValue As T, beforeNotifyAction As Action(Of T, T), Optional propertyName As String = Nothing) As Boolean

Type Parameters

T

The type of field changing.

Parameters

field
T

The storage location for the field behind the property.

newValue
T

The new value to store in the field.

beforeNotifyAction
Action<T,T>

An action to call if the value changes, before notifying property changes.

propertyName
String

The property name to notify of changes if the values are different.

Returns

True if the property value was changed.

Applies to