enhance: add HighlightTextBrush prop for HighlightTextBlock

This commit is contained in:
NaBian committed 2021-12-23 23:06:23 +08:00
1 parent 12c6c39424
commit 534f1ef961
6 files changed
+34 -9

No files matched your search

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="TextBlockBaseStyle" TargetType="TextBlock">
@@ -11,4 +12,9 @@
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="HighlightTextBlockBaseStyle" TargetType="hc:HighlightTextBlock">
<Setter Property="HighlightBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="HighlightTextBrush" Value="{DynamicResource TextIconBrush}"/>
</Style>
</ResourceDictionary>
@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--默认样式-->
@@ -49,4 +50,6 @@
</Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="TextBlock"/>
<Style BasedOn="{StaticResource HighlightTextBlockBaseStyle}" TargetType="hc:HighlightTextBlock"/>
</ResourceDictionary>
@@ -1306,6 +1306,10 @@
<Style x:Key="TextBlockBoldBaseStyle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="TextBlock">
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style x:Key="HighlightTextBlockBaseStyle" TargetType="hc:HighlightTextBlock">
<Setter Property="HighlightBrush" Value="{DynamicResource PrimaryBrush}" />
<Setter Property="HighlightTextBrush" Value="{DynamicResource TextIconBrush}" />
</Style>
<Style x:Key="LabelBaseStyle" TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
@@ -3280,6 +3284,7 @@
<Setter Property="FontSize" Value="{StaticResource SubHeadFontSize}" />
</Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="TextBlock" />
<Style BasedOn="{StaticResource HighlightTextBlockBaseStyle}" TargetType="hc:HighlightTextBlock" />
<Style BasedOn="{StaticResource LabelBaseStyle}" TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
<Setter Property="BorderThickness" Value="1" />