❔ How do I remove white line on the left side of a ToolStripMenuItem in windows forms
I have already removed the image margin using this function I found on stackoverflow
However, this still leaves the white line on the left which I am looking to remove but I am unsure as to how to
8 Replies
Are you trying to theme winforms ToolStrips?
Yeah, I've just figured it out now though by making a new ToolStripProfessionalRenderer with a class which overrides ImageMarginGradientBegin, ImageMarginGradientMiddle and ImageMarginGradientEnd
Trying to make a dark-mode?
+ that's deffo the right track
Yeah
Trying to make the context menu a dark ish theme
I'm going to make a color pallet and go through the original ProfessionalColors class and just replace individual colors
Dunno if this helps:
https://gist.github.com/stigzler/bad89dba2eb95aaa5ec1c4fd19ac72b5
Gist
DarkToolStripRenderer
DarkToolStripRenderer. GitHub Gist: instantly share code, notes, and snippets.
I'll take a look at it, appreciate it
👍
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.