ControlBindingsCollection.Remove(Binding) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Löscht den angegebenen Binding Wert aus der Auflistung.
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)
Parameter
Ausnahmen
binding ist null.
Beispiele
Im folgenden Codebeispiel wird ein bestimmtes Binding Element aus den Steuerelementen TextBoxControlBindingsCollection entfernt. 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