How can I set the selected items in a WPF ListView programmatically?
Basically, I have a List<SomeEntity>
and a ListView that is bound to another List<SomeEntity>
. I need to mark the items that exist on the first list as selected.
listviewwpf
How can I set the selected items in a WPF ListView programmatically?
Basically, I have a List<SomeEntity>
and a ListView that is bound to another List<SomeEntity>
. I need to mark the items that exist on the first list as selected.
Best Answer
http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox.selecteditems.aspx