本文整理汇总了VB.NET中System.Web.UI.DataBinding.DataBinding构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET DataBinding构造函数的具体用法?VB.NET DataBinding怎么用?VB.NET DataBinding使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Web.UI.DataBinding
的用法示例。
在下文中一共展示了DataBinding构造函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: DataBindings
' Create a Text property with accessors that obtain
' the property value from and set the property value
' to the Text key in the DataBindingCollection class.
Public Property [Text]() As String
Get
Dim myBinding As DataBinding = DataBindings("Text")
If Not (myBinding Is Nothing) Then
Return myBinding.Expression
End If
Return String.Empty
End Get
Set(ByVal value As String)
If value Is Nothing OrElse value.Length = 0 Then
DataBindings.Remove("Text")
Else
Dim binding As DataBinding = DataBindings("Text")
If binding Is Nothing Then
binding = New DataBinding("Text", GetType(String), value)
Else
binding.Expression = value
End If
' Call the DataBinding constructor, then add
' the initialized DataBinding object to the
' DataBindingCollection for this custom designer.
Dim binding1 As DataBinding = CType(DataBindings.SyncRoot, DataBinding)
DataBindings.Add(binding)
DataBindings.Add(binding1)
End If
PropertyChanged("Text")
End Set
End Property