2025-07-11 09:20:23 +08:00
|
|
|
<ResourceDictionary
|
2025-02-10 20:53:40 +08:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2025-07-11 09:20:23 +08:00
|
|
|
xmlns:controls="clr-namespace:WPFluent.Controls"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-02-10 20:53:40 +08:00
|
|
|
|
|
|
|
|
<Thickness x:Key="CardPadding">14,16,14,16</Thickness>
|
|
|
|
|
<Thickness x:Key="CardBorderThemeThickness">1</Thickness>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type controls:Card}">
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="Background" Value="{DynamicResource CardBackgroundFillColorDefaultBrush}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource CardStrokeColorDefaultBrush}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<Setter Property="BorderThickness" Value="{StaticResource CardBorderThemeThickness}" />
|
|
|
|
|
<Setter Property="Padding" Value="{StaticResource CardPadding}" />
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
|
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
|
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
|
|
|
<Setter Property="Focusable" Value="False" />
|
|
|
|
|
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type controls:Card}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2025-07-11 09:20:23 +08:00
|
|
|
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
|
|
|
x:Name="ContentBorder">
|
2025-02-10 20:53:40 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
2025-07-11 09:20:23 +08:00
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
x:Name="ContentPresenter" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border
|
2025-07-11 09:20:23 +08:00
|
|
|
Background="{DynamicResource CardBackgroundFillColorSecondaryBrush}"
|
2025-02-10 20:53:40 +08:00
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
CornerRadius="0,0,4,4"
|
2025-07-11 09:20:23 +08:00
|
|
|
Grid.Row="1"
|
|
|
|
|
Padding="{TemplateBinding Padding}"
|
|
|
|
|
Visibility="Collapsed"
|
|
|
|
|
x:Name="FooterBorder">
|
|
|
|
|
<ContentPresenter Content="{TemplateBinding Footer}" x:Name="FooterContentPresenter" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="HasFooter" Value="True">
|
2025-07-11 09:20:23 +08:00
|
|
|
<Setter Property="Visibility" TargetName="FooterBorder" Value="Visible" />
|
|
|
|
|
<Setter Property="CornerRadius" TargetName="ContentBorder" Value="4,4,0,0" />
|
|
|
|
|
<Setter Property="BorderThickness" TargetName="ContentBorder" Value="1,1,1,0" />
|
2025-02-10 20:53:40 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ResourceDictionary>
|