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,18 +1,8 @@
<!--
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.
Based on Microsoft XAML for Win UI
Copyright (c) Microsoft Corporation. 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:system="clr-namespace:System;assembly=mscorlib">
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Thickness x:Key="CardActionPadding">14,16,14,16</Thickness>
<Thickness x:Key="CardActionBorderThemeThickness">1</Thickness>
@@ -21,13 +11,13 @@
<system:Double x:Key="CardActionIconSize">24.0</system:Double>
<system:Double x:Key="CardActionChevronSize">16.0</system:Double>
<Style x:Key="DefaultUiCardActionStyle" TargetType="{x:Type controls:CardAction}">
<Style TargetType="{x:Type controls:CardAction}" x:Key="DefaultUiCardActionStyle">
<!-- Universal WPF UI focus -->
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
<!-- Universal WPF UI focus -->
<Setter Property="Background" Value="{DynamicResource CardBackground}" />
<Setter Property="Foreground" Value="{DynamicResource CardForeground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CardBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CardBackgroundFillColorDefaultBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource CardStrokeColorDefaultBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource CardActionBorderThemeThickness}" />
<Setter Property="Padding" Value="{StaticResource CardActionPadding}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
@@ -43,18 +33,18 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:CardAction}">
<Border
x:Name="ContentBorder"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}">
CornerRadius="{TemplateBinding Border.CornerRadius}"
Height="{TemplateBinding Height}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
MinHeight="{TemplateBinding MinHeight}"
MinWidth="{TemplateBinding MinWidth}"
Padding="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Width="{TemplateBinding Width}"
x:Name="ContentBorder">
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -63,64 +53,64 @@
</Grid.ColumnDefinitions>
<ContentControl
x:Name="ControlIcon"
Grid.Column="0"
Margin="{StaticResource CardActionIconMargin}"
VerticalAlignment="Center"
Content="{TemplateBinding Icon}"
Focusable="False"
FontSize="{StaticResource CardActionIconSize}"
Foreground="{TemplateBinding Foreground}"
KeyboardNavigation.IsTabStop="False" />
Grid.Column="0"
KeyboardNavigation.IsTabStop="False"
Margin="{StaticResource CardActionIconMargin}"
VerticalAlignment="Center"
x:Name="ControlIcon" />
<ContentPresenter
x:Name="ContentPresenter"
Grid.Column="1"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
TextElement.Foreground="{TemplateBinding Foreground}" />
Grid.Column="1"
TextElement.Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Center"
x:Name="ContentPresenter" />
<controls:SymbolIcon
x:Name="ChevronIcon"
FontSize="{StaticResource CardActionChevronSize}"
Grid.Column="2"
Margin="{StaticResource CardActionChevronMargin}"
Symbol="ChevronRight24"
VerticalAlignment="Center"
FontSize="{StaticResource CardActionChevronSize}"
Symbol="ChevronRight24" />
x:Name="ChevronIcon" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource CardBackgroundPointerOver}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource CardForegroundPointerOver}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
</Trigger>
<Trigger Property="IsChevronVisible" Value="False">
<Setter TargetName="ChevronIcon" Property="Visibility" Value="Collapsed" />
<Setter Property="Visibility" TargetName="ChevronIcon" Value="Collapsed" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource CardBackgroundDisabled}" />
<Setter Property="BorderBrush" Value="{DynamicResource CardBorderBrushDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource CardForegroundDisabled}" />
<Setter TargetName="ControlIcon" Property="Foreground" Value="{DynamicResource CardForegroundDisabled}" />
<Setter TargetName="ChevronIcon" Property="Foreground" Value="{DynamicResource CardForegroundDisabled}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorDisabledBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorDisabledBrush}" />
<Setter Property="Foreground" TargetName="ControlIcon" Value="{DynamicResource TextFillColorDisabledBrush}" />
<Setter Property="Foreground" TargetName="ChevronIcon" Value="{DynamicResource TextFillColorDisabledBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource CardBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource CardBorderBrushPressed}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource CardForegroundPressed}" />
<Setter TargetName="ControlIcon" Property="Foreground" Value="{DynamicResource CardForegroundPressed}" />
<Setter TargetName="ChevronIcon" Property="Foreground" Value="{DynamicResource CardForegroundPressed}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="Foreground" TargetName="ControlIcon" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="Foreground" TargetName="ChevronIcon" Value="{DynamicResource TextFillColorSecondaryBrush}" />
</Trigger>
<Trigger Property="Content" Value="{x:Null}">
<Setter TargetName="ControlIcon" Property="Margin" Value="0" />
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
</Trigger>
<Trigger Property="Content" Value="">
<Setter TargetName="ControlIcon" Property="Margin" Value="0" />
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
</Trigger>
<Trigger Property="Icon" Value="{x:Null}">
<Setter TargetName="ControlIcon" Property="Margin" Value="0" />
<Setter TargetName="ControlIcon" Property="Visibility" Value="Collapsed" />
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
<Setter Property="Visibility" TargetName="ControlIcon" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>