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,19 +1,12 @@
<!--
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.
-->
<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:controls="clr-namespace:WPFluent.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ToolBarButtonBaseStyle" TargetType="{x:Type ButtonBase}">
<Style TargetType="{x:Type ButtonBase}" x:Key="ToolBarButtonBaseStyle">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Opacity="0.0" Color="{DynamicResource ControlFillColorDefault}" />
<SolidColorBrush Color="{DynamicResource ControlFillColorDefault}" Opacity="0.0" />
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="Transparent" />
@@ -25,16 +18,16 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border
x:Name="Border"
Padding="12,6"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
BorderThickness="{TemplateBinding BorderThickness}"
Padding="12,6"
x:Name="Border">
<ContentPresenter
Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
Margin="2"
RecognizesAccessKey="True"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
@@ -42,11 +35,11 @@
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:0.16"
From="0.0"
Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Opacity)"
From="0.0"
To="1.0"
Duration="0:0:0.16" />
To="1.0" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
@@ -54,11 +47,11 @@
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:0.16"
From="1.0"
Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Opacity)"
From="1.0"
To="0.0"
Duration="0:0:0.16" />
To="0.0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
@@ -70,23 +63,23 @@
</Style>
<Style
x:Key="{x:Static ToolBar.ButtonStyleKey}"
BasedOn="{StaticResource ToolBarButtonBaseStyle}"
TargetType="{x:Type Button}" />
TargetType="{x:Type Button}"
x:Key="{x:Static ToolBar.ButtonStyleKey}" />
<Style
x:Key="{x:Static ToolBar.ToggleButtonStyleKey}"
BasedOn="{StaticResource ToolBarButtonBaseStyle}"
TargetType="{x:Type ToggleButton}" />
TargetType="{x:Type ToggleButton}"
x:Key="{x:Static ToolBar.ToggleButtonStyleKey}" />
<Style
x:Key="{x:Static ToolBar.CheckBoxStyleKey}"
BasedOn="{StaticResource ToolBarButtonBaseStyle}"
TargetType="{x:Type CheckBox}" />
TargetType="{x:Type CheckBox}"
x:Key="{x:Static ToolBar.CheckBoxStyleKey}" />
<Style
x:Key="{x:Static ToolBar.RadioButtonStyleKey}"
BasedOn="{StaticResource ToolBarButtonBaseStyle}"
TargetType="{x:Type RadioButton}" />
TargetType="{x:Type RadioButton}"
x:Key="{x:Static ToolBar.RadioButtonStyleKey}" />
<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="{x:Type TextBox}">
<Style TargetType="{x:Type TextBox}" x:Key="{x:Static ToolBar.TextBoxStyleKey}">
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="AllowDrop" Value="True" />
@@ -96,19 +89,19 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border
x:Name="Border"
Padding="2"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0">
<controls:PassiveScrollViewer x:Name="PART_ContentHost" Margin="0" />
BorderThickness="0"
Padding="2"
x:Name="Border">
<controls:PassiveScrollViewer Margin="0" x:Name="PART_ContentHost" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
<Style TargetType="{x:Type Thumb}" x:Key="ToolBarThumbStyle">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Cursor" Value="SizeAll" />
@@ -138,7 +131,7 @@
</Setter>
</Style>
<Style x:Key="ToolBarOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
<Style TargetType="{x:Type ToggleButton}" x:Key="ToolBarOverflowButtonStyle">
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextFillColorTertiary}" />
@@ -152,16 +145,16 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border
x:Name="Border"
Background="{TemplateBinding Background}"
CornerRadius="0,3,3,0"
SnapsToDevicePixels="true">
SnapsToDevicePixels="true"
x:Name="Border">
<Grid>
<controls:SymbolIcon
Margin="0"
VerticalAlignment="Bottom"
Foreground="{TemplateBinding Foreground}"
Symbol="ChevronDown20" />
Margin="0"
Symbol="ChevronDown20"
VerticalAlignment="Bottom" />
<ContentPresenter />
</Grid>
<!--
@@ -205,7 +198,7 @@
</Setter>
</Style>
<Style x:Key="{x:Type ToolBar}" TargetType="{x:Type ToolBar}">
<Style TargetType="{x:Type ToolBar}" x:Key="{x:Type ToolBar}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
@@ -215,11 +208,11 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToolBar}">
<Border
x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
CornerRadius="4"
x:Name="Border">
<DockPanel>
<ToggleButton
ClickMode="Press"
@@ -228,53 +221,53 @@
IsEnabled="{TemplateBinding HasOverflowItems}"
Style="{StaticResource ToolBarOverflowButtonStyle}">
<Popup
x:Name="OverflowPopup"
AllowsTransparency="True"
Focusable="False"
IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Bottom"
PopupAnimation="Slide"
StaysOpen="False">
StaysOpen="False"
x:Name="OverflowPopup">
<Border
x:Name="DropDownBorder"
Margin="12,0,12,18"
Padding="0,3,0,3"
BorderBrush="{DynamicResource MenuBorderColorDefaultBrush}"
BorderThickness="1"
CornerRadius="8"
SnapsToDevicePixels="True">
Margin="12,0,12,18"
Padding="0,3,0,3"
SnapsToDevicePixels="True"
x:Name="DropDownBorder">
<Border.Background>
<SolidColorBrush Color="{DynamicResource SystemFillColorSolidNeutralBackground}" />
</Border.Background>
<ToolBarOverflowPanel
x:Name="PART_ToolBarOverflowPanel"
Margin="0"
FocusVisualStyle="{x:Null}"
Focusable="True"
KeyboardNavigation.DirectionalNavigation="Cycle"
KeyboardNavigation.TabNavigation="Cycle"
WrapWidth="200" />
Margin="0"
WrapWidth="200"
x:Name="PART_ToolBarOverflowPanel" />
</Border>
</Popup>
</ToggleButton>
<Thumb
x:Name="ToolBarThumb"
Style="{StaticResource ToolBarThumbStyle}"
Width="10"
Style="{StaticResource ToolBarThumbStyle}" />
x:Name="ToolBarThumb" />
<ToolBarPanel
x:Name="PART_ToolBarPanel"
IsItemsHost="True"
Margin="0,1,2,2"
IsItemsHost="True" />
x:Name="PART_ToolBarPanel" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsOverflowOpen" Value="true">
<Setter TargetName="ToolBarThumb" Property="IsEnabled" Value="false" />
<Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false" />
</Trigger>
<Trigger Property="ToolBarTray.IsLocked" Value="true">
<Setter TargetName="ToolBarThumb" Property="Visibility" Value="Collapsed" />
<Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -282,7 +275,7 @@
</Setter>
</Style>
<Style x:Key="{x:Type ToolBarTray}" TargetType="{x:Type ToolBarTray}">
<Style TargetType="{x:Type ToolBarTray}" x:Key="{x:Type ToolBarTray}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource ControlFillColorDefault}" />