I have a ObservableCollection<string> property with custom validation done by IDataErrorInfo.
If one of the strings in the collection does not validate, the propertygrid does not show the validation error. If I manually redraw the control (i.e. changing back and forth between tabs in my app) the red box and the validation error info appears.
Validation of simple string properties works correct, the red box is shown immediately.
Version 2.0
Comments: ** Comment from web user: maos **
If one of the strings in the collection does not validate, the propertygrid does not show the validation error. If I manually redraw the control (i.e. changing back and forth between tabs in my app) the red box and the validation error info appears.
Validation of simple string properties works correct, the red box is shown immediately.
Version 2.0
Comments: ** Comment from web user: maos **
I also managed to reproduce the validation problem.
If you change the button click handler to create a new collection containing "Banana", the PropertyGrid will remove the red box when clicking the button, even though the collection still contains "Banana".
private void Button_Click( object sender, RoutedEventArgs e )
{
myClass.MyCollection = new ObservableCollection<string>(){"Banana"};
}