功能完善

This commit is contained in:
ShrlAlgo
2025-08-20 12:10:13 +08:00
parent d0cfc64450
commit fcd306b0f7
270 changed files with 11503 additions and 7193 deletions

View File

@@ -0,0 +1,73 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:NeumUI.Controls"
xmlns:nvd="clr-namespace:NeumUI.Controls.Decorations"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type controls:Pill}">
<Setter Property="Background" Value="{DynamicResource PrimaryVariantBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentPrimaryBrush}" />
<Setter Property="HeadBackground" Value="{DynamicResource BackgroundFloatingBrush}" />
<Setter Property="HeadForeground" Value="{DynamicResource TextPrimaryBrush}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,3" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Pill}">
<nvd:EmbossBorder
CornerRadius="3"
ToolTip="{TemplateBinding Url}"
x:Name="rootBorder">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border
Background="{TemplateBinding HeadBackground}"
CornerRadius="3,0,0,3"
Padding="{TemplateBinding Padding}"
TextBlock.FontWeight="Bold"
TextBlock.Foreground="{TemplateBinding HeadForeground}"
x:Name="headBorder">
<ContentPresenter
ContentSource="Header"
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<Border
Background="{TemplateBinding Background}"
CornerRadius="0,3,3,0"
Grid.Column="1"
Padding="{TemplateBinding Padding}"
TextBlock.FontWeight="Bold"
TextBlock.Foreground="{TemplateBinding Foreground}"
x:Name="contentBorder">
<ContentPresenter
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
</nvd:EmbossBorder>
<ControlTemplate.Triggers>
<Trigger Property="Url" Value="{x:Null}">
<Setter Property="Cursor" Value="Arrow" />
</Trigger>
<Trigger Property="Header" Value="{x:Null}">
<Setter Property="CornerRadius" TargetName="contentBorder" Value="3" />
<Setter Property="Padding" TargetName="headBorder" Value="0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>