2016-06-18 14:50:32 +00:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
|
|
namespace PettingZoo.Infrastructure
|
|
|
|
|
{
|
|
|
|
|
public class BaseViewModel : INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
protected virtual void RaisePropertyChanged([CallerMemberName] string propertyName = null)
|
|
|
|
|
{
|
|
|
|
|
var handler = PropertyChanged;
|
2016-06-20 10:30:03 +00:00
|
|
|
|
if (handler != null)
|
|
|
|
|
handler(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void RaiseOtherPropertyChanged(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
var handler = PropertyChanged;
|
|
|
|
|
if (handler != null)
|
2016-06-18 14:50:32 +00:00
|
|
|
|
handler(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|