Class NotifyPropertyChangedBase
- Namespace
- ATAS.Indicators
- Assembly
- ATAS.Indicators.dll
Base class for implementing the System.ComponentModel.INotifyPropertyChanged interface.
public class NotifyPropertyChangedBase
- Inheritance
-
objectNotifyPropertyChangedBase
- Derived
- Extension Methods
Constructors
NotifyPropertyChangedBase()
public NotifyPropertyChangedBase()
Methods
RaisePropertyChanged(string?)
Raises the PropertyChanged event for the specified property name.
protected void RaisePropertyChanged(string? propertyName = null)
Parameters
propertyNamestringThe name of the property that changed.
SetProperty<TProperty>(ref TProperty, TProperty, string?, Action?)
Assigns a new value to the backing field and, if the value changed, raises PropertyChanged and invokes onChanged.
Does nothing when the new value equals the current one.
protected void SetProperty<TProperty>(ref TProperty store, TProperty value, string? propertyName = null, Action? onChanged = null)
Parameters
storeTPropertyThe backing field of the property.
valueTPropertyThe new value.
propertyNamestringThe name of the property; filled in automatically by the compiler when omitted.
onChangedActionAn optional action invoked after the value has changed and the event has been raised.
Type Parameters
TPropertyThe type of the property.
Events
PropertyChanged
Event that is raised when a property value changes.
public event PropertyChangedEventHandler? PropertyChanged
Event Type
- PropertyChangedEventHandler