0

I have a problem with vertical line after Menu Items, guess it is some kind of separator between groups of menu items. I already tried to remove it for some time, but I have no idea where to find property to change it. I couldn't find any similar question in stackoverflow. Can anybody help with it?

Here is Xaml code and Image of line:

    <Window x:Class="WpfApplication4.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        Height="350" Width="525">
    <Grid>
        <my:Ribbon>
            <my:Ribbon.QuickAccessToolBar>
                <my:RibbonQuickAccessToolBar>
                    <Menu>
                        <MenuItem Header="Sth" />  
                    </Menu>
                </my:RibbonQuickAccessToolBar>
            </my:Ribbon.QuickAccessToolBar>
         </my:Ribbon>
    </Grid>
</Window>

Separator which I want to get rid of in QuickAccessToolbar

Kelk
  • 57
  • 10

1 Answers1

0

You should be able to do that by editing the default ControlTemplate for the QuickAccessToolBar control. You can find out how to set this in a custom style for the QuickAccessToolBar in the Styling the QuickAccessToolbar page on the Telerik website. While I'm aware that this linked page is for Silverlight, I believe that you'll find that the process to follow is the same.

You can also find out how to extract the default ControlTemplate for any control in Visual Studio from my answer to the How to Extract Default Control Template In Visual Studio? question here on Stack Overflow. Once you have found the relevant ControlTemplate, just locate and remove the Separator element and set your custom (edited) ControlTemplate to be used as the value for the QuickAccessToolBar.Template property.

Disclaimer: You may find that the Separator element is outside the QuickAccessToolBar element and is in fact part of the Window instead.

Community
  • 1
  • 1
Sheridan
  • 68,826
  • 24
  • 143
  • 183
  • thanks for help, is it possible to do this in VS 2010? While using Extract Value to Resource... option Exception of type 'MS.Internal?Validate+Validation.Failure' is being thrown. – Kelk Dec 01 '15 at 13:23
  • I don't think you can do it in 2010 unfortunately... back then, we had to use Blend to do it. – Sheridan Dec 01 '15 at 13:27