How to change default image of derived ToolStripButton?
- by Special Touch
It seems like a simple task. Create a C# class that derives from ToolStripButton. The derived ToolStripButton should behave exactly the same as the parent class in the designer and the application, except that the default image should be different.
Surprisingly just changing the constructor is not sufficient:
public CustomToolStripButton()
{
base.Image = (Image) new Bitmap(typeof(CustomToolStripButton), "CustomImage.bmp");
}
When the ToolStripButton is displayed in the designer, the original default image is shown. There must be a simple solution. What could it be?