Class AbstractNotifyPropertyChanged
- Namespace
- Dynamic
Data .Binding
- Assembly
- DynamicData.dll
Base class for implementing notify property changes.
- Inheritance
-
Abstract
Notify Property Changed
- Implements
- Extension Methods
Constructors
AbstractNotifyPropertyChanged()
Methods
OnPropertyChanged(string?)
Invokes on property changed.
Parameters
propertyName
stringName of the property.
SetAndRaise<T>(ref T, T, IEqualityComparer<T>?, string?)
If the value has changed, sets referenced backing field and raise notify property changed.
protected virtual void SetAndRaise<T>(ref T backingField, T newValue, IEqualityComparer<T>? comparer, string? propertyName = null)
Parameters
backingField
TThe backing field.
newValue
TThe new value.
comparer
IEqualityComparer <T>The comparer.
propertyName
stringName of the property.
Type Parameters
T
The type of the item.
SetAndRaise<T>(ref T, T, string?)
If the value has changed, sets referenced backing field and raise notify property changed.
Parameters
backingField
TThe backing field.
newValue
TThe new value.
propertyName
stringName of the property.
Type Parameters
T
The type to set and raise.
SuspendNotifications(bool)
Suspends notifications. When disposed, a reset notification is fired.
[Obsolete("This never worked properly in the first place")]
public IDisposable SuspendNotifications(bool invokePropertyChangeEventWhenDisposed = true)
Parameters
invokePropertyChangeEventWhenDisposed
boolIf the property changed event should be invoked when disposed.
Returns
- IDisposable
A disposable to indicate to stop suspending the notifications.
Events
PropertyChanged
Occurs when a property value has changed.