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="CardControlPadding">14,16,14,16</Thickness>
<Thickness x:Key="CardControlBorderThemeThickness">1</Thickness>
@@ -20,13 +10,13 @@
<Thickness x:Key="CardControlContentMargin">14,0,0,0</Thickness>
<system:Double x:Key="CardControlIconSize">24.0</system:Double>
<Style x:Key="DefaultUiCardControlStyle" TargetType="{x:Type controls:CardControl}">
<Style TargetType="{x:Type controls:CardControl}" x:Key="DefaultUiCardControlStyle">
<!-- 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 CardControlBorderThemeThickness}" />
<Setter Property="Padding" Value="{StaticResource CardControlPadding}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
@@ -42,18 +32,18 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:CardControl}">
<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 CornerRadius}">
CornerRadius="{TemplateBinding 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" />
@@ -61,46 +51,46 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentControl
x:Name="ControlIcon"
Grid.Column="0"
Margin="{StaticResource CardControlIconMargin}"
VerticalAlignment="Center"
Content="{TemplateBinding Icon}"
Focusable="False"
FontSize="{StaticResource CardControlIconSize}"
Foreground="{TemplateBinding Foreground}"
KeyboardNavigation.IsTabStop="False" />
<ContentPresenter
x:Name="HeaderContentPresenter"
Grid.Column="1"
Grid.Column="0"
KeyboardNavigation.IsTabStop="False"
Margin="{StaticResource CardControlIconMargin}"
VerticalAlignment="Center"
Content="{TemplateBinding Header}"
TextElement.Foreground="{TemplateBinding Foreground}" />
x:Name="ControlIcon" />
<ContentPresenter
x:Name="ContentPresenter"
Content="{TemplateBinding Header}"
Grid.Column="1"
TextElement.Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Center"
x:Name="HeaderContentPresenter" />
<ContentPresenter
Content="{TemplateBinding Content}"
Grid.Column="2"
Margin="{StaticResource CardControlContentMargin}"
TextElement.Foreground="{TemplateBinding Foreground}"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
TextElement.Foreground="{TemplateBinding Foreground}" />
x:Name="ContentPresenter" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Content" Value="{x:Null}">
<Setter TargetName="ContentPresenter" Property="Margin" Value="0" />
<Setter Property="Margin" TargetName="ContentPresenter" Value="0" />
</Trigger>
<Trigger Property="Content" Value="">
<Setter TargetName="ContentPresenter" Property="Margin" Value="0" />
<Setter Property="Margin" TargetName="ContentPresenter" Value="0" />
</Trigger>
<Trigger Property="Header" Value="{x:Null}">
<Setter TargetName="ControlIcon" Property="Margin" Value="0" />
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
</Trigger>
<Trigger Property="Header" 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>