mirror of
https://github.com/ckaczor/ChrisKaczor.Wpf.Controls.Toolbar.git
synced 2026-01-26 09:35:39 -05:00
Initial commit
This commit is contained in:
25
ImageButton/ImageButton.xaml
Normal file
25
ImageButton/ImageButton.xaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<Button x:Class="ChrisKaczor.Wpf.Controls.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>
|
||||
Reference in New Issue
Block a user