ShootingStar
Member
- Joined
- Jul 8, 2005
- Messages
- 5
- Programming Experience
- 3-5
I have a user control which has a property that is an array/collection of points
I am trying to add some default values to a number of points using the DefaultValue decoration from the ComponentModel
e.g.
However this doesn't work. I don't get any errors. I'm not sure what to enter in the string for the default. I need to specify 4 points(x,y). Any ideas???
I am trying to add some default values to a number of points using the DefaultValue decoration from the ComponentModel
e.g.
VB.NET:
Imports System.ComponentModel
Public Class HomewarePolygon
Inherits UserControl
Private _NodeArray() As Point
<Category("Appearance"), DefaultValue(GetType(Point()), "{New System.Drawing.Point(10, 10), New System.Drawing.Point(10, 100), New System.Drawing.Point(100, 100), New System.Drawing.Point(100, 10)}"), Description("Gets or Sets the nodes of the polygon.")> _
Public Property NodeArray() As Point()
Get
Return _NodeArray
End Get
Set(ByVal value() As Point)
_NodeArray = value
End Set
End Property
End Class