Skip to content

Instantly share code, notes, and snippets.

@dkalamari
Created April 22, 2014 06:52
Show Gist options
  • Save dkalamari/11167794 to your computer and use it in GitHub Desktop.
Save dkalamari/11167794 to your computer and use it in GitHub Desktop.
WPF image opacity in button style
<Style x:Key="btnCustom" TargetType="{x:Type Button}">
<Setter Property="Height" Value="50"/>
<Setter Property="Width" Value="80"/>
<Setter Property="Margin" Value="5,2,0,5"/>
<Style.Resources>
<Style TargetType="Image">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</Style.Triggers>
</Style>
</Style.Resources>
</Style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment