Reputation: 5221
In Windows Forms If I make a custom control that inherits from ToolStripMenuItem
is there a way to add this CustomToolStripMenuItem
to MenuStrip
from designer or do I have to do it through code? (since the ToolStripMenuItem
are added without dragging them from the toolbox)
Upvotes: 2
Views: 2840
Reputation: 81675
Try decorating it with this attribute:
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.MenuStrip)]
public class MyToolStrip : ToolStripMenuItem {
}
Upvotes: 2