I learnt how to hide disabled buttons in WPF

I had a requirement that disabled buttons shouldn’t just be greyed out but be hidden. The following style achieves this:

    <Style TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Visibility" Value="Hidden" />
</Trigger>
</Style.Triggers>
</Style>