Binding.IsBinding Property

Gets a value indicating whether the binding is active.

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

public bool IsBinding { get; }
/** @property */
public boolean get_IsBinding ()

public function get IsBinding () : boolean

Not applicable.

Property Value

true if the binding is active; otherwise, false.

A binding is active when it meets these conditions:

The following code example prints the PropertyName and IsBinding value for each Binding on a form.

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 (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);
      }
   }
}


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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Show: