Change style of a Button when its Disabled ( IsEnabled=False )
问题 I have a UWP Question. How can I change style of a Button when it’s Disabled (IsEnabled=False)? 回答1: Here's how you do it. <StackPanel> <Button x:Name="button" Content="Click Me" IsEnabled="{Binding IsChecked, ElementName=checkBox}"> <Interactivity:Interaction.Behaviors> <Core:DataTriggerBehavior Binding="{Binding IsEnabled, ElementName=button, Mode=OneWay}" Value="True"> <Core:ChangePropertyAction PropertyName="Opacity" Value="1"/> </Core:DataTriggerBehavior> <Core:DataTriggerBehavior