16,554
社区成员
发帖
与我相关
我的任务
分享
Public Class CustomControl
Inherits System.Windows.Forms.Control
Private _MyProperty As ClassA
<System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _
Public Property MyProperty() As ClassA
Get
Return _MyProperty
End Get
Set(ByVal value As ClassA)
_MyProperty = value
End Set
End Property
End Class
<System.ComponentModel.TypeConverterAttribute(GetType(System.ComponentModel.ExpandableObjectConverter))> _
Public Class ClassA
Private newPropertyValue As String
Public Property NewProperty() As String
Get
Return newPropertyValue
End Get
Set(ByVal value As String)
newPropertyValue = value
End Set
End Property
End Class
Public Class ExTextBox
Inherits TextBox
Private nShowText As Boolean
Public Property ShowText() As Boolean
Get
Return nShowText
End Get
Set(ByVal value As Boolean)
nShowText = value
If nShowText Then
MyBase.Text = "您好"
End If
End Set
End Property
End Class