20 lines
567 B
C#
20 lines
567 B
C#
namespace OMNIPruefung.ViewModels.Base
|
|
{
|
|
using System.ComponentModel;
|
|
|
|
public abstract class VM<T> : INotifyPropertyChanged where T : VM<T>
|
|
{
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
protected void NotifyPropertyChanged(string property)
|
|
=> this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
|
|
|
|
protected void Set<T>(ref T property, T value, string propertyName)
|
|
{
|
|
property = value;
|
|
|
|
this.NotifyPropertyChanged(propertyName);
|
|
}
|
|
}
|
|
}
|