2012-04-10 60 views
0

我想做一个具有类似字体属性的类,该类将具有其他属性,例如名称,大小,单位,粗体。我试过了一个解决方案,但它不适用于我。 (http://stackoverflow.com/questions/755391/group-properties-in-a-custom-control) 任何人都可以提供帮助吗?任何帮助将不胜感激。在自定义控件中的组属性

<TypeConverter(GetType(ExpandableObjectConverter))> _ 
Class TestingClass 
'Some property here 
End Class 

回答

0
Public Class Font 
    Public Property Name As String 
    Public Property Unit As Integer 
    Public Property Bold As Boolean 
End Class 

Public Class TestingClass 
    Public Property TestFont As New Font() 
End Class 
+0

喜珥,它完美的作品时,我的“字体”课前添加该代码“<类型转换器(的GetType(ExpandableObjectConverter))> _”的属性在IDE属性窗口中显示现在,由于很多为你的帮助。 - – Gunners98 2012-04-11 03:24:36