Binding.BindingManagerBase 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得此 BindingManagerBase 的 Binding。
public:
property System::Windows::Forms::BindingManagerBase ^ BindingManagerBase { System::Windows::Forms::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 類別。