I'm creating custom control that will draw shape from list (or array) of points. I have basic drawing functionality done, but now I'm struggling with design-time support in Visual Studio.
I've created two properties:
private Point _point;
public Point Point
{
get { return _point; }
set { _point = value; }
}
private Point[] _points;
public Point[] Points
{
get { return _points; }
set { _points = value; }
}
As seen on screen below Point
is editable, but editor for Points
isn't working. For each property I get error Object does not match target type.
If I change Point
to MyPoint
(custom class with X,Y properties) editor works just fine, but I don't want to create unneeded extra class because editor does not work when it should.
My question is: Can I use array or list of point as public property and have design-time support for it?