本文整理匯總了VB.NET中System.Web.UI.DataBinding.Expression屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET DataBinding.Expression屬性的具體用法?VB.NET DataBinding.Expression怎麽用?VB.NET DataBinding.Expression使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Web.UI.DataBinding
的用法示例。
在下文中一共展示了DataBinding.Expression屬性的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