BindingManagerBase.PositionChanged イベント
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Event PositionChanged As EventHandler
Dim instance As BindingManagerBase Dim handler As EventHandler AddHandler instance.PositionChanged, handler
public event EventHandler PositionChanged
public: event EventHandler^ PositionChanged { void add (EventHandler^ value); void remove (EventHandler^ value); }
/** @event */ public void add_PositionChanged (EventHandler value) /** @event */ public void remove_PositionChanged (EventHandler value)


Binding を作成して、TextBox コントロールの Binding オブジェクトのコレクションに追加するコード例を次に示します。さらに、この例ではデータ ソースに対する BindingManagerBase を取得し、PositionChanged イベントにデリゲートを追加しています。
Protected Sub BindControl() ' Create a Binding object for the TextBox control. ' The data-bound property for the control is the Text ' property. Dim myBinding As New Binding("Text", ds, "customers.custName") text1.DataBindings.Add(myBinding) ' Get the BindingManagerBase for the Customers table. Dim bmCustomers As BindingManagerBase = Me.BindingContext(ds, "Customers") ' Add the delegate for the PositionChanged event. AddHandler bmCustomers.PositionChanged, AddressOf Position_Changed End Sub 'BindControl Private Sub Position_Changed(sender As Object, e As EventArgs) ' Print the Position property value when it changes. Console.WriteLine(CType(sender, BindingManagerBase).Position) End Sub 'Position_Changed
protected void BindControl() { /* Create a Binding object for the TextBox control. The data-bound property for the control is the Text property. */ Binding myBinding = new Binding("Text", ds, "customers.custName"); text1.DataBindings.Add(myBinding); // Get the BindingManagerBase for the Customers table. BindingManagerBase bmCustomers = this.BindingContext [ds, "Customers"]; // Add the delegate for the PositionChanged event. bmCustomers.PositionChanged += new EventHandler(Position_Changed); } private void Position_Changed(object sender, EventArgs e) { // Print the Position property value when it changes. Console.WriteLine(((BindingManagerBase)sender).Position); }
void BindControl() { /* Create a Binding object for the TextBox control. The data-bound property for the control is the Text property. */ Binding^ myBinding = gcnew Binding( "Text",ds,"customers.custName" ); text1->DataBindings->Add( myBinding ); // Get the BindingManagerBase for the Customers table. BindingManagerBase^ bmCustomers = this->BindingContext[ ds,"Customers" ]; // Add the delegate for the PositionChanged event. bmCustomers->PositionChanged += gcnew EventHandler( this, &Form1::Position_Changed ); } private: void Position_Changed( Object^ sender, EventArgs^ /*e*/ ) { // Print the Position property value when it changes. Console::WriteLine( (dynamic_cast<BindingManagerBase^>(sender))->Position ); }
protected void BindControl() { /* Create a Binding object for the TextBox control. The data-bound property for the control is the Text property. */ Binding myBinding = new Binding("Text", ds, "customers.custName"); text1.get_DataBindings().Add(myBinding); // Get the BindingManagerBase for the Customers table. BindingManagerBase bmCustomers = this.get_BindingContext().get_Item(ds, "Customers"); // Add the delegate for the PositionChanged event. bmCustomers.add_PositionChanged(new EventHandler(Position_Changed)); } //BindControl private void Position_Changed(Object sender, EventArgs e) { // Print the Position property value when it changes. Console.WriteLine(((BindingManagerBase)(sender)).get_Position()); } //Position_Changed

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からBindingManagerBase.PositionChanged イベントを検索する場合は、下記のリンクをクリックしてください。

- BindingManagerBase.PositionChanged イベントのページへのリンク