BindingMemberInfo Structure
.NET Framework 2.0
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)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
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 Sub PrintBindingMemberInfo() Dim c As Control Dim b As Binding For Each c In Me.Controls For Each b In c.DataBindings Console.WriteLine(ControlChars.Cr + c.ToString()) Dim bInfo As BindingMemberInfo = b.BindingMemberInfo Console.WriteLine("Binding Path " + ControlChars.Tab _ + bInfo.BindingPath) Console.WriteLine("Binding Field " + ControlChars.Tab _ + bInfo.BindingField) Console.WriteLine("Binding Member " + ControlChars.Tab _ + bInfo.BindingMember) Next b Next c End Sub
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
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.
Community Additions
ADD
Show: