ObservableObject.SetProperty<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the property.
protected virtual bool SetProperty<T>(ref T? backingStore, T? value, string propertyName = "", Action onChanging = default, Action onChanged = default, Func<T,T,bool>? validateValue = default);
Type Parameters
- T
The 1st type parameter.
Parameters
- backingStore
- T
Backing store.
- value
- T
Value.
- propertyName
- System.String
Property name.
- onChanging
- System.Action
- onChanged
- System.Action
On changed.
- validateValue
- System.Func<T,T,System.Boolean>
Validates value.
Returns
true
, if property was set, false
otherwise.