BindingManagerBase.Position プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BindingManagerBase.Position プロパティの意味・解説 

BindingManagerBase.Position プロパティ

派生クラスオーバーライドされると、このデータ ソースバインドされたコントロールが指す、基になるリストでの位置取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説

Position プロパティ使用して、BindingManagerBase によって維持されている、基になるリスト反復処理ます。最初の項目に移動するには、Position を 0 に設定しますリスト末尾移動するには、PositionCount プロパティから 1 を引いた値に設定します

PositionChanged イベントは、Position プロパティの値が変更される発生します

使用例使用例

Position プロパティ設定する 4 つメソッドコード例次に示しますMoveNext メソッドは、プロパティを 1 ずつインクリメントます。MovePrevious メソッドは、プロパティを 1 ずつデクリメントます。MoveFirst メソッドは、プロパティを 0 に設定しますMoveLast メソッドは、プロパティCount プロパティから 1 を引いた値に設定します

Private Sub BindingManagerBase_CurrentChanged(sender
 As Object, e As EventArgs)
    ' Print the new value of the current object.
    Console.Write("Current Changed: ")
    Console.WriteLine(CType(sender, BindingManagerBase).Current)
End Sub 'BindingManagerBase_CurrentChanged


Private Sub MoveNext()
    ' Increment the Position property value by one.
    myBindingManagerBase.Position += 1
End Sub 'MoveNext


Private Sub MovePrevious()
    ' Decrement the Position property value by one.
    myBindingManagerBase.Position -= 1
End Sub 'MovePrevious


Private Sub MoveFirst()
    ' Go to the first item in the list.
    myBindingManagerBase.Position = 0
End Sub 'MoveFirst


Private Sub MoveLast()
    ' Go to the last row in the list.
    myBindingManagerBase.Position = myBindingManagerBase.Count - 1
End Sub 'MoveLast
private void BindingManagerBase_CurrentChanged
(object sender, EventArgs e)
{
   // Print the new value of the current object.
   Console.Write("Current Changed: ");
   Console.WriteLine(((BindingManagerBase)sender).Current);
}

private void MoveNext()
{
   // Increment the Position property value by one.
   myBindingManagerBase.Position += 1;
}

private void MovePrevious()
{
   // Decrement the Position property value by one.
   myBindingManagerBase.Position -= 1;
}

private void MoveFirst()
{
   // Go to the first item in the list.
   myBindingManagerBase.Position = 0;
}

private void MoveLast()
{
   // Go to the last row in the list.
   myBindingManagerBase.Position = 
   myBindingManagerBase.Count - 1;
}
   
private:
   void BindingManagerBase_CurrentChanged( Object^ sender, EventArgs^
 /*e*/ )
   {
      // Print the new value of the current object.
      Console::Write( "Current Changed: " );
      Console::WriteLine( ( (BindingManagerBase^)(sender) )->Current );
   }

   void MoveNext()
   {
      // Increment the Position property value by one.
      myBindingManagerBase->Position = myBindingManagerBase->Position + 1;
   }

   void MovePrevious()
   {
      // Decrement the Position property value by one.
      myBindingManagerBase->Position = myBindingManagerBase->Position - 1;
   }

   void MoveFirst()
   {
      // Go to the first item in the list.
      myBindingManagerBase->Position = 0;
   }

   void MoveLast()
   {
      // Go to the last row in the list.
      myBindingManagerBase->Position = myBindingManagerBase->Count - 1;
   }
private void BindingManagerBase_CurrentChanged(Object
 sender, EventArgs e)
{
    // Print the new value of the current object.
    Console.Write("Current Changed: ");
    Console.WriteLine(((BindingManagerBase)(sender)).get_Current());
} //BindingManagerBase_CurrentChanged

private void MoveNext()
{
    // Increment the Position property value by one.
    myBindingManagerBase.set_Position(myBindingManagerBase.get_Position()
        + 1);
} //MoveNext

private void MovePrevious()
{
    // Decrement the Position property value by one.
    myBindingManagerBase.set_Position(myBindingManagerBase.get_Position() 
        - 1);
} //MovePrevious

private void MoveFirst()
{
    // Go to the first item in the list.
    myBindingManagerBase.set_Position(0);
} //MoveFirst

private void MoveLast()
{
    // Go to the last row in the list.
    myBindingManagerBase.set_Position(myBindingManagerBase.get_Count() - 1);
} //MoveLast
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
BindingManagerBase クラス
BindingManagerBase メンバ
System.Windows.Forms 名前空間
PositionChanged
BindingManagerBase.Current プロパティ
BindingManagerBase.Count プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からBindingManagerBase.Position プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からBindingManagerBase.Position プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からBindingManagerBase.Position プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「BindingManagerBase.Position プロパティ」の関連用語

BindingManagerBase.Position プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BindingManagerBase.Position プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS