2025-09-08 19:49:09 +08:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-01-02 17:30:41 +08:00
|
|
|
xmlns:controls="clr-namespace:Melskin.Controls"
|
2026-01-02 17:30:30 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-09-08 19:49:09 +08:00
|
|
|
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
2026-01-02 17:30:41 +08:00
|
|
|
<ResourceDictionary Source="/Melskin;component/Themes/Animations.xaml" />
|
2025-09-08 19:49:09 +08:00
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
2025-07-31 20:12:24 +08:00
|
|
|
<!-- 向下扩展 -->
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type ToggleButton}" x:Key="ExpanderDownHeaderStyle">
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
|
<Grid Background="Transparent">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*" />
|
2025-12-23 21:35:54 +08:00
|
|
|
<RowDefinition Height="Auto" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="False">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="20" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2025-12-23 21:35:54 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Left"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="4,0,0,0"
|
2025-12-23 21:35:54 +08:00
|
|
|
RecognizesAccessKey="True"
|
2026-01-02 17:30:30 +08:00
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
VerticalAlignment="Center" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
|
Padding="-6"
|
2025-09-08 19:49:09 +08:00
|
|
|
RenderTransformOrigin="0.5,0.5"
|
2025-12-23 21:35:54 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Symbol="KeyboardArrowDown"
|
|
|
|
|
x:Name="arrow">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement.RenderTransform>
|
|
|
|
|
<RotateTransform Angle="0" />
|
|
|
|
|
</controls:IconElement.RenderTransform>
|
|
|
|
|
</controls:IconElement>
|
2025-07-31 20:12:24 +08:00
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
<Border
|
2026-01-02 17:30:30 +08:00
|
|
|
Background="{DynamicResource DividerBrush}"
|
2025-07-31 20:12:24 +08:00
|
|
|
Grid.Row="1"
|
|
|
|
|
Height="1"
|
|
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Visibility="Collapsed"
|
|
|
|
|
x:Name="separate" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsChecked" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Visibility" TargetName="separate" Value="Visible" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource ExpandRotateStoryboard}" />
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource CollapseRotateStoryboard}" />
|
|
|
|
|
</Trigger.ExitActions>
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryHoverBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsPressed" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryPressedBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<!-- 向上扩展 -->
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type ToggleButton}" x:Key="ExpanderUpHeaderStyle">
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
|
<Grid Background="Transparent">
|
|
|
|
|
<Grid.RowDefinitions>
|
2025-12-23 21:35:54 +08:00
|
|
|
<RowDefinition Height="Auto" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
SnapsToDevicePixels="False">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="20" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
|
Padding="-6"
|
2025-09-08 19:49:09 +08:00
|
|
|
RenderTransformOrigin="0.5,0.5"
|
2025-12-23 21:35:54 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Symbol="KeyboardArrowUp"
|
|
|
|
|
x:Name="arrow">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement.RenderTransform>
|
|
|
|
|
<RotateTransform Angle="0" />
|
|
|
|
|
</controls:IconElement.RenderTransform>
|
|
|
|
|
</controls:IconElement>
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
Grid.Column="0"
|
2025-09-08 19:49:09 +08:00
|
|
|
HorizontalAlignment="Left"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="4,0,0,0"
|
2025-07-31 20:12:24 +08:00
|
|
|
RecognizesAccessKey="True"
|
2026-01-02 17:30:30 +08:00
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
VerticalAlignment="Center" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
<Border
|
2026-01-02 17:30:30 +08:00
|
|
|
Background="{DynamicResource DividerBrush}"
|
2025-07-31 20:12:24 +08:00
|
|
|
Grid.Row="0"
|
|
|
|
|
Height="1"
|
|
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Visibility="Collapsed"
|
|
|
|
|
x:Name="separate" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsChecked" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Visibility" TargetName="separate" Value="Visible" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource ExpandRotateStoryboard}" />
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource CollapseRotateStoryboard}" />
|
|
|
|
|
</Trigger.ExitActions>
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryHoverBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsPressed" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryPressedBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<!-- 向左扩展 -->
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type ToggleButton}" x:Key="ExpanderLeftHeaderStyle">
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
|
<Grid Background="Transparent">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
2025-12-23 21:35:54 +08:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
SnapsToDevicePixels="False">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="20" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Padding="-6"
|
2025-09-08 19:49:09 +08:00
|
|
|
RenderTransformOrigin="0.5,0.5"
|
2025-12-23 21:35:54 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Symbol="KeyboardArrowLeft"
|
|
|
|
|
x:Name="arrow">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement.RenderTransform>
|
|
|
|
|
<RotateTransform Angle="0" />
|
|
|
|
|
</controls:IconElement.RenderTransform>
|
|
|
|
|
</controls:IconElement>
|
2025-12-23 21:35:54 +08:00
|
|
|
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
Grid.Row="1"
|
2025-09-08 19:49:09 +08:00
|
|
|
HorizontalAlignment="Center"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="0,4,0,0"
|
2025-07-31 20:12:24 +08:00
|
|
|
RecognizesAccessKey="True"
|
2026-01-02 17:30:30 +08:00
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
VerticalAlignment="Top">
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter.LayoutTransform>
|
|
|
|
|
<RotateTransform Angle="90" />
|
|
|
|
|
</ContentPresenter.LayoutTransform>
|
|
|
|
|
</ContentPresenter>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Border
|
2025-09-08 19:49:09 +08:00
|
|
|
Background="{DynamicResource DividerBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Grid.Column="0"
|
2025-09-08 19:49:09 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Visibility="Collapsed"
|
|
|
|
|
Width="1"
|
|
|
|
|
x:Name="separate" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsChecked" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Visibility" TargetName="separate" Value="Visible" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource ExpandRotateStoryboard}" />
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource CollapseRotateStoryboard}" />
|
|
|
|
|
</Trigger.ExitActions>
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryHoverBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsPressed" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryPressedBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<!-- 向右扩展 -->
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type ToggleButton}" x:Key="ExpanderRightHeaderStyle">
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
|
|
|
<Grid Background="Transparent">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
2025-12-23 21:35:54 +08:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
SnapsToDevicePixels="False">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="20" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Padding="-6"
|
2025-09-08 19:49:09 +08:00
|
|
|
RenderTransformOrigin="0.5,0.5"
|
2025-12-23 21:35:54 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Symbol="KeyboardArrowRight"
|
|
|
|
|
x:Name="arrow">
|
2025-09-08 19:49:09 +08:00
|
|
|
<controls:IconElement.RenderTransform>
|
|
|
|
|
<RotateTransform Angle="0" />
|
|
|
|
|
</controls:IconElement.RenderTransform>
|
|
|
|
|
</controls:IconElement>
|
2025-12-23 21:35:54 +08:00
|
|
|
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter
|
|
|
|
|
Grid.Row="1"
|
2025-09-08 19:49:09 +08:00
|
|
|
HorizontalAlignment="Center"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="0,4,0,0"
|
2025-07-31 20:12:24 +08:00
|
|
|
RecognizesAccessKey="True"
|
2026-01-02 17:30:30 +08:00
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
VerticalAlignment="Top">
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter.LayoutTransform>
|
|
|
|
|
<RotateTransform Angle="-90" />
|
|
|
|
|
</ContentPresenter.LayoutTransform>
|
|
|
|
|
</ContentPresenter>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Border
|
2025-09-08 19:49:09 +08:00
|
|
|
Background="{DynamicResource DividerBrush}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Grid.Column="1"
|
2025-09-08 19:49:09 +08:00
|
|
|
SnapsToDevicePixels="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
Visibility="Collapsed"
|
|
|
|
|
Width="1"
|
|
|
|
|
x:Name="separate" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsChecked" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Visibility" TargetName="separate" Value="Visible" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource ExpandRotateStoryboard}" />
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource CollapseRotateStoryboard}" />
|
|
|
|
|
</Trigger.ExitActions>
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryHoverBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsPressed" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource PrimaryPressedBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Foreground" TargetName="arrow" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type Expander}">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
2025-08-26 21:33:20 +08:00
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
2025-09-08 19:49:09 +08:00
|
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderNormalBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
|
|
|
<Setter Property="Margin" Value="4" />
|
|
|
|
|
<Setter Property="Padding" Value="4" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Expander}">
|
|
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
CornerRadius="4"
|
2025-12-23 21:35:54 +08:00
|
|
|
SnapsToDevicePixels="True">
|
2025-07-31 20:12:24 +08:00
|
|
|
<DockPanel>
|
|
|
|
|
<ToggleButton
|
|
|
|
|
Content="{TemplateBinding Header}"
|
|
|
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
|
|
|
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
|
|
|
|
|
DockPanel.Dock="Top"
|
2025-08-26 21:33:20 +08:00
|
|
|
FocusVisualStyle="{DynamicResource FocusVisual}"
|
2025-07-31 20:12:24 +08:00
|
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
|
|
|
FontSize="{TemplateBinding FontSize}"
|
|
|
|
|
FontStretch="{TemplateBinding FontStretch}"
|
|
|
|
|
FontStyle="{TemplateBinding FontStyle}"
|
|
|
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
|
|
|
Foreground="{TemplateBinding Foreground}"
|
2026-01-02 17:30:30 +08:00
|
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
2025-07-31 20:12:24 +08:00
|
|
|
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
2026-01-02 17:30:30 +08:00
|
|
|
Padding="6"
|
|
|
|
|
Style="{StaticResource ExpanderDownHeaderStyle}"
|
|
|
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
x:Name="HeaderSite" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<ContentPresenter
|
2025-09-08 19:49:09 +08:00
|
|
|
DockPanel.Dock="Bottom"
|
2025-12-23 21:35:54 +08:00
|
|
|
Focusable="False"
|
2026-01-02 17:30:30 +08:00
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
Visibility="Collapsed"
|
|
|
|
|
x:Name="ExpandSite" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</DockPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsExpanded" Value="True">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Right">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right" />
|
|
|
|
|
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left" />
|
|
|
|
|
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<!-- 靠左 -->
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Up">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top" />
|
|
|
|
|
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom" />
|
|
|
|
|
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<!-- 靠下 -->
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Bottom" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Left">
|
2026-01-02 17:30:30 +08:00
|
|
|
<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left" />
|
|
|
|
|
<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right" />
|
|
|
|
|
<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<!-- 靠右 -->
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
</Trigger>
|
2025-12-23 21:35:54 +08:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</ResourceDictionary>
|