BindingManagerBase::Bindings Property
.NET Framework (current version)
Gets the collection of bindings being managed.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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.
void PrintBoundControls() { BindingManagerBase^ myBindingBase = this->BindingContext[ ds,"customers" ]; System::Collections::IEnumerator^ myEnum = myBindingBase->Bindings->GetEnumerator(); while ( myEnum->MoveNext() ) { Binding^ b = safe_cast<Binding^>(myEnum->Current); Console::WriteLine( b->Control ); } }
.NET Framework
Available since 1.1
Available since 1.1
Show: