Xaml UWP内容对话框禁用主按钮

Xaml UWP内容对话框禁用主按钮,xaml,uwp,Xaml,Uwp,我有一个ContentDialog,它链接 <ContentDialog x:Class="ParadigmaN.Apps.Common.Controls.EditPersonContentDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:l

我有一个ContentDialog,它链接

<ContentDialog
    x:Class="ParadigmaN.Apps.Common.Controls.EditPersonContentDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ParadigmaN.Apps.Common.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    x:Uid="EditorPersonas"
    Title=""
    PrimaryButtonText="Aceptar"
    SecondaryButtonText="Cancelar"
    PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
    SecondaryButtonClick="ContentDialog_SecondaryButtonClick"
    PrimaryButtonCommand="{Binding ElementName=CtrPerson,Path=DataContext.GuardarCommand}">
    <Grid>
        <local:PersonControl x:Name="CtrPerson"/>
    </Grid>
</ContentDialog>

但PrimaryButton保持启用状态,即使我的CanExecuteCommand返回false


如何从ContentDialog控制PrimaryButton的启用状态?

有一个名为IsPrimaryButtonEnabled的属性,您可以使用该属性启用或禁用ContentDialog的PrimaryButton


该按钮上的此命令与其他命令的行为不一样,这是非常令人不安的。我认为这是一个错误,并想报告它,但找不到该做什么。