/// <summary> /// Renders the image of the item specified on the event /// </summary> public virtual void OnRenderRibbonItemImage(RibbonItemBoundsEventArgs e) { }
public override void OnRenderRibbonItemImage(RibbonItemBoundsEventArgs e) { Image img = e.Item.Image; if (e.Item is RibbonButton) { if (!(e.Item.SizeMode == RibbonElementSizeMode.Large || e.Item.SizeMode == RibbonElementSizeMode.Overflow)) { img = (e.Item as RibbonButton).SmallImage; } } if (img != null) { if (!e.Item.Enabled) img = CreateDisabledImage(img); e.Graphics.DrawImage(img, e.Bounds); } }