<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="TextBox">
        <Setter Property="FontFamily" Value="/PicView;component/Themes/Resources/fonts/#Roboto" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Background" Value="{StaticResource BackgroundColorBrushAlt}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
        <Setter Property="Foreground" Value="{StaticResource MainColorFadedBrush}" />
        <Setter Property="CaretBrush" Value="{StaticResource MainColorBrush}" />
        <Setter Property="Padding" Value="7,9.2,0,9.2" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}" />
        <Setter Property="IsReadOnly" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Border
                        x:Name="border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="0"
                        SnapsToDevicePixels="True">
                        <ScrollViewer
                            x:Name="PART_ContentHost"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Opacity" Value="0.56" />
                        </Trigger>
                        
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsReadOnly" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ResourceKey=ChosenColorBrush}" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                        
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource ResourceKey=BorderBrush}" />
                        </Trigger>
                        
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource ResourceKey=ChosenColorBrush}" />
                        </Trigger>
                        
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="border" Property="Background" Value="{StaticResource BackgroundColorBrush}"  />
                        </Trigger>

                        <Trigger Property="IsReadOnly" Value="False">
                            <Setter Property="Foreground" Value="{StaticResource MainColorBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>
</ResourceDictionary>