title: How to change the background color of a menustripitem in winforms?
body: <p><strong>Hello</strong></p>
  
  <p><em>This picture sums it up:</em> <img src="https://i.imgur.com/K4L0g1V.png" alt=""></p>
  
  <p>Got some troubles, couldn't find a proper answer using the search bar. I've tried to use a custom Render, but it is always just for professional render, when I'm using System Render for the menustrip.</p>
  
  <p>Edit: Found out myself</p>
  
  <pre><code>public class CustomColorTable : ProfessionalColorTable
  {
      public override Color MenuItemSelected
      {
          get { return Color.FromArgb(51,153,255); }
      }
  
      public override Color ToolStripDropDownBackground
      {
          get { return Color.FromArgb(83, 83, 83); }
      }
  
      public override Color ImageMarginGradientBegin
      {
          get { return Color.FromArgb(83, 83, 83); }
      }
  
      public override Color ImageMarginGradientEnd
      {
          get { return Color.FromArgb(83, 83, 83); }
      }
  
      public override Color ImageMarginGradientMiddle
      {
          get { return Color.FromArgb(83,83,83); }
      }
  
      public override Color MenuItemSelectedGradientBegin
      {
          get { return Color.FromArgb(51, 153, 255); }
      }
      public override Color MenuItemSelectedGradientEnd
      {
          get { return Color.FromArgb(51, 153, 255); }
      }
  
      public override Color MenuItemPressedGradientBegin
      {
          get { return Color.FromArgb(51, 153, 255); }
      }
  
      public override Color MenuItemPressedGradientMiddle
      {
          get { return Color.FromArgb(51, 153, 255); }
      }
  
      public override Color MenuItemPressedGradientEnd
      {
          get { return Color.FromArgb(51, 153, 255); }
      }
  
      public override Color MenuItemBorder
      {
          get { return Color.FromArgb(51, 153, 255); }
  
      }
  }
  </code></pre>
  
  <p>and then just use the new colortable with:</p>
  
  <pre><code>MS1.Renderer = new ToolStripProfessionalRenderer(new CustomColorTable()); ;
  </code></pre>