App.xaml
<Application x:Class="WpfThemeApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfThemeApp"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Theme/BlueTheme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Resource File
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Color Palette -->
<Color x:Key="PrimaryBlueColor">#FF1565C0</Color>
<Color x:Key="SecondaryBlueColor">#FF1E88E5</Color>
<Color x:Key="AccentBlueColor">#FF64B5F6</Color>
<Color x:Key="LightBlueColor">#FFBBDEFB</Color>
<Color x:Key="DarkBlueColor">#FF0D47A1</Color>
<Color x:Key="DangerColor">#FF3F34</Color>
<!-- Brushes -->
<SolidColorBrush x:Key="PrimaryBlueBrush" Color="{StaticResource PrimaryBlueColor}" />
<SolidColorBrush x:Key="SecondaryBlueBrush" Color="{StaticResource SecondaryBlueColor}" />
<SolidColorBrush x:Key="AccentBlueBrush" Color="{StaticResource AccentBlueColor}" />
<SolidColorBrush x:Key="LightBlueBrush" Color="{StaticResource LightBlueColor}" />
<SolidColorBrush x:Key="DarkBlueBrush" Color="{StaticResource DarkBlueColor}" />
<SolidColorBrush x:Key="TextOnBlueBrush" Color="White" />
<SolidColorBrush x:Key="OrangeRedBrush" Color="{StaticResource DangerColor}"/>
<!-- Window Background -->
<Style TargetType="Window">
<Setter Property="Background" Value="{StaticResource LightBlueBrush}" />
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
</Style>
<!-- Button Style -->
<Style TargetType="Button">
<Setter Property="Background" Value="{StaticResource PrimaryBlueBrush}" />
<Setter Property="Foreground" Value="{StaticResource TextOnBlueBrush}" />
<Setter Property="Padding" Value="8,4" />
<Setter Property="Margin" Value="4" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource SecondaryBlueBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource DarkBlueBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TextBox Style -->
<Style TargetType="TextBox">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryBlueBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="4" />
<Setter Property="Margin" Value="4" />
<Setter Property="CaretBrush" Value="{StaticResource PrimaryBlueBrush}" />
</Style>
<!-- Label Style -->
<Style TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Margin" Value="2" />
</Style>
<!-- DataGrid Style -->
<Style TargetType="DataGrid">
<Setter Property="Background" Value="{StaticResource LightBlueBrush}" />
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryBlueBrush}" />
<Setter Property="RowBackground" Value="White" />
<Setter Property="AlternatingRowBackground" Value="{StaticResource LightBlueBrush}" />
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource AccentBlueBrush}" />
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource AccentBlueBrush}" />
</Style>
<!-- DataGridColumnHeader Style -->
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{StaticResource PrimaryBlueBrush}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Padding" Value="6" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="BorderThickness" Value="0,0,1,1" />
</Style>
<!-- ListView Style -->
<Style TargetType="ListView">
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryBlueBrush}" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<!-- ListViewItem Style -->
<Style TargetType="ListViewItem">
<Setter Property="Padding" Value="6" />
<Setter Property="Margin" Value="2" />
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="{StaticResource DarkBlueBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource LightBlueBrush}" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="{TemplateBinding Padding}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource LightBlueBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource SecondaryBlueBrush}" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Custom DeleteToAdd Button Style -->
<Style x:Key="CustomDeleteButton" TargetType="Button">
<Setter Property="Background" Value="#FF6347"/>
<!-- Tomato Red -->
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="BorderBrush" Value="#B22222"/>
<!-- Firebrick -->
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<!-- Hover -->
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#DC143C"/>
<!-- Crimson -->
<Setter Property="BorderBrush" Value="#8B0000"/>
<!-- DarkRed -->
</Trigger>
<!-- Pressed -->
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#B22222"/>
<!-- Firebrick -->
<Setter Property="BorderBrush" Value="#800000"/>
<!-- Maroon -->
</Trigger>
<!-- Disabled -->
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFC0CB"/>
<!-- Light Pink -->
<Setter Property="Foreground" Value="Gray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>