3,041 questions
Okay, found the solution. I need to use args.GetDeferral();
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I have a ContentDialog, when I click on the primary button the PrimaryButtonClick event is raised which then calls an async operation. But before the async operation completes the dialog is closed. Is there a way to prevent this?
private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
{
IsPrimaryButtonEnabled = IsSecondaryButtonEnabled = false;
bool result = false;
try
{
result = await REST.SetOffersAsync();
if (!result) {
args.Cancel = true;
IsSecondaryButtonEnabled = true;
}
}
catch (Exception ex)
{
args.Cancel = true;
IsSecondaryButtonEnabled = true;
}
}
Thanks
Gavin
Okay, found the solution. I need to use args.GetDeferral();
smoething Please help the Asp.net Malware functon!