123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!--Cтиль контрола при фокусе-->
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="2"
- StrokeDashArray="1 2"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- SnapsToDevicePixels="true"
- StrokeThickness="1"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--Цвета для кнопки-->
- <SolidColorBrush x:Key="Button.Static.Background" Color="#FFFF8000"/>
- <SolidColorBrush x:Key="Button.Static.Border" Color="White"/>
- <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFFF8000"/>
- <SolidColorBrush x:Key="Button.MouseOver.Border" Color="Gray"/>
- <SolidColorBrush x:Key="Button.Pressed.Background" Color="Transparent"/>
- <SolidColorBrush x:Key="Button.Pressed.Border" Color="Black"/>
- <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
- <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
- <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
- <!--Основной стиль кнопок-->
- <Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
- <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="Padding" Value="3"/>
- <Setter Property="Margin" Value="5"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontFamily" Value="Calibri"/>
- <Setter Property="Height" Value="35"/>
- <Setter Property="BorderThickness" Value="3"/>
- <Setter Property="Template">
- <!--Остальные установки стилей для кнопок-->
- <Setter.Value>
-
- <ControlTemplate TargetType="{x:Type Button}">
-
- <!--Закругленная рамка для кнопок-->
- <Border x:Name="border"
- CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="true">
-
- <ContentPresenter x:Name="contentPresenter"
- Focusable="False"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
-
- <!--Триггеры для кнопок-->
- <ControlTemplate.Triggers>
-
- <!--По умолчанию-->
- <Trigger Property="IsDefaulted" Value="true">
- <Setter Property="BorderBrush"
- TargetName="border"
- Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
- </Trigger>
-
- <!--При наведении-->
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background"
- TargetName="border"
- Value="{StaticResource Button.MouseOver.Background}"/>
- <Setter Property="BorderBrush"
- TargetName="border"
- Value="{StaticResource Button.MouseOver.Border}"/>
- </Trigger>
-
- <!--При нажатии-->
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background"
- TargetName="border"
- Value="{StaticResource Button.Pressed.Background}"/>
- <Setter Property="BorderBrush"
- TargetName="border"
- Value="{StaticResource Button.Pressed.Border}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--Основной стиль контейнера с элементами-->
- <Style x:Key="GroupBoxStyle" TargetType="GroupBox">
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderBrush" Value="White"/>
- <Setter Property="FontFamily" Value="Calibri"/>
- <Setter Property="FontSize" Value="16"/>
- </Style>
-
- <!--Основной стиль PasswordBox-->
- <Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="BorderBrush" Value="Gray"/>
- <Setter Property="Width" Value="120"/>
- </Style>
-
- <!--Основной стиль TextBox-->
- <Style x:Key="TextBoxStyle" TargetType="TextBox">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Background" Value="White"/>
- <Setter Property="BorderBrush" Value="Gray"/>
- <Setter Property="Width" Value="120"/>
- </Style>
- </ResourceDictionary>
|