Vertical separator in WPF Ribbon

Marta picture Marta · Jun 7, 2010 · Viewed 9.8k times · Source

How can I add Vertical separator to WPF Ribbon, to RibbonGroup? I have tried something like that, but i got horizontal separator istead of vertical.

<r:RibbonGroup>
<r:RibbonButton Command="{StaticResource SomeButton}" />     
 <r:RibbonSeparator></r:RibbonSeparator> 
 <r:RibbonToggleButton IsChecked="False" Command="{StaticResource AnotherButton}"/></r:RibbonToggleButton>
 </r:RibbonGroup>

So how can I make vertical separator?

Answer

Michael T picture Michael T · Mar 30, 2011

This is how I would do it.

<ribbon:RibbonGroup.Resources>
    <!-- Vertical Separator-->
    <Style TargetType="{x:Type ribbon:RibbonSeparator}"
           x:Key="KeyRibbonSeparatorVertical">
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <RotateTransform Angle="90"/>
            </Setter.Value>
        </Setter>
    </Style>
</ribbon:RibbonGroup.Resources>