功能完善
This commit is contained in:
51
NeuWPF/NeoUI/Controls/SeparatorStyle.xaml
Normal file
51
NeuWPF/NeoUI/Controls/SeparatorStyle.xaml
Normal file
@@ -0,0 +1,51 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!--水平分割-->
|
||||
<Style x:Key="HorizontalSeparator" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{DynamicResource BorderSubtleBrush}" />
|
||||
<Setter Property="Margin" Value="0,4" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Height="1" SnapsToDevicePixels="true" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!--默认水平分割-->
|
||||
<Style TargetType="{x:Type Separator}" BasedOn="{StaticResource HorizontalSeparator}"/>
|
||||
<!--菜单分隔-->
|
||||
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}"
|
||||
BasedOn="{StaticResource HorizontalSeparator}">
|
||||
<Setter Property="Background" Value="{DynamicResource BorderSubtleBrush}" />
|
||||
<Setter Property="Margin" Value="0,2" />
|
||||
</Style>
|
||||
|
||||
<!--垂直分割-->
|
||||
<Style x:Key="VerticalSeparator" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{DynamicResource BorderSubtleBrush}" />
|
||||
<Setter Property="Margin" Value="2,0" />
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Width="1" SnapsToDevicePixels="true" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!--状态栏分割-->
|
||||
<Style x:Key="{x:Static StatusBar.SeparatorStyleKey}" TargetType="{x:Type Separator}"
|
||||
BasedOn="{StaticResource VerticalSeparator}">
|
||||
<Setter Property="Margin" Value="4,2"/>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user