Offload Control styles from App.xaml to a Styles folder

This commit is contained in:
Caeden Statia 2020-02-01 08:29:07 -08:00
parent b952efc5ee
commit 501e3e5322
13 changed files with 403 additions and 344 deletions

View file

@ -6,351 +6,24 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Dark.xaml"/>
<!--Load default theme. Currently it's Dark, not sure if you want to change it to Light.-->
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
<!--Load SVG icons, courtesy of lolPants.-->
<ResourceDictionary x:Name="Icons" Source="Resources/Icons.xaml"/>
<!--Load Styles needed for the Theme engine to work.-->
<ResourceDictionary x:Name="Button_Style" Source="Styles/Button.xaml"/>
<ResourceDictionary x:Name="Label_Style" Source="Styles/Label.xaml"/>
<ResourceDictionary x:Name="TextBlock_Style" Source="Styles/TextBlock.xaml"/>
<ResourceDictionary x:Name="GridViewColumnHeader_Style" Source="Styles/GridViewColumnHeader.xaml"/>
<ResourceDictionary x:Name="ListView_Style" Source="Styles/ListView.xaml"/>
<ResourceDictionary x:Name="ListViewItem_Style" Source="Styles/ListViewItem.xaml"/>
<ResourceDictionary x:Name="CheckBox_Style" Source="Styles/CheckBox.xaml"/>
<ResourceDictionary x:Name="Rectangle_Style" Source="Styles/Rectangle.xaml"/>
<ResourceDictionary x:Name="ComboBoxItem_Style" Source="Styles/ComboBoxItem.xaml"/>
<ResourceDictionary x:Name="ComboBox_Style" Source="Styles/ComboBox.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button">
<Setter Property="Background"
Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderBrush"
Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Foreground"
Value="{DynamicResource TextColor}" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="MinHeight"
Value="25" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Chrome"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource ButtonOutline}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true"
TextBlock.Foreground="{DynamicResource TextColor}">
<ContentPresenter Name="Presenter"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextBlock.Foreground="{DynamicResource TextColor}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHighlightedBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource TextHighlighted}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonClickedBackground}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabledBackground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Label"
>
<Setter Property="Label.FontFamily"
Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Label.FontSize"
Value="13" />
<Setter Property="Label.Foreground"
Value="{DynamicResource TextColor}" />
<Setter Property="Label.Height"
Value="Auto" />
<Setter Property="Label.Width"
Value="Auto" />
<Setter Property="Label.HorizontalAlignment"
Value="Center" />
<Setter Property="Label.VerticalAlignment"
Value="Center" />
<Setter Property="Label.HorizontalContentAlignment"
Value="Center" />
<Setter Property="Label.VerticalContentAlignment"
Value="Center" />
<Setter Property="Label.FocusVisualStyle"
Value="{x:Null}" />
<Setter Property="TextOptions.TextFormattingMode"
Value="Display" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextColor}"/>
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="TextTrimming" Value="None"/>
</Style>
<Style TargetType="GridViewColumnHeader">
<Setter Property="GridViewColumnHeader.Foreground" Value="{DynamicResource TextColor}"/>
<Setter Property="GridViewColumnHeader.Background" Value="{DynamicResource 2ndBackgroundBrush}"/>
<Setter Property="GridViewColumnHeader.BorderBrush" Value="{DynamicResource ModColumnBorderBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid SnapsToDevicePixels="True">
<Border Name="HeaderBorder" BorderThickness="0,1,0,1"
BorderBrush="{DynamicResource ModColumnBorderBrush}"
Background="{DynamicResource 2ndBackgroundBrush}">
<Grid>
<Rectangle
Name="UpperHighlight"
Visibility="Collapsed"
Fill="#FFE3F7FF" />
<Border
Grid.RowSpan="2"
Padding="{TemplateBinding Padding}">
<ContentPresenter
Name="HeaderContent"
Margin="0,0,0,1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<Border
Name="HeaderHoverBorder"
BorderThickness="1,0,1,1"
Margin="1,1,0,0" />
<Border
Name="HeaderPressBorder"
BorderThickness="1,1,1,0"
Margin="1,0,0,1" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible"/>
<Setter TargetName="UpperHighlight" Property="Fill" Value="{DynamicResource ModColumnHeaderHighlighted}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListView">
<Setter Property="ListView.Background" Value="{DynamicResource ModListBackground}"/>
</Style>
<Style TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
CornerRadius="2"
SnapsToDevicePixels="True">
<Border
Name="InnerBorder"
CornerRadius="1"
BorderThickness="1">
<Grid>
<Rectangle
Name="UpperHighlight"
Visibility="Collapsed"
Fill="#75FFFFFF" />
<GridViewRowPresenter
Grid.RowSpan="2"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemHighlighted}"/>
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemSelected}"/>
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Hidden"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid
Name="templateRoot"
SnapsToDevicePixels="True"
Background="{DynamicResource CheckboxDefaultOutlineColor}">
<Grid.ColumnDefinitions>
<ColumnDefinition
Width="Auto" />
<ColumnDefinition
Width="*" />
</Grid.ColumnDefinitions>
<Border
Name="checkBoxBorder"
Margin="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{DynamicResource CheckboxDefaultBackground}"
BorderBrush="{TemplateBinding BorderBrush}">
<Grid
Name="markGrid">
<Path
Name="optionMark"
Opacity="0"
Stretch="None"
Margin="1"
Data="F1 M9.97498,1.22334 L4.6983,9.09834 L4.52164,9.09834 L0,5.19331 L1.27664,3.52165 L4.255,6.08833 L8.33331,1.52588E-05 L9.97498,1.22334"
Fill="{DynamicResource CheckboxTickColor}" />
<Rectangle
Name="indeterminateMark"
Margin="2"
Opacity="0"
Fill="{DynamicResource CheckboxTickColor}" />
</Grid>
</Border>
<ContentPresenter
Name="contentPresenter"
RecognizesAccessKey="True"
Grid.Column="1"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Focusable="False" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxHoveredBackground}" />
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxDisabledBackground}" />
<Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{DynamicResource CheckboxDisabledOutlineColor}" />
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxPressedBackground}"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="1" />
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="0" />
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="{x:Null}">
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="0" />
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="{DynamicResource ModAssistantBackground}"/>
</Style>
<Style TargetType="ComboBoxItem" x:Key="{x:Type ComboBoxItem}">
<Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="4,1" />
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxOutline}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border
Name="Bd"
BorderBrush="{DynamicResource ComboBoxOutline}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{DynamicResource ComboBoxBackground}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource SystemColors.GrayTextBrushKey}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
<Condition Property="UIElement.IsKeyboardFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxTextColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxOutline}"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>

View file

@ -80,7 +80,7 @@
<ColumnDefinition Width="115" />
</Grid.ColumnDefinitions>
<TextBlock Name="MainTextBlock" Padding="5" Height="40" VerticalAlignment="Bottom" Background="LightGray" FontSize="20" />
<TextBlock Name="MainTextBlock" Padding="5" Height="40" VerticalAlignment="Bottom" Background="{DynamicResource BottomStatusBarBackground}" FontSize="20" />
<Button Grid.Column="1" Name="InfoButton" IsEnabled="False" Height="40" Width="100" HorizontalAlignment="Right" Margin="0,10,0,0" Click="InfoButton_Click">
<StackPanel>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Bottom">

View file

@ -119,6 +119,46 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Button.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\CheckBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBoxItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\GridViewColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Label.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListViewItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Rectangle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\TextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Dark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View file

@ -0,0 +1,44 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="25" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Chrome"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource ButtonOutline}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true"
TextBlock.Foreground="{DynamicResource TextColor}">
<ContentPresenter Name="Presenter"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextBlock.Foreground="{DynamicResource TextColor}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHighlightedBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource TextHighlighted}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonClickedBackground}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabledBackground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,76 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="CheckBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid
Name="templateRoot"
SnapsToDevicePixels="True"
Background="{DynamicResource CheckboxDefaultOutlineColor}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Name="checkBoxBorder"
Margin="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{DynamicResource CheckboxDefaultBackground}"
BorderBrush="{TemplateBinding BorderBrush}">
<Grid Name="markGrid">
<Path
Name="optionMark"
Opacity="0"
Stretch="None"
Margin="1"
Data="F1 M9.97498,1.22334 L4.6983,9.09834 L4.52164,9.09834 L0,5.19331 L1.27664,3.52165 L4.255,6.08833 L8.33331,1.52588E-05 L9.97498,1.22334"
Fill="{DynamicResource CheckboxTickColor}" />
<Rectangle
Name="indeterminateMark"
Margin="2"
Opacity="0"
Fill="{DynamicResource CheckboxTickColor}" />
</Grid>
</Border>
<ContentPresenter
Name="contentPresenter"
RecognizesAccessKey="True"
Grid.Column="1"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Focusable="False" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxHoveredBackground}" />
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxHoveredTickColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxDisabledBackground}" />
<Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{DynamicResource CheckboxDisabledOutlineColor}" />
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
<Setter TargetName="indeterminateMark" Property="Fill" Value="{DynamicResource CheckboxDisabledTickColor}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="checkBoxBorder" Property="Background" Value="{DynamicResource CheckboxPressedBackground}"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="1" />
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="0" />
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="{x:Null}">
<Setter TargetName="optionMark" Property="UIElement.Opacity" Value="0" />
<Setter TargetName="indeterminateMark" Property="UIElement.Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxTextColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxOutline}"/>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,82 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="ComboBoxItem" x:Key="{x:Type ComboBoxItem}">
<Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="4,1" />
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxOutline}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border
Name="Bd"
BorderBrush="{DynamicResource ComboBoxOutline}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{DynamicResource ComboBoxBackground}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource SystemColors.GrayTextBrushKey}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
<Condition Property="UIElement.IsKeyboardFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="False" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="False" />
<Condition Property="UIElement.IsMouseOver" Value="True" />
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBoxHighlighted}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,51 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="GridViewColumnHeader">
<Setter Property="GridViewColumnHeader.Foreground" Value="{DynamicResource TextColor}"/>
<Setter Property="GridViewColumnHeader.Background" Value="{DynamicResource 2ndBackgroundBrush}"/>
<Setter Property="GridViewColumnHeader.BorderBrush" Value="{DynamicResource ModColumnBorderBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid SnapsToDevicePixels="True">
<Border Name="HeaderBorder" BorderThickness="0,1,0,1"
BorderBrush="{DynamicResource ModColumnBorderBrush}"
Background="{DynamicResource 2ndBackgroundBrush}">
<Grid>
<Rectangle
Name="UpperHighlight"
Visibility="Collapsed"
Fill="#FFE3F7FF" />
<Border
Grid.RowSpan="2"
Padding="{TemplateBinding Padding}">
<ContentPresenter
Name="HeaderContent"
Margin="0,0,0,1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<Border
Name="HeaderHoverBorder"
BorderThickness="1,0,1,1"
Margin="1,1,0,0" />
<Border
Name="HeaderPressBorder"
BorderThickness="1,1,1,0"
Margin="1,0,0,1" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible"/>
<Setter TargetName="UpperHighlight" Property="Fill" Value="{DynamicResource ModColumnHeaderHighlighted}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,28 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Label"
>
<Setter Property="Label.FontFamily"
Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Label.FontSize"
Value="13" />
<Setter Property="Label.Foreground"
Value="{DynamicResource TextColor}" />
<Setter Property="Label.Height"
Value="Auto" />
<Setter Property="Label.Width"
Value="Auto" />
<Setter Property="Label.HorizontalAlignment"
Value="Center" />
<Setter Property="Label.VerticalAlignment"
Value="Center" />
<Setter Property="Label.HorizontalContentAlignment"
Value="Center" />
<Setter Property="Label.VerticalContentAlignment"
Value="Center" />
<Setter Property="Label.FocusVisualStyle"
Value="{x:Null}" />
<Setter Property="TextOptions.TextFormattingMode"
Value="Display" />
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="ListView">
<Setter Property="ListView.Background" Value="{DynamicResource ModListBackground}"/>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,42 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
CornerRadius="2"
SnapsToDevicePixels="True">
<Border
Name="InnerBorder"
CornerRadius="1"
BorderThickness="1">
<Grid>
<Rectangle
Name="UpperHighlight"
Visibility="Collapsed"
Fill="#75FFFFFF" />
<GridViewRowPresenter
Grid.RowSpan="2"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemHighlighted}"/>
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemSelected}"/>
<Setter TargetName="UpperHighlight" Property="Visibility" Value="Hidden"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="{DynamicResource ModAssistantBackground}"/>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="TextBlock">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextColor}"/>
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="TextTrimming" Value="None"/>
</Style>
</ResourceDictionary>