123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!-- Кнопки скрытия, свертывания и закрытия -->
- <Style x:Key="NavViewButtonsStyle" TargetType="{x:Type Button}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryHomingTwoColor}"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Height" Value="25"/>
- <Setter Property="Width" Value="25"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="5" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="{DynamicResource SecundaryBackgroundColor}"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True"/>
- <Condition Property="Tag" Value="IsCloseButton"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" Value="{DynamicResource btnClose}"/>
- </MultiTrigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" Value="{DynamicResource SecundaryBackgroundColor}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!-- Отделы -->
- <Style TargetType="{x:Type Button}">
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Padding" Value="5"/>
- <Setter Property="Margin" Value="5"/>
- <Setter Property="Height" Value="30"/>
- <Setter Property="Background" Value="{DynamicResource PrimaryBackgroundColor}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryHomingTwoColor}" />
- <Setter Property="FontSize" Value="12"/>
- <Setter Property="BorderThickness" Value="0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="5"
- BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="{DynamicResource PrimaryHomingColor}"/>
- <Setter Property="Foreground" Value="#EBF6F5"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" Value="{DynamicResource PrimaryHomingTwoColor}"/>
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <!-- Фильтрация -->
- <Style x:Key="ComboboxButtonStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Background="White" x:Name="border" CornerRadius="0,5,5,0" BorderThickness="0,2,2,2" BorderBrush="{DynamicResource PrimaryHomingColor}">
- <ContentPresenter />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ComboboxTextBoxStyle" TargetType="{x:Type TextBox}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Grid>
- <Border CornerRadius="5,0,0,5" BorderThickness="2,2,0,2" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource PrimaryHomingColor}">
- <ScrollViewer x:Name="PART_ContentHost"/>
- </Border>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type ComboBox}">
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextColor}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ComboBox}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition MaxWidth="18"/>
- </Grid.ColumnDefinitions>
- <TextBox Name="PART_EditableTextBox" Style="{StaticResource ComboboxTextBoxStyle}" Padding="5,0,0,0" Height="{TemplateBinding Height}"/>
- <ToggleButton Grid.Column="1" Margin="0" Height="{TemplateBinding Height}" Style="{StaticResource ComboboxButtonStyle}" Focusable="False"
- IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
- <Path Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{DynamicResource PrimaryHomingColor}" />
- </ToggleButton>
- <ContentPresenter Name="ContentSite" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
- <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
- <Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
- <Border x:Name="DropDownBorder" BorderThickness="2" CornerRadius="5"
- BorderBrush="{DynamicResource PrimaryBackgroundColor}" Background="{DynamicResource SecundaryBackgroundColor}"/>
- <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
- </ScrollViewer>
- </Grid>
- </Popup>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- text box -->
- <Style TargetType="{x:Type TextBox}">
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextColor}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border Background="{TemplateBinding Background}" x:Name="Bd" BorderBrush="{DynamicResource PrimaryHomingColor}" BorderThickness="2" CornerRadius="5">
- <ScrollViewer x:Name="PART_ContentHost"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" TargetName="Bd"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource PrimaryTextColor}"/>
- <Setter TargetName="Bd" Property="BorderThickness" Value="2"/>
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource PrimaryHomingTwoColor}"/>
- <Setter TargetName="Bd" Property="BorderThickness" Value="2"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- text block -->
- <Style TargetType="TextBlock">
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextColor}"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- </Style>
- </ResourceDictionary>
|