when I save a contact and come POP the page, I don't see my new contact, I have to restart the app to see
To update the UI at runtime, please make sure the model class inherits from the INotifyPropertyChanged
interface or the BindableObject
class to raise the PropertyChanged
event such as:
public class TestModel : INotifyPropertyChanged
{
private string content;
public string Content
{
get
{
return content;
}
set
{
if (content != value)
{
content = value;
NotifyPropertyChanged("Content");
}
}
}
protected virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
}
Check the doc: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-basics/data-bindings-to-mvvm