1

I am customizing my MenuStrip to make it look better. I've gone really far from default one but there is 1 thing left which I could not change. My MenuStrip looks like this right now.

this

As you can see in the image there is a grey border around my ToolStripMenuItem. I want to remove it but I can't. I have try this solution and it changed the color a bit. how can I change toolstripmenuitem border color?

I tried Color.Pink to see the difference and yes it did change the color but it was like around the pink border the grey one was still there. I want to make it totally dissappear. Borderless I mean. I will also show how my menu looks like when I do the solution of given link.

This

is how its look like when I override ToolStripDropDownBackground

Shino Lex
  • 487
  • 6
  • 22
  • 1
    To remove the border, override the `MenuBorder` property of the custom `ProfessionalColorTable` to return Color.Empty or just leave the getter empty. Otherwise, the `ProfessionalColorTable` will return the default color of the `MenuBorder` which what you get in the first image. –  Nov 27 '19 at 10:28
  • If you mean the background color of the selected/pressed menu item (Help), then you need to override the `MenuItemSelectedGradientBegin`, `MenuItemSelectedGradientEnd`, `MenuItemPressedGradientBegin`, `MenuItemPressedGradientMiddle`, and `MenuItemPressedGradientEnd` properties to return the same color of the `ToolStripDropDownBackground` property, –  Nov 27 '19 at 10:43
  • 1
    Not the 'help' menu item. Items inside it, and thank you setting MenuBorder to Color.Empty fix my problem. I tried Color.Black before for MenuBorder but it did not worked looks like Color.Empty was the answer. Can you post your first comment as answer so I can approve? Thanks again. – Shino Lex Nov 27 '19 at 10:58
  • 1
    Thank you = 1000+ rep. Good luck mate. –  Nov 27 '19 at 11:02

0 Answers0