Files
StructureHelper/StructureHelper/Infrastructure/UI/Resources/ButtonStyles.xaml
2023-10-29 17:26:05 +05:00

78 lines
3.2 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Button" x:Key="ButtonBase">
</Style>
<Style TargetType="Button" x:Key="CommandButton" BasedOn="{StaticResource ButtonBase}">
<Style.Setters>
<Setter Property="Height" Value="25"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="AddButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Add"/>
<Setter Property="Command" Value="{Binding Add}"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="EditButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Edit"/>
<Setter Property="Command" Value="{Binding Edit}"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="DeleteButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Delete"/>
<Setter Property="Command" Value="{Binding Delete}"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="CopyButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Copy"/>
<Setter Property="Command" Value="{Binding Copy}"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="OkButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Ok"/>
<Setter Property="IsDefault" Value="True"/>
<Setter Property="Width" Value="60"/>
<Setter Property="Margin" Value="5"/>
</Style.Setters>
</Style>
<Style TargetType="Button" x:Key="CancelButton" BasedOn="{StaticResource CommandButton}">
<Style.Setters>
<Setter Property="Content" Value="Cancel"/>
<Setter Property="IsCancel" Value="True"/>
<Setter Property="Width" Value="60"/>
<Setter Property="Margin" Value="5"/>
</Style.Setters>
</Style>
<Style x:Key="ToolButton" TargetType="Button">
<Setter Property="Width" Value="32"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Margin" Value="2,0,2,0"/>
<Setter Property="Background" Value="#FFA19BC3"/>
<Setter Property="BorderBrush" Value="#FF857AB9"/>
</Style>
<Style x:Key="ButtonImage16" TargetType="Image">
<Setter Property="Height" Value="16"/>
<Setter Property="Width" Value="16"/>
</Style>
<Style x:Key="ButtonImage32" TargetType="Image">
<Setter Property="Height" Value="32"/>
<Setter Property="Width" Value="32"/>
</Style>
<DataTemplate x:Key="OkCancelButtons">
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{StaticResource CancelButton}" Command="{Binding CancelCommand}"/>
<Button Style="{StaticResource OkButton}" Command="{Binding OkCommand}"/>
</StackPanel>
</DataTemplate>
</ResourceDictionary>