Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

BindingMemberInfo Structure

Contains information that enables a Binding to resolve a data binding to either the property of an object or the property of the current object in a list of objects.

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

public struct BindingMemberInfo
public final class BindingMemberInfo extends ValueType
JScript suports the use of structures, but not the declaration of new ones.

The BindingMemberInfo is returned by the BindingMemberInfo property of the Binding class.

The BindingMemberInfo is created from the string passed to the BindingMemberInfo constructor.

The following code example prints the BindingPath, BindingField, BindingMember for each control on a form.

private void PrintBindingMemberInfo()
{
   foreach(Control c in this.Controls)
   {
      foreach(Binding b in c.DataBindings)
      {
         Console.WriteLine("\n" + c.ToString());
         BindingMemberInfo bInfo = b.BindingMemberInfo;
         Console.WriteLine("Binding Path \t" + bInfo.BindingPath);
         Console.WriteLine("Binding Field \t" + bInfo.BindingField);
         Console.WriteLine("Binding Member \t" + bInfo.BindingMember);
      }
   }
}

private void PrintBindingMemberInfo()
{
    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()));
            BindingMemberInfo bInfo = b.get_BindingMemberInfo();
            Console.WriteLine(("Binding Path \t" 
                + bInfo.get_BindingPath()));
            Console.WriteLine(("Binding Field \t"  
                + bInfo.get_BindingField()));
            Console.WriteLine(("Binding Member \t"  
                + bInfo.get_BindingMember()));
        }
    }
} //PrintBindingMemberInfo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.