BindingManagerBase.Bindings Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the collection of bindings being managed.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

Public ReadOnly Property Bindings As BindingsCollection

Property Value

Type: System.Windows.Forms.BindingsCollection

A BindingsCollection that contains the Binding objects managed by this BindingManagerBase.

The following code example gets the BindingManagerBase for a specific data source. The example then uses the Bindings property to print information about each control bound to the same data source.

Private Sub PrintBoundControls()
    Dim myBindingBase As BindingManagerBase = Me.BindingContext(ds, "customers")
    Dim b As Binding
    For Each b In  myBindingBase.Bindings
        Console.WriteLine(b.Control.ToString())
    Next b
End Sub 'PrintBoundControls

.NET Framework
Available since 1.1
Return to top
Show: