I am getting the List of selected Items from WPF Attached Behavioral for ListBox as below:
private void ListBoxSelectionChanged(object param)
{
var selectedItems = param;
SelectedMItems = selectedItems.ToString().Split(',').ToList<string>();
//Console.WriteLine(selectedItems.ToString());
}
Though it works , is there any other better way.
ObservableCollection<string>?.ToString(). You haven't given any details about the object so I won't project any such confidence for you.