How to add a layer to a menuitem image
- by alexander
I have a menuitem with an image. I want to add half-transparent layer to that image.
private void menuItem1_Paint(object sender, PaintEventArgs e)
{
using (SolidBrush brush = new SolidBrush(Color.FromArgb(128, SystemColors.ActiveCaption)))
{
e.Graphics.FillRectangle(brush, e.ClipRectangle);
}
}
My problem is = I don't know clientrectangle of that image. e.ClipRectangle - it fills whole menuitem. I want to fill only image. How ?
Is there another way, maybe ?