|
9 | 9 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
10 | 10 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
11 | 11 |
|
| 12 | + <Thickness x:Key="RichTextBoxAccentBorderThemeThickness">0,0,0,1</Thickness> |
| 13 | + |
12 | 14 | <Style x:Key="DefaultRichTextBoxStyle" TargetType="{x:Type RichTextBox}">
|
13 | 15 | <Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
|
14 | 16 | <Setter Property="CaretBrush" Value="{DynamicResource TextControlForeground}" />
|
15 | 17 | <Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
|
16 |
| - <Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" /> |
17 |
| - <Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" /> |
| 18 | + <Setter Property="BorderBrush" Value="{DynamicResource TextControlElevationBorderBrush}" /> |
| 19 | + <Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
18 | 20 | <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
19 | 21 | <Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
| 22 | + <Setter Property="HorizontalAlignment" Value="Stretch" /> |
| 23 | + <Setter Property="VerticalAlignment" Value="Stretch" /> |
20 | 24 | <Setter Property="MinHeight" Value="34" />
|
21 | 25 | <Setter Property="BorderThickness" Value="1" />
|
22 | 26 | <Setter Property="Padding" Value="6,4" />
|
|
26 | 30 | <Setter Property="Template">
|
27 | 31 | <Setter.Value>
|
28 | 32 | <ControlTemplate TargetType="{x:Type RichTextBox}">
|
29 |
| - <Border |
30 |
| - x:Name="MainBorder" |
31 |
| - Padding="0" |
32 |
| - Background="{TemplateBinding Background}" |
33 |
| - BorderBrush="{TemplateBinding BorderBrush}" |
34 |
| - BorderThickness="{TemplateBinding BorderThickness}" |
35 |
| - CornerRadius="4" |
36 |
| - Focusable="False"> |
37 |
| - <ScrollViewer |
38 |
| - x:Name="PART_ContentHost" |
39 |
| - Margin="0,0,2,0" |
40 |
| - Padding="{TemplateBinding Padding}" |
41 |
| - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
42 |
| - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
43 |
| - Foreground="{TemplateBinding Foreground}" |
44 |
| - HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" |
45 |
| - VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" /> |
46 |
| - </Border> |
| 33 | + <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"> |
| 34 | + <Border |
| 35 | + x:Name="MainBorder" |
| 36 | + Padding="0" |
| 37 | + Background="{TemplateBinding Background}" |
| 38 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 39 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 40 | + CornerRadius="4" |
| 41 | + Focusable="False"> |
| 42 | + <ScrollViewer |
| 43 | + x:Name="PART_ContentHost" |
| 44 | + Margin="0,0,2,0" |
| 45 | + Padding="{TemplateBinding Padding}" |
| 46 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 47 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 48 | + Foreground="{TemplateBinding Foreground}" |
| 49 | + HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" |
| 50 | + VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" /> |
| 51 | + </Border> |
| 52 | + <Border |
| 53 | + x:Name="AccentBorder" |
| 54 | + HorizontalAlignment="Stretch" |
| 55 | + VerticalAlignment="Stretch" |
| 56 | + BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}" |
| 57 | + BorderThickness="{StaticResource RichTextBoxAccentBorderThemeThickness}" |
| 58 | + CornerRadius="{DynamicResource ControlCornerRadius}" /> |
| 59 | + </Grid> |
47 | 60 | <ControlTemplate.Triggers>
|
48 | 61 | <MultiTrigger>
|
49 | 62 | <MultiTrigger.Conditions>
|
|
54 | 67 | <Setter Property="Background" Value="{DynamicResource TextControlBackgroundPointerOver}" />
|
55 | 68 | </MultiTrigger>
|
56 | 69 | <Trigger Property="IsFocused" Value="True">
|
| 70 | + <Setter TargetName="AccentBorder" Property="BorderThickness" Value="0,0,0,2" /> |
| 71 | + <Setter TargetName="AccentBorder" Property="BorderBrush" Value="{DynamicResource TextControlFocusedBorderBrush}" /> |
57 | 72 | <Setter Property="Background" Value="{DynamicResource TextControlBackgroundFocused}" />
|
58 | 73 | </Trigger>
|
59 | 74 | </ControlTemplate.Triggers>
|
60 |
| - </ControlTemplate> |
| 75 | + </ControlTemplate> |
61 | 76 | </Setter.Value>
|
62 | 77 | </Setter>
|
63 | 78 | </Style>
|
|
0 commit comments