I'm doing an app that makes entries.
So, I have a screen with a custom list, i say custom because it's a StackLayout inside a ScrollView, like cards. The rows comes as the "ItemSource" grows.
Below the table, I have a button which goes to a register screen, so there I can fill the fields. When it's finished I store the data on a ObservableCollection at the ViewModel and back to the list's screen.
I use OnAppearing to fill the list if I have some data, cause if not the app will show an Image that indicate the view is empty.
The problem is sometimes the OnAppearing is so fast and it's verify the ObservableCollection before the new entry is added.
So the Collection isn't have any data.
Look this:
protected override void OnAppearing () {
//Here's my ScrollView:
if (((TestClassViewModel)BindingContext).Items.Any())
foreach(var item in ((TestClassViewModel)BindingContext).Items)
stack.Children.Add (item)
//The same happens if I use a ListView:
if (((TestClassViewModel)BindingContext).Items.Any())
listItens.ItemSource = ((TestClassViewModel)BindingContext).Items //This is to "refresh"
base.OnAppearing ();
}