ToolStrip.BindingContext ToolStrip.BindingContext ToolStrip.BindingContext ToolStrip.BindingContext Property


取得或設定 ToolStrip 的繫結內容。Gets or sets the binding context for the ToolStrip.

 virtual property System::Windows::Forms::BindingContext ^ BindingContext { System::Windows::Forms::BindingContext ^ get(); void set(System::Windows::Forms::BindingContext ^ value); };
public override System.Windows.Forms.BindingContext BindingContext { get; set; }
member this.BindingContext : System.Windows.Forms.BindingContext with get, set
Public Overrides Property BindingContext As BindingContext



的會針對所包含的BindingManagerBase ToolStrip所有資料繫結控制項,傳回單一。 BindingContext ToolStripThe BindingContext of a ToolStrip returns a single BindingManagerBase for all data-bound controls contained by the ToolStrip. BindingManagerBase將系結至相同資料來源的所有控制項保持同步。The BindingManagerBase keeps all controls that are bound to the same data source synchronized. 例如,設定Position的屬性BindingManagerBase會指定基礎清單中所有資料繫結控制項指向的專案。For example, setting the Position property of the BindingManagerBase specifies the item in the underlying list that all data-bound controls point to.

如需建立新BindingContext的,並將它指派BindingContext給屬性的詳細資訊, BindingContext請參閱函式。For more information about creating a new BindingContext and assigning it to the BindingContext property, see the BindingContext constructor.


覆寫衍生BindingContext類別中的屬性時, 請使用基類的BindingContext屬性來擴充基底實作為。When overriding the BindingContext property in a derived class, use the base class's BindingContext property to extend the base implementation. 否則, 您必須提供所有的實作為。Otherwise, you must provide all the implementation. 您不需要覆寫get BindingContext屬性的和set存取子,您可以視需要覆寫其中一個。You are not required to override both the get and set accessors of the BindingContext property; you can override only one, if needed.