void SaveClicked(object sender, System.EventArgs e) { if (itemTypesViewModel.rootViewModel.IsEdit) { itemTypesViewModel.rootViewModel.IsEdit = false; itemTypesViewModel.UpdateItem(mediaFile); } else { itemTypesViewModel.SaveNewItem(mediaFile); } }
async void Save_Clicked(object sender, EventArgs e) { if (ButtonIsBusy) { return; } ButtonIsBusy = true; if (EditMode) { NewItemViewModel.SaveEditedItem(); // remove old ItemDetailPage from navigation stack. Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]); } else { NewItemViewModel.SaveNewItem(); } await Navigation.PopAsync(); }