【问题标题】:Group properties in custom control自定义控件中的组属性
【发布时间】:2012-04-11 05:21:48
【问题描述】:

我想做一个具有字体等属性的类,该类将具有其他属性,例如名称、大小、单位、粗体。我尝试了一个解决方案,但它对我不起作用。(http:// stackoverflow.com/questions/755391/group-properties-in-a-custom-control) 任何人都可以帮忙吗?任何帮助将不胜感激。

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

【问题讨论】:

    标签: vb.net class properties


    【解决方案1】:
    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
    

    【讨论】:

    • 嗨 Joel,当我在“Font”类之前添加此代码“ _”时效果很好,属性现在显示在 IDE 属性窗口中,谢谢很多你的帮助。 ——
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多