This commit is contained in:
Dan Clark
2024-11-25 10:39:14 +00:00
parent d1ee8add0c
commit f7a96b3784
5 changed files with 41 additions and 64 deletions
-3
View File
@@ -62,15 +62,12 @@ public class ContentDialogHandler :
dialog.Closing -= HandleClosing;
if (dialog.DataContext is object content)
{
bool cancelled = false;
if (content is IAsyncConfirmation confirmation)
{
Deferral deferral = args.GetDeferral();
if (!await confirmation.Confirm())
{
args.Cancel = true;
cancelled = true;
dialog.Closing += HandleClosing;
}