ClassNotifyPropertyChangedBase
Base class that provides property change notification mechanism. Implements INotifyPropertyChanged interface.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public abstract class NotifyPropertyChangedBase : INotifyPropertyChanged
Inheritance: objectNotifyPropertyChangedBase
Derived Classes:
Implements:
Constructors
NotifyPropertyChangedBase()
Declaration
protected NotifyPropertyChangedBase()
Methods
OnPropertyChanged(string)
Raises the PropertyChanged event.
Declaration
protected virtual void OnPropertyChanged(string propertyName = null)
Parameters
propertyName
The name of the property that has changed. If null, the caller member name is used.
UpdateValue<T>(ref T, T, Action<T>, string)
Updates a field's value, executes a callback with the old value, and raises the PropertyChanged event if the value has changed.
Declaration
protected bool UpdateValue<T>(ref T field, T value, Action<T> onChanged, string propertyName = null)
Parameters
field
T
A reference to the field to update.
value
T
The new value for the field.
onChanged
Action<T>
Action to invoke after the field value is changed, with the old value as parameter.
propertyName
The name of the property that is changing. If null, the caller member name is used.
Returns
true
if the value was changed, false
otherwise.
UpdateValue<T>(ref T, T, string)
Updates a field's value and raises the PropertyChanged event if the value has changed.
Declaration
protected bool UpdateValue<T>(ref T field, T value, string propertyName = null)
Parameters
field
T
A reference to the field to update.
value
T
The new value for the field.
propertyName
The name of the property that is changing. If null, the caller member name is used.
Returns
true
if the value was changed, false
otherwise.
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements