Menu item WPF custom template

Hi, I create a custom menu with menu items. I manage change the background of the menu item but still it is surrounded of some grey container. I don't find in the template for menu item nothing that can customaze this container.
Do you have any suggestions?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Juan OcasioApplication DeveloperCommented:
Did you check the XAML for any margins or padding?
mastiSoftAuthor Commented:
Yes I did but there is only infromation for Icon, text and stuff like that.
Juan OcasioApplication DeveloperCommented:
mastiSoftAuthor Commented:
Thank you but it this is not resolved the problem I have.
If you want to hide "container" of menu, you should use "Popup"

Try this:

<Window x:Class="TestMenu.MainWindow"
        Title="MainWindow" Height="350" Width="525">

        <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
            <Border Name="Border" >
                    <ContentPresenter Margin="6,3,6,3" ContentSource="Header" RecognizesAccessKey="True" />
                    <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade">
                        <Border Name="SubmenuBorder" SnapsToDevicePixels="True" Background="Transparent">
                            <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
        <Menu Height="25" VerticalAlignment="Top">
            <MenuItem Header="File"  >
                <MenuItem Header="New" Background="Red" ></MenuItem>
                <MenuItem Header="Open" ></MenuItem>
                <MenuItem Header="Save" ></MenuItem>

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.