public async void DeleteClicked(object sender, EventArgs e) { var confirm = await DisplayAlert("Confirm", "Are you sure you Want to Delete this Item?", "Yes", "No"); if (confirm) { InventoryClient inventoryClient = new InventoryClient(); Inventory inventory = (Inventory)BindingContext; await inventoryClient.DeleteItemAsync(inventory.Id); await Navigation.PopAsync(); } await Navigation.PopAsync(); }