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,22 +1,21 @@
<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:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/WPFluent;component/Resources/Variables.xaml"/>
<ResourceDictionary Source="/WPFluent;component/Resources/Variables.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="TimePickerBorderThemeThickness">1,1,1,1</Thickness>
<Style x:Key="DefaultUiTimePickerStyle" TargetType="{x:Type controls:TimePicker}">
<Style TargetType="{x:Type controls:TimePicker}" x:Key="DefaultUiTimePickerStyle">
<!-- Universal WPF UI focus -->
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
<!-- Universal WPF UI focus -->
<!-- Universal WPF UI ContextMenu -->
<Setter Property="ContextMenu" Value="{DynamicResource DefaultControlContextMenu}" />
<!-- Universal WPF UI ContextMenu -->
<Setter Property="Foreground" Value="{DynamicResource TimePickerButtonForegroundDefault}" />
<Setter Property="Background" Value="{DynamicResource TimePickerButtonBackground}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource TimePickerBorderThemeThickness}" />
<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}" />
@@ -34,20 +33,20 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:TimePicker}">
<Grid
Width="{TemplateBinding Width}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}">
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Width="{TemplateBinding Width}">
<Border
x:Name="ContentBorder"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
Padding="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}">
CornerRadius="{TemplateBinding Border.CornerRadius}"
HorizontalAlignment="Stretch"
MinHeight="{TemplateBinding MinHeight}"
MinWidth="{TemplateBinding MinWidth}"
Padding="0"
VerticalAlignment="Stretch"
x:Name="ContentBorder">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@@ -55,29 +54,29 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid x:Name="GridColumnHour" Grid.Column="0">
<Grid Grid.Column="0" x:Name="GridColumnHour">
<TextBlock
Margin="6"
HorizontalAlignment="Center"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center"
Margin="6"
Text="hour" />
</Grid>
<Border
x:Name="GridColumnMinute"
Grid.Column="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1,0,1,0">
BorderThickness="1,0,1,0"
Grid.Column="1"
x:Name="GridColumnMinute">
<TextBlock
Margin="6"
HorizontalAlignment="Center"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center"
Margin="6"
Text="minute" />
</Border>
<Grid x:Name="GridColumnType" Grid.Column="2">
<Grid Grid.Column="2" x:Name="GridColumnType">
<TextBlock
Margin="6"
HorizontalAlignment="Center"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center"
Margin="6"
Text="AM" />
</Grid>
</Grid>
@@ -91,21 +90,21 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource TimePickerButtonBackgroundPointerOver}" />
<Setter Property="Foreground" Value="{DynamicResource TimePickerButtonForegroundPointerOver}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource TimePickerButtonBackgroundDisabled}" />
<Setter Property="BorderBrush" Value="{DynamicResource TimePickerButtonBorderBrushDisabled}" />
<Setter Property="Foreground" Value="{DynamicResource TimePickerButtonForegroundDisabled}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorDisabledBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource TimePickerButtonBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource TimePickerButtonBorderBrushPressed}" />
<Setter Property="Foreground" Value="{DynamicResource TimePickerButtonForegroundPressed}" />
<Setter Property="Background" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
</Trigger>
<Trigger Property="ClockIdentifier" Value="Clock24Hour">
<Setter TargetName="GridColumnType" Property="Visibility" Value="Hidden" />
<Setter Property="Visibility" TargetName="GridColumnType" Value="Hidden" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -115,4 +114,6 @@
<Style BasedOn="{StaticResource DefaultUiTimePickerStyle}" TargetType="{x:Type controls:TimePicker}" />
</ResourceDictionary>