I send the selected items to a specific command when the selection changes (each item is a class X)
I get them as object how can I convert it to a list?
I tried:
1. IList<x> SelectedItemsList = obj as ObservableCollection<x>;
2. IList<x> SelectedItemsList = obj as IList<x>;
3. List<x> SelectedItemsList = obj as List<x>;
It did not help.
This type of list: System.Windows.Controls.SelectedItemCollection
I want to convert it to my list: ObservableCollection<x>/IList<x>/List<x>
(the ViewModel not recognized a list of controls of wpf)