BindingManagerBase.Bindings Property

 

Gets the collection of bindings being managed.

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

public BindingsCollection Bindings { get; }

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 void PrintBoundControls()
{
   BindingManagerBase myBindingBase = this.BindingContext[ds, "customers"];
   foreach(Binding b in myBindingBase.Bindings)
   {
      Console.WriteLine(b.Control.ToString());
   }
}

.NET Framework
Available since 1.1
Return to top
Show: