Represents a collection of Binding objects for a control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Gets the total number of bindings in the collection.(Overrides BaseCollection.Count.)
Gets a value indicating whether the collection is read-only.(Inherited from BaseCollection.)
Gets the Binding at the specified index.
This API supports the product infrastructure and is not intended to be used directly from your code. Gets the bindings in the collection as an object.(Overrides BaseCollection.List.)
Adds the specified binding to the collection.
This API supports the product infrastructure and is not intended to be used directly from your code. Adds a Binding to the collection.
Clears the collection of binding objects.
This API supports the product infrastructure and is not intended to be used directly from your code. Clears the collection of any members.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Gets the object that enables iterating through the members of the collection.(Inherited from BaseCollection.)
Serves as the default hash function. (Inherited from Object.)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)
Raises the CollectionChanged event.
Raises the CollectionChanging event.
Deletes the specified binding from the collection.
Deletes the binding from the collection at the specified index.
This API supports the product infrastructure and is not intended to be used directly from your code. Removes the specified Binding from the collection.
Gets a value that indicates whether the collection should be serialized.
Returns a string that represents the current object.(Inherited from Object.)
Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)
Private Sub BindTextBoxControl() Dim myDataSet As New DataSet() ' Insert code to populate the DataSet with tables, columns, and data. ' Creates a new Binding object. Dim myBinding As New Binding("Text", myDataSet, _ "customers.custToOrders.OrderAmount") ' Adds event delegates for the Parse and Format events. AddHandler myBinding.Parse, AddressOf CurrencyToDecimal AddHandler myBinding.Format, AddressOf DecimalToCurrency ' Adds the new Binding to the BindingsCollection. text1.DataBindings.Add(myBinding) End Sub Private Sub DecimalToCurrency(sender As Object, _ cevent As ConvertEventArgs) ' This method is the Format event handler. Whenever the ' control displays a new value, the value is converted from ' its native Decimal type to a string. The ToString method ' then formats the value as a Currency, by using the ' formatting character "c". cevent.Value = CDec(cevent.Value).ToString("c") End Sub Private Sub CurrencyToDecimal(sender As Object, _ cevent As ConvertEventArgs) ' This method is the Parse event handler. The Parse event ' occurs whenever the displayed value changes. The static ' Parse method of the Decimal structure converts the ' string back to its native Decimal type. cevent.Value = Decimal.Parse(cevent.Value.ToString(), _ NumberStyles.Currency, nothing) End Sub
Available since 1.1
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.