BindingMemberInfo.BindingPath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the property name, or the period-delimited hierarchy of property names, that comes before the property name of the data-bound object.
public:
property System::String ^ BindingPath { System::String ^ get(); };
public string BindingPath { get; }
member this.BindingPath : string
Public ReadOnly Property BindingPath As String
Property Value
The property name, or the period-delimited hierarchy of property names, that comes before the data-bound object property name.
Examples
The following code example gets the BindingMemberInfo of each Binding on a form, and prints the BindingPath, BindingField, and BindingMember property values of BindingMemberInfo.
private:
void PrintBindingMemberInfo()
{
Console::WriteLine( "\n BindingMemberInfo" );
for each ( Control^ thisControl in this->Controls )
{
for each ( Binding^ thisBinding in thisControl->DataBindings )
{
BindingMemberInfo bInfo = thisBinding->BindingMemberInfo;
Console::WriteLine( "\t BindingPath: {0}", bInfo.BindingPath );
Console::WriteLine( "\t BindingField: {0}", bInfo.BindingField );
Console::WriteLine( "\t BindingMember: {0}", bInfo.BindingMember );
Console::WriteLine();
}
}
}
private void PrintBindingMemberInfo()
{
Console.WriteLine("\n BindingMemberInfo");
foreach(Control thisControl in this.Controls)
{
foreach(Binding thisBinding in thisControl.DataBindings)
{
BindingMemberInfo bInfo = thisBinding.BindingMemberInfo;
Console.WriteLine("\t BindingPath: " + bInfo.BindingPath);
Console.WriteLine("\t BindingField: " + bInfo.BindingField);
Console.WriteLine("\t BindingMember: " +
bInfo.BindingMember);
Console.WriteLine();
}
}
}
Private Sub PrintBindingMemberInfo()
Console.WriteLine(ControlChars.Cr + " BindingMemberInfo")
Dim thisControl As Control
Dim thisBinding As Binding
For Each thisControl In Me.Controls
For Each thisBinding In thisControl.DataBindings
Dim bInfo As BindingMemberInfo = _
thisBinding.BindingMemberInfo
Console.WriteLine(ControlChars.Tab + _
" BindingPath: " + bInfo.BindingPath)
Console.WriteLine(ControlChars.Tab + _
" BindingField: " + bInfo.BindingField)
Console.WriteLine(ControlChars.Tab + _
" BindingMember: " + bInfo.BindingMember)
Console.WriteLine()
Next thisBinding
Next thisControl
End Sub
Remarks
The BindingPath is the period delimited combination of property names that comes before the BindingField in the navigational path returned by the BindingMember property. For example, when a new Binding is created that has a dataMember
parameter of "Customers.custToOrders.OrderDate", BindingPath will return "Customers.custToOrders".
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기