Why does the async/await code to show my ContentDialog fail at runtime?
问题 I want to instantiate a ContentDialog in my UWP app, which is defined in my XAML as follows: <Page . . . <Grid x:Name="grd"> . . . <ContentDialog x:Name="cntDlgLoadMap" Title="This is an example" PrimaryButtonText="Ok" CloseButtonText="Cancel" DefaultButton="Primary"> </ContentDialog> </Grid> </Page> Trying to get a minimal example running, I was going to try this: private void btnLoadMap_Click(object sender, RoutedEventArgs e) { cntDlgLoadMap.ShowAsync(); } ...but got this design-time err