Foxtable(狐表)用户栏目专家坐堂 → 在全局代码,定义类属性时,属性标题描述如何定义


  共有3031人关注过本帖树形打印复制链接

主题:在全局代码,定义类属性时,属性标题描述如何定义

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/27 9:50:00 [显示全部帖子]

<System.ComponentModel.DefaultPropertyAttribute("Title")> _
Public Class SimpleProperties
    '''
    Private _Title As String
    Private _Show As Boolean
    Private _Number As Short
    '''
    <System.ComponentModel.CategoryAttribute("Application"), _
       System.ComponentModel.Browsable(True), _
       System.ComponentModel.[ReadOnly](False), _
       System.ComponentModel.BindableAttribute(False), _
       System.ComponentModel.DefaultValueAttribute(""), _
       System.ComponentModel.DesignOnly(False), _
       System.ComponentModel.DescriptionAttribute("Enter Title for the application")> _
       Public Property Title() As String
           Get
               Return _Title
           End Get
           Set(ByVal Value As String)
               _Title = Value
           End Set
       End Property
    '''
    <System.ComponentModel.CategoryAttribute("Application"), _
       System.ComponentModel.Browsable(True), _
       System.ComponentModel.[ReadOnly](False), _
       System.ComponentModel.BindableAttribute(False), _
       System.ComponentModel.DefaultValueAttribute("True"), _
       System.ComponentModel.DesignOnly(False), _
       System.ComponentModel.DescriptionAttribute("Show option")> _
       Public Property Show() As Boolean
           Get
               Return _Show
           End Get
           Set(ByVal Value As Boolean)
               _Show = Value
            End Set
       End Property
    '''
    <System.ComponentModel.CategoryAttribute("Application"), _
       System.ComponentModel.Browsable(True), _
       System.ComponentModel.[ReadOnly](False), _
       System.ComponentModel.BindableAttribute(False), _
       System.ComponentModel.DefaultValueAttribute("0"), _
       System.ComponentModel.DesignOnly(False), _
       System.ComponentModel.DescriptionAttribute("Enter a number")> _
       Public Property Number() As Short
           Get
               Return _Number
           End Get
           Set(ByVal Value As Short)
               _Number = Value
           End Set
       End Property
    '''
End Class

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/27 10:10:00 [显示全部帖子]

必须写到全局代码那里。

 回到顶部