Hello
I have the setup as described below. I use the trial version binaries 2009.3.1314.35.
If you run this example and try to insert a new row by pressing the 'insert'-Key, then you result in an ArgumentException:
{"Property with specified name: cannot be found on type: WpfApplication1.SimpleObject\r\nParameter name: propertyName"}.
The problem seems to be the 'SimpleObject'-Class. If you remove, or comment out, the ICustomTypeDescriptor interface from the class declaration then everything works ok.
Do you know this problem? Is there a solution or a work around?
Best regards,
Franziska
xaml:
Code behind:
DataContext:
PMod:
Simple Object:
class SimpleObject : ICustomTypeDescriptor
{
public string Descriptor
{
get; set;
}
#region Implementation of ICustomTypeDescriptor
public AttributeCollection GetAttributes()
{
return TypeDescriptor.GetAttributes(this, true);
}
public string GetClassName()
{
return TypeDescriptor.GetClassName(this, true);
}
public string GetComponentName()
{
return TypeDescriptor.GetComponentName(this, true);
}
public TypeConverter GetConverter()
{
return TypeDescriptor.GetConverter(this, true);
}
public EventDescriptor GetDefaultEvent()
{
return TypeDescriptor.GetDefaultEvent(this, true);
}
public PropertyDescriptor GetDefaultProperty()
{
return TypeDescriptor.GetDefaultProperty(this, true);
}
public object GetEditor(Type editorBaseType)
{
return TypeDescriptor.GetEditor(this, editorBaseType, true);
}
public EventDescriptorCollection GetEvents()
{
return TypeDescriptor.GetEvents(this, true);
}
public EventDescriptorCollection GetEvents(Attribute[] attributes)
{
return TypeDescriptor.GetEvents(this, attributes, true);
}
public PropertyDescriptorCollection GetProperties()
{
return GetProperties(null);
}
public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
return TypeDescriptor.GetProperties(this, attributes, true);
}
public object GetPropertyOwner(PropertyDescriptor pd)
{
return this;
}
#endregion
}