这两个按钮;一个是启用的,一个是禁用的。谁能弄清楚为什么?
<Button Command="{Binding ResolveHostsCommand}" VerticalAlignment="Center" IsEnabled="{Binding CanUserUpdateHosts}" Grid.Column="0" Content="Resolve" />
<Button VerticalAlignment="Center" IsEnabled="False" Content="Cancel" Grid.Column="1">
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding CanUserUpdateHosts}" Value="True">
<Setter Property="IsEnabled" Value="True"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>