NotifyParentPropertyAttribute not working? -
12-13-2004
, 11:18 AM
Hi,
I have created a class with some simple properties:
[TypeConverter( typeof( ExpandableObjectConverter ))]
public class My3DCoordinate{
...
protected int x, y z;
public int X { get { return this.x; } set { this.x = value; } }
public override string ToString() {
return string.Format( "3DPoint({0},{1},{2})", x, y, z );
}
}
and used it as a component property. To get ist expandable, I assigned the
expandable object converter. Works fine. Except: When I edit x/y/z, the
concise form "3DPoint(0, 1, 2)" is not updated in the forms designer
property grid.
I thought it would be enough to have the public properties X, Y and Z
decorated with the NotifyParentProperty attribute, but this has not effect
on the parent, My3DCoordinate. Only the RefreshProperties attribute seems to
have the desired effect. But I don't want to have ALL my properties
refreshed...
So, why is [NotifyParentProperty( true )] not working here? Am I missing
something?
Thanks in advance,
ulrich |