Here is an example of a simple view model class with a single property:

public class SimpleViewModel : ViewModel
{
    private int _number;

    public int Number
    {
        get { return _number; }
        set { OnPropertyChange(ref _number, value); }
    }
}

Last edited Sep 20, 2012 at 2:07 AM by mglukhankov, version 1

Comments

DickInKent Mar 2, 2013 at 7:37 PM 
should that be OnPropertyChange<int> i.e. generic?
- otherwise (if you use Object parameters) surely you'll get un/boxing consequences ?