I have a MVVM WPF application. In the view, I have multiselect ListBox. In ViewModel, I have a property for selected items in a list.
Using a technique similar to the one in the answer to this question , I can bind my property to ListBox.
But I also want to do data validation with IDataErrorInfo. All I want to do is check that the user has selected at least one item in the list. Adding ValidatesOnDataErrors=Trueto the binding does not work.
Is there a way to have a multi selector list associated with IDataErrorInfo data?
source
share