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?
You can wrap what you have in a RibbonGroup, a vertical separator is created to the right of the group.
All I did was wrapped the first button in a RibbonGroup
.
<ribbon:RibbonTab x:Name="HomeTab"
Header="Home">
<ribbon:RibbonGroup x:Name="Group1"
Header="Group1">
<ribbon:RibbonGroup>
<ribbon:RibbonButton x:Name="Button1"
LargeImageSource="Images\LargeIcon.png"
Label="Button1" Margin="-5" />
</ribbon:RibbonGroup>
<ribbon:RibbonButton x:Name="Button2"
SmallImageSource="Images\SmallIcon.png"
Label="Button2" />
<ribbon:RibbonButton x:Name="Button3"
SmallImageSource="Images\SmallIcon.png"
Label="Button3" />
<ribbon:RibbonButton x:Name="Button4"
SmallImageSource="Images\SmallIcon.png"
Label="Button4" />
</ribbon:RibbonGroup>
</ribbon:RibbonTab>
Works with me-
<my:RibbonSeparator Margin="5,0" Width="70" BorderBrush="Navy" BorderThickness="2">
<my:RibbonSeparator.RenderTransform>
<RotateTransform Angle="90" />
</my:RibbonSeparator.RenderTransform>
</my:RibbonSeparator>
It looks like this doesn't work in the latest version (3.5.40729.1) anymore. The RibbonSeparator also doesn;t work, but you can use:
<Ribbon:RibbonControlGroup Height="55" Margin="5" Width="1" MinHeight="55" MaxWidth="1"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With