2025-07-31 20:12:01 +08:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-01-02 17:30:30 +08:00
|
|
|
xmlns:assists="clr-namespace:VariaStudio.Assists"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-07-31 20:12:01 +08:00
|
|
|
<!-- 标签对象 -->
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type Label}" x:Key="BasicLabelStyle">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
|
|
|
<Setter Property="Margin" Value="4" />
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="Padding" Value="20,8" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Label}">
|
2025-07-31 20:12:01 +08:00
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
CornerRadius="4"
|
2026-01-02 17:30:30 +08:00
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
|
SnapsToDevicePixels="true"
|
|
|
|
|
x:Name="contentBorder">
|
2025-07-31 20:12:01 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
RecognizesAccessKey="True"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
2026-01-02 17:30:30 +08:00
|
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
x:Name="contentPresenter" />
|
2025-07-11 09:20:23 +08:00
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
2025-10-10 11:19:58 +08:00
|
|
|
<Style BasedOn="{StaticResource BasicLabelStyle}" TargetType="{x:Type Label}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
2025-07-31 20:12:01 +08:00
|
|
|
<Style
|
2025-10-10 11:19:58 +08:00
|
|
|
BasedOn="{StaticResource BasicLabelStyle}"
|
2026-01-02 17:30:30 +08:00
|
|
|
TargetType="{x:Type Label}"
|
|
|
|
|
x:Key="LabelPrimary">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryNormalBrush}" />
|
|
|
|
|
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource PrimaryDisabledBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
</Style>
|
|
|
|
|
|
2025-07-31 20:12:01 +08:00
|
|
|
<Style
|
2025-10-10 11:19:58 +08:00
|
|
|
BasedOn="{StaticResource BasicLabelStyle}"
|
2026-01-02 17:30:30 +08:00
|
|
|
TargetType="{x:Type Label}"
|
|
|
|
|
x:Key="LabelDanger">
|
2025-08-25 17:30:53 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource ErrorBrush}" />
|
|
|
|
|
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource ErrorDisabledBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
</Style>
|
|
|
|
|
|
2025-07-31 20:12:01 +08:00
|
|
|
<Style
|
2025-10-10 11:19:58 +08:00
|
|
|
BasedOn="{StaticResource BasicLabelStyle}"
|
2026-01-02 17:30:30 +08:00
|
|
|
TargetType="{x:Type Label}"
|
|
|
|
|
x:Key="LabelSuccess">
|
2025-08-25 17:30:53 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
|
|
|
|
|
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource SuccessDisabledBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
</Style>
|
|
|
|
|
</ResourceDictionary>
|