You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
721 B
25 lines
721 B
6 years ago
|
using System;
|
||
|
using System.ComponentModel;
|
||
|
using System.Runtime.CompilerServices;
|
||
|
|
||
|
namespace SignalsMVVM.HelperClasses
|
||
|
{
|
||
|
[Serializable]
|
||
|
public class PropertyChangedClass : INotifyPropertyChanged
|
||
|
{
|
||
|
[field: NonSerialized]
|
||
|
public virtual event PropertyChangedEventHandler PropertyChanged;
|
||
|
|
||
|
public virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||
|
{
|
||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||
|
}
|
||
|
|
||
|
public virtual void OnPropertyChanged(params string[] propertyNames)
|
||
|
{
|
||
|
foreach (var property in propertyNames)
|
||
|
OnPropertyChanged(property);
|
||
|
}
|
||
|
}
|
||
|
}
|