整理代码

This commit is contained in:
GG Z
2026-02-20 15:31:44 +08:00
parent 94cf3f3266
commit 9f121cfc7f
149 changed files with 4063 additions and 6964 deletions

View File

@@ -1,9 +1,9 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:assists="clr-namespace:Melskin.Assists"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:assists="clr-namespace:Melskin.Assists">
<!-- 标签对象 -->
<Style TargetType="{x:Type Label}" x:Key="BasicLabelStyle">
<Style x:Key="BasicLabelStyle" TargetType="{x:Type Label}">
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
@@ -18,24 +18,24 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Label}">
<Border
x:Name="contentBorder"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="true"
x:Name="contentBorder">
SnapsToDevicePixels="true">
<ContentPresenter
x:Name="contentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextElement.Foreground="{TemplateBinding Foreground}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
x:Name="contentPresenter" />
TextElement.Foreground="{TemplateBinding Foreground}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
<Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -46,25 +46,25 @@
<Style BasedOn="{StaticResource BasicLabelStyle}" TargetType="{x:Type Label}" />
<Style
x:Key="LabelPrimary"
BasedOn="{StaticResource BasicLabelStyle}"
TargetType="{x:Type Label}"
x:Key="LabelPrimary">
TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryNormalBrush}" />
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource PrimaryDisabledBrush}" />
</Style>
<Style
x:Key="LabelDanger"
BasedOn="{StaticResource BasicLabelStyle}"
TargetType="{x:Type Label}"
x:Key="LabelDanger">
TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource ErrorBrush}" />
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource ErrorDisabledBrush}" />
</Style>
<Style
x:Key="LabelSuccess"
BasedOn="{StaticResource BasicLabelStyle}"
TargetType="{x:Type Label}"
x:Key="LabelSuccess">
TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}" />
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource SuccessDisabledBrush}" />
</Style>