I have a problem, what designer doesn't add inherited ContextMenuStrip
to the components
. Here is how to reproduce the problem:
- Create new project (windows forms application).
Add to the form
ContextMenuStrip
via designer, it will generate this:private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); ... }
Create
MyContextMenuStrip
class:public class MyContextMenuStrip : ContextMenuStrip { }
Compile and add to the form
MyContextMenuStrip
via designer, it will generate this:private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.myContextMenuStrip1 = new WindowsFormsApplication1.MyContextMenuStrip(); ... }
WTF? Why it's not adding MyContextMenuStrip
to the components???
And I need menu to be present in components
for my localization manager (to automatically translate menus). Do I forgot some attribute, interface or override??