To improve the performance, try to move to the MessagingCenter.Send
before navigation.
public async virtual void SeletedItemActionAsync()
{
if (SelectedNotebook == null)
{
return;
}
//MessagingCenter.Send();
await Application.Current.MainPage.Navigation.PushAsync(notesPage);
SelectedNotebook = null;
}
If it stil doesn't work, try to store the data and then retrive the data in the
public async virtual void SeletedItemActionAsync()
{
if (SelectedNotebook == null)
{
return;
}
Application.Current.Properties["id"] = App.NotebookID;//if the id is global static, you could use it directly
Application.Current.Properties["selected_object"] = SelectedNotebook;
await Application.Current.MainPage.Navigation.PushAsync(notesPage);
SelectedNotebook = null;
}
public NotesPageViewModel()
{
Services = App.services;
FabAnimationCommmand = new Command<Frame>(AnimateButtonCommand);
if (Application.Current.Properties.ContainsKey("id"))
{
var selectedObject = Application.Current.Properties["selected_object"] as Notebook;
}
...
}