<Window x:Class="Trigger_Sample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Trigger_Sample"
        mc:Ignorable="d"
        Title="TriggerSample" Height="130" Width="300">
    <Window.Resources>
        <Style TargetType="TextBox">
            <Setter Property="Height" Value="25" />
            <Setter Property="Margin" Value="10" />
            <Setter Property="FontSize" Value="14" />

            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.Setters>
                        <Setter Property="Background" Value="LightGray" />
                    </Trigger.Setters>
                </Trigger>

                <Trigger Property="IsFocused" Value="True">
                    <Trigger.Setters>
                        <Setter Property="Background" Value="DarkGray" />
                        <Setter Property="Foreground" Value="White" />
                    </Trigger.Setters>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF2C2D32" Offset="0"/>
            <GradientStop Color="#FFCDD5F0" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    <StackPanel>
        <TextBox />
        <TextBox />
    </StackPanel>
</Window>