Following example shows an usercontrol whose property, PropertyValue is bindable. This value is shown in usercontrol using a TextBox(tbPropertyValue). To use this control create a user control in your project, copy/paste the following code, build your application, drop the usercontrol from toolbox to your application, use databindings property to assign binding field to PropertyValue.
Imports System.ComponentModel
Friend Class BindableControl
Public Event ValueChanged As PropertyChangedEventHandler
<System.ComponentModel.Bindable(True, BindingDirection.TwoWay)> _
Public Property PropertyValue() As String
Get
Return tbPropertyValue.Text
End Get
Set(ByVal value As String)
Dim ppe As PropertyChangedEventArgs = New PropertyChangedEventArgs("PropertyValue")
OnValueChanged(ppe)
tbPropertyValue.Text = value
End Set
End Property
Public Sub OnValueChanged(ByVal e As System.ComponentModel.PropertyChangedEventArgs)
RaiseEvent ValueChanged(Me, e)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbPropertyValue.TextChanged
PropertyValue = tbPropertyValue.Text
End Sub
End Class
9f32afc3-8890-4d21-8777-b3c8feb41cf7|2|3.0