A comment on DefaultValue . . .
The DefaultValue will work for most simple types (strings, etc), but, if you want something more complex, like a Font, then the ShouldSerializeXXXX and ResetXXXX technique should be used:
<Category("Appearance"), Description("Controls the font of the items represented in the trees")> _ Public Property TreeviewFont() As Font Get 'yadda yadda End Get Set(ByVal Value As Font) 'yadda yadda End Set End Property
Private Function ShouldSerializeTreeviewFont() As Boolean Return Not TreeviewFont.Equals(New Font("Microsoft Sans Serif", 8.25)) End Function
Private Sub ResetTreeviewFont() TreeviewFont = New Font("Microsoft Sans Serif", 8.25) End Sub
|