<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
                    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro">
    <Style x:Key="DefaultTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource MetroTextBox}">
        <Setter Property="FontSize" Value="14" />
        <Setter Property="BorderBrush" Value="{DynamicResource GrayBrush8}" />
        <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteContextMenu}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource DefaultErrorTemplate}" />
    </Style>

    <!-- Apply the default design to all text boxes -->
    <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}" />

    <Style x:Key="ConsoleTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}">
        <Setter Property="FontFamily" Value="Consolas" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
    </Style>
    
    <Style x:Key="SearchTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource SearchMetroTextBox}">
        <Setter Property="FontSize" Value="14" />
        <Setter Property="BorderBrush" Value="{DynamicResource GrayBrush8}" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteContextMenu}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource DefaultErrorTemplate}" />
        <Setter Property="mah:TextBoxHelper.Watermark" Value="{DynamicResource String_Watermark_Search}" />
        <Setter Property="Controls:TextBoxHelper.ClearTextButton" Value="True" />
        <Style.Triggers>
            <Trigger Property="Controls:TextBoxHelper.HasText" Value="True">
                <Setter Property="Controls:TextBoxHelper.ButtonContentTemplate" Value="{x:Null}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="TextBlockAsTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}">
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="IsReadOnly" Value="True" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

    <Style x:Key="BrowseFolderTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource MetroButtonTextBox}">
        <Setter Property="FontSize" Value="14" />
        <Setter Property="BorderBrush" Value="{DynamicResource GrayBrush8}" />
        <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteContextMenu}" />
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource DefaultErrorTemplate}" />
        <Setter Property="mah:TextBoxHelper.ButtonContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <!--  Modern - FolderOpen  -->
                    <ContentControl x:Name="PART_PackIcon" Width="{Binding RelativeSource={RelativeSource AncestorType=TextBox}, Path=(mah:TextBoxHelper.ButtonWidth), Mode=OneWay}" Height="{Binding RelativeSource={RelativeSource AncestorType=TextBox}, Path=(mah:TextBoxHelper.ButtonWidth), Mode=OneWay}" Padding="3" HorizontalAlignment="Center" VerticalAlignment="Center" Content="F1 M 19,50L 28,34L 63,34L 54,50L 19,50 Z M 19,28.0001L 35,28C 36,25 37.4999,24.0001 37.4999,24.0001L 48.75,24C 49.3023,24 50,24.6977 50,25.25L 50,28L 53.9999,28.0001L 53.9999,32L 27,32L 19,46.4L 19,28.0001 Z " Style="{DynamicResource PathIconContentControlStyle}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>