winforms - Change the color of the arrow near the menuitem in c# -
I have an application that contains a lot of Menuitms I changed the background Menuitm in dark brown and text in white But the arrow near the text is still black. I want to change the color of this arrow in white
I have found exlanation in this document.
And the same question on stackoverflow:
In an easy way, it is possible to change the color of the arrow next to a menu ? (This is the arrow that allows you to display submenu). I mean using something like ProfessionalColorTable
was inspired by this. Form load or like the manufacturer offers a custom renderer for your menu bar: < / P>
this.menuStrip.Renderer = new WhiteArrowRenderer ();
and arrow color override:
public class WhiteArrowRenderer: ToolStripProfessionalRenderer {protected override void OnRenderArrow (ToolStripArrowRenderEventArgs e) {var tsMenuItem = e.Item ToolStripMenuItem In ; If (tsMenuItem! = Null) e.ArrowColor = Color.White; Base.OnRenderArrow (E); }}
Comments
Post a Comment