contentdialog

Why does the async/await code to show my ContentDialog fail at runtime?

风格不统一 提交于 2021-01-07 01:20:49
问题 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

Why does the async/await code to show my ContentDialog fail at runtime?

主宰稳场 提交于 2021-01-07 01:20:28
问题 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

Why does the async/await code to show my ContentDialog fail at runtime?

拥有回忆 提交于 2021-01-07 01:18:53
问题 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

Why does the async/await code to show my ContentDialog fail at runtime?

一笑奈何 提交于 2021-01-07 01:18:37
问题 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

How can I force the TextBox to display what is being entered into it?

自闭症网瘾萝莉.ら 提交于 2020-12-27 06:36:38
问题 In my UWP app, I am invoking a ContentDialog when a button (btnCre8NewMap) is clicked. Here is the pertinent XAML: <Button x:Name="btnCre8NewMap" Content="Create New Map" ToolTipService.ToolTip="Create a new map" Margin="140,16,50,0" VerticalAlignment="Top" Click="btnCre8NewMap_Click"/> . . . <ContentDialog x:Name="cntDlgCre8Map" Title="Create a New Map" PrimaryButtonText="Save" CloseButtonText="Cancel" DefaultButton="Primary"> <StackPanel> <TextBlock Text="Map Name: "/> <TextBox x:Name=