We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : Windows Forms
|
Category : Type Editors

How can I allow my user to add more than 1 type of object to my collection, during design-time?

The default CollectionEditor will allow your user to add objects of type returned by your collection’s indexer method.

You can make this CollectionEditor allow your user to pick the type of object to add by deriving from CollectionEditor and making the change as shown below. This will introduce a drop-down in the editor’s "Add" button to allow the user to pick the type he wants to add.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.