Public Class MyComponent
Inherits Component
Implements IBindableComponent, INotifyPropertyChanged
Private mDataBindings As ControlBindingsCollection
Public Event PropertyChanged(ByVal sender As Object, ByVal e _
As System.ComponentModel.PropertyChangedEventArgs) _
Implements INotifyPropertyChanged.PropertyChanged
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
End Sub
Public Sub New()
mDataBindings = New ControlBindingsCollection(Me)
End Sub
<DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) _
, EditorBrowsable(EditorBrowsableState.Advanced) _
, Browsable(False)> _
Public Property BindingContext() As BindingContext Implements IBindableComponent.BindingContext
Get
Return mDataBindings.BindableComponent.BindingContext
End Get
Set(ByVal value As BindingContext)
mDataBindings.BindableComponent.BindingContext = value
End Set
End Property
<ParenthesizePropertyName(True) _
, RefreshProperties(RefreshProperties.All) _
, DesignerSerializationVisibility(DesignerSerializationVisibility.Content) _
, Category("Data")> _
Public ReadOnly Property DataBindings() As ControlBindingsCollection Implements IBindableComponent.DataBindings
Get
Return mDataBindings
End Get
End Property
End Class