本文整理汇总了VB.NET中System.ComponentModel.NotifyParentPropertyAttribute.NotifyParentPropertyAttribute构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET NotifyParentPropertyAttribute构造函数的具体用法?VB.NET NotifyParentPropertyAttribute怎么用?VB.NET NotifyParentPropertyAttribute使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.ComponentModel.NotifyParentPropertyAttribute
的用法示例。
在下文中一共展示了NotifyParentPropertyAttribute构造函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: NotifyParentProperty
<TypeConverter(GetType(BorderAppearanceConverter))> _
Public Class BorderAppearance
Private borderSizeValue As Integer = 1
Private borderColorValue As Color = Color.Empty
<Browsable(True), NotifyParentProperty(True), EditorBrowsable(EditorBrowsableState.Always), DefaultValue(1)> _
Public Property BorderSize() As Integer
Get
Return borderSizeValue
End Get
Set
If value < 0 Then
Throw New ArgumentOutOfRangeException("BorderSize", value, "must be >= 0")
End If
If borderSizeValue <> value Then
borderSizeValue = value
End If
End Set
End Property
<Browsable(True), NotifyParentProperty(True), EditorBrowsable(EditorBrowsableState.Always), DefaultValue(GetType(Color), "")> _
Public Property BorderColor() As Color
Get
Return borderColorValue
End Get
Set
If value.Equals(Color.Transparent) Then
Throw New NotSupportedException("Transparent colors are not supported.")
End If
If borderColorValue <> value Then
borderColorValue = value
End If
End Set
End Property
End Class