Files
ShrlAlgoToolkit/ShrlAlgo.Toolkit.Wpf/Themes/Generic.xaml
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

687 lines
38 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:attach="clr-namespace:ShrlAlgo.Toolkit.Wpf.Attach"
xmlns:converters="clr-namespace:ShrlAlgoToolkit.Mvvm.Converters;assembly=ShrlAlgoToolkit.Mvvm"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter" />
<SolidColorBrush Color="#FF009943" x:Key="PrimaryColor" />
<SolidColorBrush Color="#FF33B36B" x:Key="PrimaryLightColor" />
<SolidColorBrush Color="#FF00773A" x:Key="PrimaryDarkColor" />
<SolidColorBrush Color="#FFF0F0F0" x:Key="BackgroundColor" />
<SolidColorBrush Color="#FF1F1F1F" x:Key="ForegroundDarkColor" />
<SolidColorBrush Color="#FF333333" x:Key="ForegroundColor" />
<SolidColorBrush Color="#FFCCCCCC" x:Key="BorderColor" />
<SolidColorBrush Color="#FFE0E0E0" x:Key="SelectedColor" />
<SolidColorBrush Color="#FF888888" x:Key="PlaceholderColor" />
<FontFamily x:Key="ModernFont">Segoe UI</FontFamily>
<!--<FontFamily x:Key="HanYiCuSongJian">pack://application:,,,/SZMCToolkit.RevitAddins;component/Fonts/#汉仪粗宋简</FontFamily>-->
<!--<FontFamily x:Key="SourceHanSansSC">pack://application:,,,/SZMCToolkit.RevitAddins;component/Fonts/#Source Han Sans SC</FontFamily>-->
<ControlTemplate x:Key="ValidationErrorTemplate">
<DockPanel LastChildFill="True">
<TextBlock
DockPanel.Dock="Bottom"
Foreground="Red"
Margin="5,0,0,0"
Text="{Binding [0].ErrorContent}"
VerticalAlignment="Center" />
<AdornedElementPlaceholder />
</DockPanel>
</ControlTemplate>
<Style TargetType="Button">
<Setter Property="Background" Value="{StaticResource PrimaryColor}" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Padding" Value="10,5" />
<Setter Property="Margin" Value="5" />
<Setter Property="Height" Value="30" />
<!-- <Setter Property="VerticalAlignment" Value="Center"/> -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource PrimaryLightColor}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryLightColor}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource PrimaryDarkColor}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryDarkColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<Style x:Key="BaseInputBoxStyle" TargetType="{x:Type Control}">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="Padding" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Control}">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5">
<Grid>
<ScrollViewer x:Name="PART_ContentHost"
Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" />
<TextBlock x:Name="Placeholder"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
FontStyle="Italic"
Foreground="{StaticResource PlaceholderColor}"
IsHitTestVisible="False"
Text="{TemplateBinding Tag}"
Visibility="Collapsed" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PrimaryColor}" />
<Setter TargetName="Border" Property="BorderThickness" Value="1" />
</Trigger>
<DataTrigger Value="True" Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Text.IsEmpty}">
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Value="True" Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsKeyboardFocused}">
<Setter TargetName="Placeholder" Property="Visibility" Value="Collapsed" />
</DataTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>-->
<Style TargetType="TextBox">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
x:Name="Border">
<Grid>
<ScrollViewer
Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"
x:Name="PART_ContentHost" />
<TextBlock
FontStyle="Italic"
Foreground="{StaticResource PlaceholderColor}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}"
Text="{TemplateBinding Tag}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Visibility="Collapsed"
x:Name="Placeholder" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource PrimaryColor}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Text.IsEmpty}" Value="True">
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsKeyboardFocused}" Value="True">
<Setter Property="Visibility" TargetName="Placeholder" Value="Collapsed" />
</DataTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="PasswordBox">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="Padding" Value="5" />
<Setter Property="Margin" Value="5" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type PasswordBox}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
x:Name="Border">
<Grid>
<ScrollViewer
Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"
x:Name="PART_ContentHost" />
<TextBlock
FontStyle="Italic"
Foreground="{StaticResource PlaceholderColor}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}"
Text="{TemplateBinding Tag}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Visibility="Collapsed"
x:Name="Placeholder" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource PrimaryColor}" />
<Setter Property="BorderThickness" TargetName="Border" Value="1" />
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(attach:PasswordBoxHelper.HasPassword)}" Value="False">
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsKeyboardFocused}" Value="True">
<Setter Property="Visibility" TargetName="Placeholder" Value="Collapsed" />
</DataTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<ControlTemplate TargetType="{x:Type TextBox}" x:Key="ComboBoxTextBox">
<Border
Background="{TemplateBinding Background}"
Focusable="False"
x:Name="PART_ContentHost" />
</ControlTemplate>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="IsSynchronizedWithCurrentItem" Value="True" />
<Setter Property="Margin" Value="5" />
<Setter Property="MinHeight" Value="30" />
<Setter Property="MinWidth" Value="120" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Padding" Value="5,0,0,0" />
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<ToggleButton
ClickMode="Press"
Focusable="false"
Grid.ColumnSpan="2"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Name="ToggleButton">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
x:Name="Border">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="Border" Value="{StaticResource SelectedColor}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource PrimaryLightColor}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="Border" Value="{StaticResource SelectedColor}" />
<Setter Property="BorderBrush" TargetName="Border" Value="{StaticResource PrimaryColor}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup
AllowsTransparency="True"
Focusable="False"
IsOpen="{TemplateBinding IsDropDownOpen}"
Name="PART_Popup"
Placement="Bottom"
PopupAnimation="Slide">
<Border
Background="White"
BorderBrush="{StaticResource PrimaryColor}"
BorderThickness="1"
CornerRadius="5"
MaxHeight="200"
Width="{Binding ActualWidth, RelativeSource={RelativeSource Mode=TemplatedParent}}"
x:Name="DropDownBorder">
<ScrollViewer
HorizontalScrollBarVisibility="Auto"
Margin="4,6,4,6"
SnapsToDevicePixels="True"
VerticalScrollBarVisibility="Auto">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Border>
</Popup>
<ContentPresenter
Content="{TemplateBinding SelectionBoxItem}"
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Grid.Column="0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
IsHitTestVisible="False"
Margin="{TemplateBinding Padding}"
Name="ContentSite"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Visibility="Visible" />
<TextBox
Background="Transparent"
Focusable="True"
Grid.Column="0"
HorizontalAlignment="Left"
IsReadOnly="{TemplateBinding IsReadOnly}"
Margin="{TemplateBinding Padding}"
Style="{x:Null}"
Template="{StaticResource ComboBoxTextBox}"
VerticalAlignment="Center"
Visibility="Hidden"
x:Name="PART_EditableTextBox" />
<Path
Data="M0,0 L4,4 L8,0 Z"
Fill="{StaticResource PrimaryColor}"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
x:Name="Arrow">
<Path.RenderTransform>
<RotateTransform CenterX="4" CenterY="2" x:Name="ArrowRotate" />
</Path.RenderTransform>
</Path>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasItems" Value="false">
<Setter Property="Height" TargetName="DropDownBorder" Value="95" />
</Trigger>
<Trigger Property="IsGrouping" Value="true">
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
</Trigger>
<Trigger Property="AllowsTransparency" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="DropDownBorder" Value="0,2,0,0" />
</Trigger>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Visibility" TargetName="PART_EditableTextBox" Value="Visible" />
<Setter Property="Visibility" TargetName="ContentSite" Value="Hidden" />
</Trigger>
<Trigger Property="IsEditable" Value="false">
<Setter Property="Visibility" TargetName="PART_EditableTextBox" Value="Hidden" />
<Setter Property="Visibility" TargetName="ContentSite" Value="Visible" />
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=IsEditable, RelativeSource={RelativeSource Mode=TemplatedParent}}" Value="False" />
<Condition Binding="{Binding Path=SelectionBoxItem, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource NullToBooleanConverter}}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" TargetName="ContentSite" Value="Visible" />
</MultiDataTrigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderBrush" TargetName="ToggleButton" Value="{StaticResource PrimaryColor}" />
<Setter Property="BorderThickness" TargetName="ToggleButton" Value="1" />
</Trigger>
<Trigger Property="IsDropDownOpen" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:0.2"
Storyboard.TargetName="ArrowRotate"
Storyboard.TargetProperty="Angle"
To="180" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Duration="0:0:0.2"
Storyboard.TargetName="ArrowRotate"
Storyboard.TargetProperty="Angle"
To="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="4,3" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="true"
x:Name="Border">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="true">
<Setter Property="Background" TargetName="Border" Value="{StaticResource SelectedColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{StaticResource BorderColor}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Background="White"
BorderBrush="{StaticResource BorderColor}"
BorderThickness="1"
CornerRadius="3"
Grid.Column="0"
Height="16"
VerticalAlignment="Center"
Width="16"
x:Name="checkBoxBorder">
<Path
Data="M 0 0 L 1 0 L 1 1 L 0 1 Z"
Fill="{StaticResource PrimaryColor}"
Height="9"
SnapsToDevicePixels="True"
Stretch="Fill"
StrokeThickness="0"
Visibility="Collapsed"
Width="9"
x:Name="checkBoxPath" />
</Border>
<ContentPresenter
Grid.Column="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="5,0,0,0"
RecognizesAccessKey="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="checkBoxBorder" Value="White" />
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource PrimaryColor}" />
<Setter Property="Data" TargetName="checkBoxPath" Value="M4.5,10.2L1.8,7.5L0.5,8.8L4.5,12.8L12.5,4.8L11.2,3.5L4.5,10.2Z" />
<Setter Property="Visibility" TargetName="checkBoxPath" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type RadioButton}">
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Background="White"
BorderBrush="{StaticResource BorderColor}"
BorderThickness="1"
CornerRadius="8"
Grid.Column="0"
Height="16"
VerticalAlignment="Center"
Width="16"
x:Name="radioButtonBorder">
<Ellipse
Fill="{StaticResource PrimaryColor}"
Height="8"
Visibility="Collapsed"
Width="8"
x:Name="checkMark" />
</Border>
<ContentPresenter
Grid.Column="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="5,0,0,0"
RecognizesAccessKey="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource PrimaryColor}" />
<Setter Property="Visibility" TargetName="checkMark" Value="Visible" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource PrimaryLightColor}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource PrimaryDarkColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.6" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="{x:Type GroupBox}">
<Setter Property="FontFamily" Value="{StaticResource ModernFont}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{StaticResource PrimaryColor}" />
<Setter Property="Padding" Value="10,20,10,10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupBox}">
<Grid SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="6" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border
Background="White"
BorderBrush="{StaticResource BorderColor}"
BorderThickness="1"
CornerRadius="5"
Grid.ColumnSpan="4"
Grid.Row="0"
Grid.RowSpan="2" />
<Border
BorderBrush="{StaticResource BorderColor}"
BorderThickness="1,0,0,0"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="0"
Height="1"
HorizontalAlignment="Left"
Margin="0,8,0,0"
Width="Auto" />
<ContentPresenter
ContentSource="Header"
Grid.Column="1"
Grid.Row="0"
HorizontalAlignment="Left"
Margin="5,0,5,0"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="Center">
<ContentPresenter.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="0" />
</Style>
</ContentPresenter.Resources>
<ContentPresenter.ContentTemplate>
<DataTemplate>
<Border
Background="{StaticResource BackgroundColor}"
CornerRadius="3"
Padding="8,2">
<ContentPresenter Content="{Binding}" />
</Border>
</DataTemplate>
</ContentPresenter.ContentTemplate>
</ContentPresenter>
<Border
BorderBrush="{StaticResource BorderColor}"
BorderThickness="0,0,1,0"
Grid.Column="2"
Grid.ColumnSpan="2"
Grid.Row="0"
Height="1"
HorizontalAlignment="Right"
Margin="0,8,0,0"
Width="Auto" />
<ContentPresenter
ContentSource="Content"
Grid.Column="0"
Grid.ColumnSpan="4"
Grid.Row="1"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 阴影效果 -->
<DropShadowEffect
BlurRadius="15"
Color="#80000000"
Direction="315"
ShadowDepth="5"
x:Key="DropShadowEffect" />
<!-- 窗口样式 -->
<Style TargetType="{x:Type Window}" x:Key="ModernWindowStyle">
<Setter Property="Icon" Value="{StaticResource Logo}" />
<Setter Property="FontSize" Value="14" />
<!--<Setter Property="FontFamily" Value="{StaticResource SourceHanSansSC}" />-->
<!--<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
BorderBrush="{StaticResource PrimaryColor}"
BorderThickness="1,0,1,1">
<AdornerDecorator>
<ContentPresenter />
</AdornerDecorator>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>-->
</Style>
</ResourceDictionary>