Changing color of MenuItem
How do I change the white color around each MenuItem to black? I have tried changing styles for ContextMenu and it didn't work
4 Replies
You need a custom
MenuItem
styleI changed the background of MenuItem and that's how i got what's in the screenshot above
it doesnt do the edges
Actually the white edges seem to be part of the context menu itself now that I look at it closer
A custom
ContextMenu
style should be what you need. See an example style here:
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/contextmenu-styles-and-templates?view=netframeworkdesktop-4.8#contextmenu-controltemplate-exampleContextMenu Styles and Templates - WPF .NET Framework
Learn about ContextMenu styles and templates. You can modify the default ControlTemplate to give the control a unique appearance.