Beispiel #1
0
 private Color GetItemTextColor(ToolStripItem item)
 {
     this.renderer.SetParameters(this.MenuClass, item.IsOnDropDown ? 14 : 8, NativeRenderer.GetItemState(item));
     return(this.renderer.GetColor(ColorProperty.TextColor));
 }
Beispiel #2
0
 protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
 {
     if (this.EnsureRenderer())
     {
         this.renderer.SetParameters(this.MenuClass, e.Item.IsOnDropDown ? 14 : 8, NativeRenderer.GetItemState(e.Item));
         Rectangle backgroundRectangle = this.GetBackgroundRectangle(e.Item);
         this.renderer.DrawBackground((IDeviceContext)e.Graphics, backgroundRectangle, backgroundRectangle);
     }
     else
     {
         base.OnRenderMenuItemBackground(e);
     }
 }