﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    >
    <!-- [[ Aero2.NormalColor]] -->

    <SolidColorBrush x:Key="TextBox. Static. Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="TextBox. Static. Border"
                     Color="#a6a6a6" />
    <SolidColorBrush x:Key="TextBox. MouseOver. Border"
                     Color="Black" />
    <SolidColorBrush x:Key="TextBox. Focus. Border"
                     Color="#0078d4" />

    <! --=================================================================
        TextBoxBase
    ==================================================================-->
    <Style x:Key="{x:Type TextBoxBase}"
           TargetType="{x:Type TextBoxBase}">
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors. WindowBrushKey}}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource TextBox. Static. Border}" />
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors. ControlTextBrushKey}}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="KeyboardNavigation. TabNavigation"
                Value="None" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="ScrollViewer. PanningMode"
                Value="VerticalFirst" />
        <Setter Property="Stylus. IsFlicksEnabled"
                Value="False" />
        <Setter Property="Padding"
                Value="12,6" />
        <Setter Property="Template">
            <Setter. Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border x:Name="border"
                            CornerRadius="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="PART_ContentHost"
                                      Focusable="false"
                                      Padding="{TemplateBinding Padding}"
                                      HorizontalScrollBarVisibility="Hidden"
                                      VerticalScrollBarVisibility="Hidden" />
                    </Border>
                    <ControlTemplate. Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    Value="#f4f4f4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="border"
                                    Property="BorderBrush"
                                    Value="{StaticResource TextBox. MouseOver. Border}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter TargetName="border"
                                    Property="BorderBrush"
                                    Value="{StaticResource TextBox. Focus. Border}" />
                        </Trigger>
                    </ControlTemplate. Triggers>
                </ControlTemplate>
            </Setter. Value>
        </Setter>
        
    </Style>

    <! --=================================================================
        PasswordBox
    ==================================================================-->
    <Style x:Key="{x:Type PasswordBox}"
           TargetType="{x:Type PasswordBox}">
        <Setter Property="PasswordChar"
                Value="●" />
        <Setter Property="Background"
                Value="{DynamicResource {x:Static SystemColors. WindowBrushKey}}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource TextBox. Static. Border}" />
        <Setter Property="Foreground"
                Value="{DynamicResource {x:Static SystemColors. ControlTextBrushKey}}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="KeyboardNavigation. TabNavigation"
                Value="None" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="FocusVisualStyle"
                Value="{x:Null}" />
        <Setter Property="AllowDrop"
                Value="true" />
        <Setter Property="ScrollViewer. PanningMode"
                Value="VerticalFirst" />
        <Setter Property="Stylus. IsFlicksEnabled"
                Value="False" />
        <Setter Property="Padding"
                Value="12,6" />
        <Setter Property="Template">
            <Setter. Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border x:Name="border"
                            CornerRadius="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="PART_ContentHost"
                                      Focusable="false"
                                      HorizontalScrollBarVisibility="Hidden"
                                      VerticalScrollBarVisibility="Hidden" />
                    </Border>
                    <ControlTemplate. Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Background"
                                    Value="#f4f4f4" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="border"
                                    Property="BorderBrush"
                                    Value="{StaticResource TextBox. MouseOver. Border}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused"
                                 Value="true">
                            <Setter TargetName="border"
                                    Property="BorderBrush"
                                    Value="{StaticResource TextBox. Focus. Border}" />
                        </Trigger>
                    </ControlTemplate. Triggers>
                </ControlTemplate>
            </Setter. Value>
        </Setter>
        <Style. Triggers>
           
            
        </Style. Triggers>
    </Style>


    <!-- [[ AeroLite. NormalColor, Aero2.NormalColor, Classic]] -->

    <! --=================================================================
        TextBox
    ==================================================================-->
    <Style x:Key="{x:Type TextBox}"
           BasedOn="{StaticResource {x:Type TextBoxBase}}"
           TargetType="{x:Type TextBox}">
    </Style>
    <! --=================================================================
        RichTextBox
    ==================================================================-->
    <Style x:Key="{x:Type RichTextBox}"
           BasedOn="{StaticResource {x:Type TextBoxBase}}"
           TargetType="{x:Type RichTextBox}">
        <Style. Resources>
            <Style x:Key="{x:Type FlowDocument}"
                   TargetType="{x:Type FlowDocument}">
                <Setter Property="OverridesDefaultStyle"
                        Value="true" />
            </Style>
            <Style x:Key="{x:Type Hyperlink}"
                   BasedOn="{StaticResource {x:Type Hyperlink}}"
                   TargetType="{x:Type Hyperlink}">
                <Style. Triggers>
                    <Trigger Property="IsMouseOver"
                             Value="true">
                        <Setter Property="Foreground"
                                Value="Blue" />
                    </Trigger>
                    <Trigger Property="IsEnabled"
                             Value="false">
                        <Setter Property="Foreground"
                                Value="{DynamicResource {x:Static SystemColors. GrayTextBrushKey}}" />
                    </Trigger>
                </Style. Triggers>
            </Style>
        </Style. Resources>
        <Setter Property="MinWidth"
                Value="10" />
    </Style>
</ResourceDictionary>