Files
ShrlAlgoToolkit/WPFDark/StandardControls/GridSplitter.xaml
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

76 lines
3.6 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:WPFDark">
<Style TargetType="{x:Type GridSplitter}">
<Setter Property="ResizeDirection" Value="Columns" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridSplitter}">
<Border x:Name="Background" Background="Transparent">
<Path x:Name="Thumb"
Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,0H2V2H0V0M4,0H6V2H4V0M0,4H2V6H0V4M4,4H6V6H4V4M0,8H2V10H0V8M4,8H6V10H4V8M0,12H2V14H0V12M4,12H6V14H4V12M0,16H2V18H0V16M4,16H6V18H4V16z"
Fill="#ABABAB" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ResizeDirection" Value="Rows">
<Setter TargetName="Thumb" Property="Data" Value="M0,6V4H2V6H0M0,2V0H2V2H0M4,6V4H6V6H4M4,2V0H6V2H4M8,6V4H10V6H8M8,2V0H10V2H8M12,6V4H14V6H12M12,2V0H14V2H12M16,6V4H18V6H16M16,2V0H18V2H16z" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Background" Property="Background" Value="#10FFFFFF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="GridSplitterSimpleStyle" TargetType="{x:Type GridSplitter}">
<Setter Property="ResizeDirection" Value="Columns" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridSplitter}">
<Border x:Name="Background" Background="Transparent" />
<ControlTemplate.Triggers>
<Trigger Property="ResizeDirection" Value="Rows">
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Background" Property="Background" Value="#10FFFFFF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="GridSplitterTransparentStyle" TargetType="{x:Type GridSplitter}">
<Setter Property="ResizeDirection" Value="Columns" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridSplitter}">
<Border x:Name="Background" Background="Transparent" />
<ControlTemplate.Triggers>
<Trigger Property="ResizeDirection" Value="Rows">
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>