xml
<UserControl x:Class="produproperty.content" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:produproperty" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="当前还在运行,确定退出"></TextBlock> <CheckBox Grid.Row="1" Content="保存"></CheckBox> </Grid> </UserControl>
c#
ContentDialog content_dialog = new ContentDialog() { Title = "退出", Content = new content(), PrimaryButtonText = "确定", SecondaryButtonText = "取消", FullSizeDesired = false, }; content_dialog.PrimaryButtonClick += (_s, _e) => { }; await content_dialog.ShowAsync();
这篇文档对您是否有帮助?