This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

View File

@@ -1,19 +1,12 @@
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
All Rights Reserved.
-->
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFluent.Controls">
xmlns:controls="clr-namespace:WPFluent.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="DefaultRichTextBoxStyle" TargetType="{x:Type RichTextBox}">
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
<Setter Property="CaretBrush" Value="{DynamicResource TextControlForeground}" />
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
<Style TargetType="{x:Type RichTextBox}" x:Key="DefaultRichTextBoxStyle">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="CaretBrush" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
@@ -28,22 +21,22 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type RichTextBox}">
<Border
x:Name="MainBorder"
Padding="0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Focusable="False">
Focusable="False"
Padding="0"
x:Name="MainBorder">
<controls:PassiveScrollViewer
x:Name="PART_ContentHost"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
Margin="0,0,2,0"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" />
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
x:Name="PART_ContentHost" />
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
@@ -52,10 +45,10 @@
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundPointerOver}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
</MultiTrigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundFocused}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorInputActiveBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -66,9 +59,9 @@
<Style BasedOn="{StaticResource DefaultRichTextBoxStyle}" TargetType="{x:Type RichTextBox}" />
<Style
x:Key="DefaultUiRichTextBoxStyle"
BasedOn="{StaticResource DefaultRichTextBoxStyle}"
TargetType="{x:Type controls:RichTextBox}">
TargetType="{x:Type controls:RichTextBox}"
x:Key="DefaultUiRichTextBoxStyle">
<Style.Triggers>
<Trigger Property="IsTextSelectionEnabled" Value="True">