Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft