|
0
|
1 |
using System.ComponentModel; |
|
|
2 |
|
|
|
3 |
namespace Iri.Modernisation.BaseMVVM.ViewModel |
|
|
4 |
{ |
|
|
5 |
/// <summary> |
|
|
6 |
/// Base class for all view models |
|
|
7 |
/// </summary> |
|
|
8 |
public abstract class ViewModel : INotifyPropertyChanged |
|
|
9 |
{ |
|
|
10 |
|
|
|
11 |
public event PropertyChangedEventHandler PropertyChanged; |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
protected virtual void OnPropertyChanged(string propertyName) |
|
|
15 |
{ |
|
|
16 |
if (PropertyChanged != null) |
|
|
17 |
{ |
|
|
18 |
PropertyChangedEventArgs _temp = new PropertyChangedEventArgs(propertyName); |
|
|
19 |
PropertyChanged(this,_temp); |
|
|
20 |
} |
|
|
21 |
} |
|
|
22 |
} |
|
|
23 |
} |