Hi, ive got a custom control, it basically has a label and a toolstrip.
i can add my control to the toolbox and add it to a form, but i'd really
like to be able to let the end developer add items to the toolstrip via
the properties panel. Ive add a public property "ToolStripItems" to my
control and it shows up in the designer, but when i click the "..."
button to edit the collection i get the following dialog:
"Value cannot be null.
Parameter name: value"
Ive looked at the ToolStrip item class and notice it uses some design
time serialisation:
[DesignerSerializer("System.Windows.Forms.Design.To olStripCodeDomSerializer,
System.Design, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a",
"System.ComponentModel.Design.Serialization.CodeDo mSerializer,
System.Design, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a")]
[Designer("System.Windows.Forms.Design.ToolStripDes igner, System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
I tried adding these in to my class but it wont compile - complaining it
cant convert <mycontrol> to System.Windows.Forms.ToolStrip.
Any help on how i go about this?
Thanks,