Binding.BindingManagerBase 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取此 BindingManagerBase 的 Binding。
public:
property System::Windows::Forms::BindingManagerBase ^ BindingManagerBase { System::Windows::Forms::BindingManagerBase ^ get(); };
public System.Windows.Forms.BindingManagerBase BindingManagerBase { get; }
public System.Windows.Forms.BindingManagerBase? BindingManagerBase { get; }
member this.BindingManagerBase : System.Windows.Forms.BindingManagerBase
Public ReadOnly Property BindingManagerBase As BindingManagerBase
属性值
管理该 BindingManagerBase 的 Binding。
示例
下面的代码示例获取 BindingManagerBase 窗体上每个 Binding 的 ,并打印 Position 每个 BindingManagerBase的 属性。
private:
void PrintPositions()
{
for each ( Control^ c in this->Controls )
{
for each ( Binding^ xBinding in c->DataBindings )
{
Console::WriteLine(
"{0}\t Position: {1}",
c, xBinding->BindingManagerBase->Position );
}
}
}
private void PrintPositions()
{
foreach(Control c in this.Controls)
{
foreach(Binding xBinding in c.DataBindings)
{
Console.WriteLine
(c.ToString() + "\t Position: " +
xBinding.BindingManagerBase.Position);
}
}
}
Private Sub PrintPositions
Dim c As Control
Dim xBinding As Binding
For Each c In Me.Controls
For Each xBinding In c.DataBindings
Console.WriteLine(c.ToString & ControlChars.Tab & " Position: " & _
xBinding.BindingManagerBase.Position)
Next
Next
End Sub
注解
BindingManagerBase使用 通过递增或递减 Position 属性来循环访问数据绑定列表。 类 BindingManagerBase 是抽象的。 管理 CurrencyManager 数据绑定列表的 类继承自 BindingManagerBase 类。