This documentation is archived and is not being maintained.

BindingManagerBase.Bindings Property

Gets the collection of bindings being managed.

[Visual Basic]
Public ReadOnly Property Bindings As BindingsCollection
public BindingsCollection Bindings {get;}
public: __property BindingsCollection* get_Bindings();
public function get Bindings() : BindingsCollection;

Property Value

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


[Visual Basic, C#, C++] The following 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.

[Visual Basic] 
Private Sub PrintBoundControls()
    Dim myBindingBase As BindingManagerBase = Me.BindingContext(ds, "customers")
    Dim b As Binding
    For Each b In  myBindingBase.Bindings
    Next b
End Sub 'PrintBoundControls

private void PrintBoundControls()
   BindingManagerBase myBindingBase = this.BindingContext[ds, "customers"];
   foreach(Binding b in myBindingBase.Bindings)

void PrintBoundControls()
   BindingManagerBase* myBindingBase = this->BindingContext->Item[ds, S"customers"];
   System::Collections::IEnumerator* myEnum = myBindingBase->Bindings->GetEnumerator();
   while (myEnum->MoveNext())
      Binding* b = __try_cast<Binding*>(myEnum->Current);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

BindingManagerBase Class | BindingManagerBase Members | System.Windows.Forms Namespace | Binding | BindingContext