2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Runtime.CompilerServices;
20 [field: NonSerialized]
41 [CallerMemberName]
string? propertyName =
null)
44 if (EqualityComparer<T>.Default.Equals(field, value))
61 [CallerMemberName]
string? propertyName =
null)
66 new PropertyChangedEventArgs(propertyName));
Base class for model objects that notify listeners when one of their properties changes.
PropertyChangedEventHandler? PropertyChanged
Raised when the value of a property changes.
virtual void OnPropertyChanged([CallerMemberName] string? propertyName=null)
Raises the PropertyChanged event.
bool SetProperty< T >(ref T field, T value, [CallerMemberName] string? propertyName=null)
Assigns a new value to a backing field and raises PropertyChanged when the value has actually changed...