By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Add ToolStripItemCollection property to designer

P: n/a
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=, Culture=neutral,
"System.ComponentModel.Design.Serialization.CodeDo mSerializer,
System.Design, Version=, Culture=neutral,

[Designer("System.Windows.Forms.Design.ToolStripDes igner, System.Design,
Version=, 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?

Jan 19 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.