<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:FooEditEngine.WPF">
    <SolidColorBrush x:Key="SolidBorderBrush" Color="{x:Static SystemColors.WindowFrameColor}" />
    <Style TargetType="{x:Type local:FooTextBox}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="MinWidth" Value="120"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FooTextBox}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Trigger.Setters>
                                <Setter Property="Foreground" Value="{x:Static SystemColors.GrayTextColor}" />
                                <Setter Property="LineMarker" Value="#EEE" />
                                <Setter Property="Background" Value="#EEE" />
                            </Trigger.Setters>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Border BorderBrush="{StaticResource SolidBorderBrush}"
                            BorderThickness="1"
                            Padding="2">
                        <Grid x:Name="PART_Grid">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <ScrollBar x:Name="PART_VerticalScrollBar"
                                       Orientation="Vertical"
                                       Grid.Row="0"
                                       Grid.Column="1"
                                       Visibility="Visible"/>
                            <ScrollBar x:Name="PART_HorizontalScrollBar"
                                       Orientation="Horizontal"
                                       Grid.Row="1"
                                       Grid.Column="0"
                                       Visibility="Visible"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
