mirror of
https://github.com/ckaczor/Common.Wpf.git
synced 2026-01-14 17:22:59 -05:00
26 lines
1.1 KiB
XML
26 lines
1.1 KiB
XML
<Button x:Class="Common.Wpf.Toolbar.ImageButton"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="20"
|
|
d:DesignWidth="20">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Image}"
|
|
x:Key="toolbarImageStyle">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}, AncestorLevel=1}, Path=IsEnabled}"
|
|
Value="False">
|
|
<Setter Property="Opacity"
|
|
Value="0.25" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Resources>
|
|
<Image x:Name="image"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource toolbarImageStyle}" />
|
|
</Button>
|