自定义控件中的组属性 [英] Group properties in custom control
本文介绍了自定义控件中的组属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想做一个类,具有像字体,这将有其他属性,如名称,大小,单位,粗体。我试过一个解决方案,但它不工作的我的类。任何人都可以帮助吗?
I want to do a class that have properties like font, which will have other properties, such as name, size, unit,bold.I had tried a solution but it isn't working for me.(http://stackoverflow.com/questions/755391/group-properties-in-a-custom-control) Anyone can help? Any help will be appreciated.
<TypeConverter(GetType(ExpandableObjectConverter))> _
Class TestingClass
'Some property here
End Class
推荐答案
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
这篇关于自定义控件中的组属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文