CollectionControl

Derives from Control

Provides a user interface that can edit types of collections.

collectioneditor.jpg

Properties

Property Description
IsReadOnly Gets or sets if the data in the CollectionControl can be modified.
Items Gets or sets the collection used to generate the content of the CollectionControl.
ItemsSource Gets or sets a list used to generate the content of the CollectionControl.
ItemsSourceType Gets or sets the type of ItemsSource.
NewItemTypes Gets or sets a list of custom item types that appear in the Add ListBox.
SelectedItem Gets or sets the currently selected item.

Events

Event Description
ItemAdded Raised when the "Add" button is pressed to add an item to the ListBox and the adding is done.
ItemAdding Raised when the "Add" button is pressed to add an item to the ListBox and the adding is starting.
ItemDeleted Raised when the "X" button is pressed to remove an item from the ListBox and the removing is done.
ItemDeleting Raised when the "X" button is pressed to remove an item from the ListBox and the removing is starting.


Support this project, check out the Plus Edition.
---

Last edited Jun 9 at 6:34 PM by dlafontaine, version 8

Comments

BoucherS Mar 24 at 1:03 PM 
Hi,

Please create a discussion tab to continue the discussion !
You can have a look at the LiveExplorer App available on this page : https://wpftoolkit.codeplex.com/.
Make sure your object has a default constructor and that it is not read only.

TooLz Mar 23 at 9:07 PM 
Is there any more documentation around for this control? I am able to get the dropdown to show the items I want but the buttons and the property grid stay disabled... Am I missing something? I took a look at the source and can't find much more than the events of adding deleting but nothing to enable the buttons or get the property grid itself set up (since the collection Control doesn't allow direct content. Even a quick example of setting stuff would be helpful as I can't find anything on setting it up as needed.

blachniet Jun 6, 2012 at 10:44 PM 
I guess I should've looked at the source first... It is supported, and the property to bind the support types to is NewItemTypes.

blachniet Jun 6, 2012 at 10:33 PM 
Does the collection editor support multiple types? (see "Select type:" above "Add"). If so, how do I support this?

zhoufoxcn Mar 31, 2012 at 4:03 PM 
great

veexi Oct 4, 2011 at 4:10 PM 
This is a great control, as I expected, when one of the members was an enum, the property displayed a dropdown. I need to figure out how that works when the property is an object reference, how to display a list of available references... Looking forward to any documentation on this.