Skip to content

Commit a3f5449

Browse files
committed
Handle Unauthorized Deletion Attempts
1 parent b49d38d commit a3f5449

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ItemInteractions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ public static async void DeleteItem_Click(object sender, RoutedEventArgs e)
527527
{
528528

529529
}
530+
catch (System.UnauthorizedAccessException)
531+
{
532+
MessageDialog AccessDeniedDialog = new MessageDialog("Access Denied", "Unable to delete this item");
533+
await AccessDeniedDialog.ShowAsync();
534+
}
530535
}
531536

532537
public static void RenameItem_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)