Szerkesztés

Megosztás a következőn keresztül:


ToolStrip.BindingContext Property

Definition

Gets or sets the binding context for the ToolStrip.

public:
 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; }
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

Property Value

A BindingContext for the ToolStrip.

Remarks

The BindingContext of a ToolStrip returns a single BindingManagerBase for all data-bound controls contained by the ToolStrip. The BindingManagerBase keeps all controls that are bound to the same data source synchronized. For example, setting the Position property of the BindingManagerBase specifies the item in the underlying list that all data-bound controls point to.

For more information about creating a new BindingContext and assigning it to the BindingContext property, see the BindingContext constructor.

Notes to Inheritors

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. You are not required to override both the get and set accessors of the BindingContext property; you can override only one, if needed.

Applies to