ControlBindingsCollection.Remove(Binding) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes the specified Binding from the collection.
public:
void Remove(System::Windows::Forms::Binding ^ binding);
public void Remove (System.Windows.Forms.Binding binding);
override this.Remove : System.Windows.Forms.Binding -> unit
Public Sub Remove (binding As Binding)
Parameters
Exceptions
The binding
is null
.
Examples
The following code example removes a specific Binding from a TextBox control's ControlBindingsCollection. The example gets the required Binding by using the Item[] property, and removes the Binding with the Remove method.
void RemoveBackColorBinding()
{
Binding^ colorBinding = textBox1->DataBindings[ "BackColor" ];
textBox1->DataBindings->Remove( colorBinding );
}
private void RemoveBackColorBinding()
{
Binding colorBinding = textBox1.DataBindings["BackColor"];
textBox1.DataBindings.Remove(colorBinding);
}
Private Sub RemoveBackColorBinding()
Dim colorBinding As Binding = textBox1.DataBindings("BackColor")
textBox1.DataBindings.Remove(colorBinding)
End Sub
Applies to
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.