How to assign SelectedItems to a list

Mar 13, 2009 at 3:18 AM
When I want to assign the SelectedItems to a List<MyDataItemType>, it return null? Why, do I need pay attention something? I can use foreach to access the selected item one by one?
Coordinator
Mar 13, 2009 at 6:53 PM
You will need to iterate over the items in your List<MyDataItemType> and add them individually to SelectedItems using SelectedItems.Add. If you want to transfer changes in SelectedItems back to your List, then you can attach to the CollectionChanged event.

Ben