共用方式為


Binding.BindingManagerBase 屬性

定義

取得此 BindingManagerBaseBinding

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

管理這個 BindingManagerBaseBinding

範例

下列程式碼範例會取得 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 類別。

適用於