<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
                    xmlns:controls="clr-namespace:XamlTheme.Controls">

    <Style TargetType="{x:Type controls:TextEditorEx}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:TextEditorEx}">
                    <Border Background="{TemplateBinding Background}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            BorderBrush="{TemplateBinding BorderBrush}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <avalonedit:TextEditor x:Name="PART_TextEditor" Background="Transparent"
                                               HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                               VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" 
                                               SyntaxHighlighting="{TemplateBinding SyntaxHighlighting}"
                                               LineNumbersForeground="#2B91AF"
                                               IsReadOnly="{TemplateBinding IsReadOnly}"
                                               IsModified="{Binding IsModified,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                                               WordWrap="{TemplateBinding WordWrap}"
                                               ShowLineNumbers="{TemplateBinding ShowLineNumbers}"
                                               FontFamily="{TemplateBinding FontFamily}"
                                               FontSize="{TemplateBinding FontSize}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>