private async void AppBarButton_Click_3(object sender, RoutedEventArgs e) { var dialog = new MessageDialog("", ""); var dlg = new ContentDialog() { Title = "Warning", Content = "Do you really want to delete this post?", PrimaryButtonText = "yes", SecondaryButtonText = "no" }; var dlgResult = await dlg.ShowAsync(); if (dlgResult == ContentDialogResult.Primary) { int result = await PostManagement.DeleteActivity(post.postID); if (result == 0) { //post = await Posts.GetActivity(post.postID); // this.Frame.GoBack(); } } }