View notification does not work with mvvmhelper

0

I'm using James Montemagno's mvvmhelper to develop my app and using the same framework it teaches you to use. ie with a BaseViewModel and such when I do the navigation between the pages everything works perfectly, I load the properties in the constructor of my viewmodel and they are displayed in the form. but when I make some changes to the same properties that should update my view, it does not update, as if the property change was not notifying the view.

Has anyone ever experienced this using mvvmhelper?

    
asked by anonymous 03.02.2017 / 22:42

1 answer

0

If I understand your question, you are referring to a ViewModel that is not updating in the view of your View, correct? To do this your ViewModel must implement INotifyPropertyChanged and in the case of MVVMHelper you should use SetProperty as follows, below a code example:

public class PersonViewModel : BaseViewModel
{
    private string _name;
    public string Name{
       get{
           return _name;
       }
       set{
           SetProperty(ref _name, value);
       }
    }
}
    
03.02.2017 / 23:35