Class NotifyPropertyChangedBase
Base class that provides property change notification mechanism. Implements System.ComponentModel.INotifyPropertyChanged interface.
Inheritance
Namespace: Telerik.Maui.Controls
Assembly: Telerik.Maui.Controls.dll
Syntax
public abstract class NotifyPropertyChangedBase : Object, INotifyPropertyChanged
Constructors
NotifyPropertyChangedBase()
Declaration
protected NotifyPropertyChangedBase()
Methods
OnPropertyChanged(String)
Raises the PropertyChanged event.
Declaration
protected virtual void OnPropertyChanged(string propertyName = null)
Parameters
System.String
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
T
field
A reference to the field to update. |
T
value
The new value for the field. |
System.Action<T>
onChanged
Action to invoke after the field value is changed, with the old value as parameter. |
System.String
propertyName
The name of the property that is changing. If null, the caller member name is used. |
Returns
System.Boolean
|
Type Parameters
T
The type of the field to update. |
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
T
field
A reference to the field to update. |
T
value
The new value for the field. |
System.String
propertyName
The name of the property that is changing. If null, the caller member name is used. |
Returns
System.Boolean
|
Type Parameters
T
The type of the field to update. |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|