I have a property grid which works great!! The issue I am having with it is - if there is a property that is an ObervableCollection - when I click the "Ok" button in the collection editor, things break.
This is what the error message says - The value "Hypertest.Core.Interfaces.Variable" is not of type "Hypertest.Core.Interfaces.Variable" and cannot be used in this generic collection.
The above error is confusing because both are the same types.
In CollectionControl.cs,
This is what the error message says - The value "Hypertest.Core.Interfaces.Variable" is not of type "Hypertest.Core.Interfaces.Variable" and cannot be used in this generic collection.
The above error is confusing because both are the same types.
In CollectionControl.cs,
public void PersistChanges()
{
IList list = ComputeItemsSource();
if( list == null )
return;
//the easiest way to persist changes to the source is to just clear the source list and then add all items to it.
list.Clear();
foreach( var item in Items )
{
list.Add( item ); //THIS IS WHERE THE ISSUE OCCURS
}
}
Is there anything special that one needs to do for collections except for having an argument-less constructor on the class?