我想以垂直方式使用 Separator 控件(假设在水平 StackPanel 中)。
环顾四周,我发现了这种方法,但它不使用 Separator 控件,而是使用边框和矩形。 https://social.msdn.microsoft.com/forums/en-US/wpf/thread/eab865be-ad9b-45ed-b9d8-fc93f737b163
是否可以垂直使用分隔符控件?
还:
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
垂直分离器
<Style x:Key="VerticalSeparatorStyle"
TargetType="{x:Type Separator}"
BasedOn="{StaticResource {x:Type Separator}}">
<Setter Property="Margin" Value="6,0,6,0"/>
<Setter Property="LayoutTransform">
<Setter.Value>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="90"/>
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Setter.Value>
</Setter>
</Style>
哪个可以这样使用
<Separator Style="{DynamicResource VerticalSeparatorStyle}" />