1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3
xmlns:AvalonEdit="clr-namespace:ICSharpCode.AvalonEdit"
4
xmlns:editing="clr-namespace:ICSharpCode.AvalonEdit.Editing"
6
<Style TargetType="{x:Type AvalonEdit:TextEditor}">
7
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
8
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
9
<Setter Property="FlowDirection" Value="LeftToRight"/> <!-- AvalonEdit does not support RTL, so ensure we use LTR by default -->
10
<Setter Property="Template">
12
<ControlTemplate TargetType="{x:Type AvalonEdit:TextEditor}">
15
Name="PART_ScrollViewer"
16
CanContentScroll="True"
17
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
18
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
19
Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TextArea}"
20
VerticalContentAlignment="Top"
21
HorizontalContentAlignment="Left"
22
Background="{TemplateBinding Background}"
23
Padding="{TemplateBinding Padding}"
24
BorderBrush="{TemplateBinding BorderBrush}"
25
BorderThickness="{TemplateBinding BorderThickness}"
27
<ControlTemplate.Triggers>
28
<Trigger Property="WordWrap"
30
<Setter TargetName="PART_ScrollViewer"
31
Property="HorizontalScrollBarVisibility"
34
</ControlTemplate.Triggers>
40
<Style TargetType="{x:Type editing:TextArea}">
41
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
42
<Setter Property="SelectionBrush">
45
Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}"
49
<Setter Property="SelectionBorder">
51
<Pen Brush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
55
<Setter Property="SelectionForeground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
56
<Setter Property="Template">
58
<ControlTemplate TargetType="{x:Type editing:TextArea}">
59
<DockPanel Focusable="False">
60
<ItemsControl DockPanel.Dock="Left"
62
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=LeftMargins}">
63
<ItemsControl.ItemsPanel>
65
<StackPanel Orientation="Horizontal" />
67
</ItemsControl.ItemsPanel>
72
Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TextView}"/>
b'\\ No newline at end of file'