123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!-- // Базовая кнопка //-->
- <Style TargetType="Button">
- <Style.Setters>
- <Setter Property="Background" Value="#498C51"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="Width" Value="150"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Padding" Value="10 5"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- CornerRadius="5"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- TextBlock.Foreground="{TemplateBinding Foreground}"
- Background="{TemplateBinding Background}"
- SnapsToDevicePixels="true">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="#59A862"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" Value="#59A862"/>
- <Setter Property="Cursor" Value="AppStarting"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" Value="#C8E2CB"/>
- <Setter Property="TextBlock.Foreground" Value="#498C51"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!--// Кнопка без фона //-->
- <Style x:Key="WithoutBackground" TargetType="Button">
- <Style.Setters>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="#498C51"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Padding" Value="10 5"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- TextBlock.Foreground="{TemplateBinding Foreground}"
- Background="Transparent"
- SnapsToDevicePixels="true">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="Cursor" Value="AppStarting"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="TextBlock.Foreground" Value="LightGray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!--// Кнопка перзагрузки //-->
- <ImageBrush x:Key="ic_reset_green" ImageSource="/Assets/icon/reset_green.png"/>
- <ImageBrush x:Key="ic_reset_white" ImageSource="/Assets/icon/reset_white.png"/>
- <Style x:Key="Restart" TargetType="Button">
- <Setter Property="Height" Value="30"/>
- <Setter Property="Width" Value="30"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="border"
- BorderThickness="0"
- Background="{StaticResource ic_reset_green}"/>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource ic_reset_white}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource ic_reset_white}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--// Кнопка удаления //-->
- <ImageBrush x:Key="ic_close_green" ImageSource="/Assets/icon/close_green.png"/>
- <ImageBrush x:Key="ic_close_green_light" ImageSource="/Assets/icon/close_green_light.png"/>
- <Style x:Key="Close" TargetType="Button">
- <Setter Property="Height" Value="15"/>
- <Setter Property="Width" Value="15"/>
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="VerticalAlignment" Value="Top"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Margin" Value="10"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="border"
- BorderThickness="0"
- Background="{StaticResource ic_close_green}"/>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource ic_close_green_light}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource ic_close_green_light}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- // Базовая маленькая кнопка //-->
- <Style x:Key="MinWith" TargetType="Button">
- <Style.Setters>
- <Setter Property="Background" Value="White"/>
- <Setter Property="Foreground" Value="#498C51"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="MinWidth" Value="30"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="#498C51"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Padding" Value="10 5"/>
- <Setter Property="Margin" Value="5 0"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- CornerRadius="5"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- TextBlock.Foreground="{TemplateBinding Foreground}"
- Background="{TemplateBinding Background}"
- SnapsToDevicePixels="true">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="#59A862"/>
- <Setter Property="Foreground" Value="White"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" Value="#59A862"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="Cursor" Value="AppStarting"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" Value="#C8E2CB"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="TextBlock.Foreground" Value="#498C51"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
|