UserControl with a ComboBox

J

Jochen Berger

Moin!

I've 'composed' a special UserControl I need for my current project. On
this Control I put a ComboBox. The user is not allowed to access the
ComboBox directly (to protect some properties), so I used Properties to
enable the user to do some things in design mode. It all works fine
except for the Items property:

public ComboBox.ObjectCollection Items
{
get { return sicherungCombo.Items; }
}

I can't edit the items in design mode. I once read, that you need to add
an attribute, but I can't find it (not even the text I read).

Has anyone an idea how to do it? Oh, BTW: I (have to) use .net 1.1.
 
T

Tim Wilson

Apply the DesignerSerializationVisibility attribute with a value of
DesignerSerializationVisibility.Content to allow the contents of the
collection to be persisted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top