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

    <Style TargetType="local:FooTextBox">
        <Setter Property="MinWidth" Value="120"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Foreground" Value="{StaticResource SystemColorWindowTextColor}"/>
        <Setter Property="InsertCaret" Value="{StaticResource SystemColorWindowTextColor}"/>
        <Setter Property="OverwriteCaret" Value="{StaticResource SystemColorWindowTextColor}"/>
        <Setter Property="Background" Value="{StaticResource SystemColorWindowColor}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:FooTextBox">
                    <Border
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="PART_Grid">
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ScrollBar x:Name="PART_VerticalScrollBar"
                                       Orientation="Vertical"
                                       Grid.Row="0"
                                       Grid.Column="1"
                                       IndicatorMode="MouseIndicator"
                                       Visibility="Visible"/>
                            <ScrollBar x:Name="PART_HorizontalScrollBar"
                                       Orientation="Horizontal"
                                       Grid.Row="1"
                                       Grid.Column="0"
                                       IndicatorMode="MouseIndicator"
                                       Visibility="Visible"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
