Ensure correct buttons are disabled when prompting in UWP.

This commit is contained in:
Josh Matthews 2020-04-24 14:14:31 -04:00
parent 2a0700e78b
commit d6ae56b75e

View file

@ -453,10 +453,10 @@ ServoControl::PromptSync(hstring title, hstring message, hstring primaryButton,
dialog.PrimaryButtonText(primaryButton); dialog.PrimaryButtonText(primaryButton);
if (secondaryButton.has_value()) { if (secondaryButton.has_value()) {
dialog.IsPrimaryButtonEnabled(true); dialog.IsSecondaryButtonEnabled(true);
dialog.SecondaryButtonText(*secondaryButton); dialog.SecondaryButtonText(*secondaryButton);
} else { } else {
dialog.IsPrimaryButtonEnabled(false); dialog.IsSecondaryButtonEnabled(false);
} }
auto titleBlock = Controls::TextBlock(); auto titleBlock = Controls::TextBlock();