Freigeben über


Binding.IsBinding-Eigenschaft

Ruft einen Wert ab, der angibt, ob die Bindung aktiv ist.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public ReadOnly Property IsBinding As Boolean
'Usage
Dim instance As Binding
Dim value As Boolean

value = instance.IsBinding
public bool IsBinding { get; }
public:
property bool IsBinding {
    bool get ();
}
/** @property */
public boolean get_IsBinding ()
public function get IsBinding () : boolean

Eigenschaftenwert

true, wenn die Bindung aktiv ist, andernfalls false.

Hinweise

Eine Bindung ist aktiv, wenn sie diese Bedingungen erfüllt:

Beispiel

Im folgenden Codebeispiel werden der PropertyName-Wert und der IsBinding-Wert für jedes Binding in einem Formular ausgegeben.

Private Sub PrintBindingIsBinding
    Dim c As Control
    Dim b As Binding
    For Each c In Me.Controls
        For Each b in c.DataBindings
            Console.WriteLine (ControlChars.CrLf & c.ToString)
            Console.WriteLine (b.PropertyName & " IsBinding: " & _
                b.IsBinding)
        Next
    Next
End Sub
private void PrintBindingIsBinding()
{
   foreach(Control c in this.Controls)
   {
      foreach(Binding b in c.DataBindings)
      {
         Console.WriteLine("\n" + c.ToString());
         Console.WriteLine(b.PropertyName + " IsBinding: " 
             + b.IsBinding);
      }
   }
}
private:
   void PrintBindingIsBinding()
   {
      for each ( Control^ c in this->Controls )
      {
         for each ( Binding^ b in c->DataBindings )
         {
            Console::WriteLine( "\n {0}", c );
            Console::WriteLine( "{0} IsBinding: {1}",
               b->PropertyName, b->IsBinding );
         }
      }
   }
private void PrintBindingIsBinding()
{
    for (int iCtr1 = 0; iCtr1 < this.get_Controls().get_Count(); iCtr1++) {
        Control c = this.get_Controls().get_Item(iCtr1);
        for (int iCtr2 = 0; iCtr2 < c.get_DataBindings().get_Count(); 
            iCtr2++) {
            Binding b = c.get_DataBindings().get_Item(iCtr2);
            Console.WriteLine(("\n" + c.ToString()));
            Console.WriteLine((b.get_PropertyName() + " IsBinding: " 
                + b.get_IsBinding()));
        }
    }
} //PrintBindingIsBinding
private function PrintBindingIsBinding()
{
   for(var c : Control in this.Controls)
   {
      for(var b : Binding in c.DataBindings)
      {
         Console.WriteLine("\n" + c.ToString());
         Console.WriteLine(b.PropertyName + " IsBinding: " 
             + b.IsBinding);
      }
   }
}

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

Binding-Klasse
Binding-Member
System.Windows.Forms-Namespace