Issue

When a SelectedItemCollection is passed into a RelayCommand delegate, it might be trickier than expected to actually get the values out of the parameter.

Solution

You can use a special cast setup to get the collection into a simpler List<string> form:

private RelayCommand<object> _backCommand;  
public RelayCommand<object> BackCommand 
	=> _backCommand ?? (_backCommand = new RelayCommand<object>(NavigateBack));
 
...
 
private void NavigateBack(object finalDescriptors)  
{  
    List<string> finalDescriptorsList = 
	    (finalDescriptors as IList)?.Cast<string>().ToList()  
		?? new List<string>();  
    WeakReferenceMessenger.Default.Send(new NavigateMessage()  
    {  
        DestinationViewModel = new SelectionViewModel(
        _completedQuestions, 
        5, 
        finalDescriptorsList?.ToList(), 
		UserInfo)  
    });}

c_sharp development wpf