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

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

Binding.Control プロパティ

バインディング属すコントロール取得します

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

使用例使用例

特定のデータ ソースの BindingManagerBase を取得し、そのデータ ソースバインドされる各 Control プロパティ情報出力するコード例次に示します。この例では、BindingManagerBase の Bindings プロパティ使用してすべてのコントロール取得してます。

Private Sub PrintBoundControls1
   ' Gets the BindingManagerBase for the Customers table.
   Dim myBindingBase As BindingManagerBase
 = _
   Me.BindingContext(ds, "Customers")

   ' Prints the information of each control managed by
   ' the BindingManagerBase.
   Dim b As Binding
   For Each b In myBindingBase.Bindings
      Console.WriteLine(b.Control.ToString)
   Next
End Sub

Private Sub PrintBoundControls2
   ' Gets the BindingManagerBase for a child table of
   ' the Customers table. The RelationName of a DataRelation
   ' is appended to the parent table's name.
   Dim myBindingBase As BindingManagerBase
 = _
   Me.BindingContext(ds, "Customers.CustToOrders")


   ' Prints the information of each control managed by
   ' the BindingManagerBase.
   Dim b As Binding
   For Each b In myBindingBase.Bindings
      Console.WriteLine(b.Control.ToString)
   Next
End Sub
private void PrintBoundControls1()
{
   // Get the BindingManagerBase for the Customers table.
   BindingManagerBase myBindingBase = 
      this.BindingContext[ds, "Customers"];

   /* Print the information of each control managed by
      the BindingManagerBase. */
   foreach(Binding b in myBindingBase.Bindings)
   {
      Console.WriteLine(b.Control.ToString());
   }
}

private void PrintBoundControls2()
{
   /* Get the BindingManagerBase for a child table of
   the Customers table. The RelationName of a DataRelation
   is appended to the parent table's name. */
   BindingManagerBase myBindingBase = 
      this.BindingContext[ds, "Customers.CustToOrders"];

   /* Print the information of each control managed by
      the BindingManagerBase. */
   foreach(Binding b in myBindingBase.Bindings)
   {
      Console.WriteLine(b.Control.ToString());
   }
}
void PrintBoundControls1()
{
   
   // Get the BindingManagerBase for the Customers table.
   BindingManagerBase^ myBindingBase = this->BindingContext[
 ds,"Customers" ];
   
   /* Print the information of each control managed by
         the BindingManagerBase. */
   System::Collections::IEnumerator^ myEnum = myBindingBase->Bindings->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Binding^ b = safe_cast<Binding^>(myEnum->Current);
      Console::WriteLine( b->Control );
   }
}

void PrintBoundControls2()
{
   
   /* Get the BindingManagerBase for a child table of
         the Customers table. The RelationName of a DataRelation
         is appended to the parent table's name. */
   BindingManagerBase^ myBindingBase = this->BindingContext[
 ds,"Customers::CustToOrders" ];
   
   /* Print the information of each control managed by
         the BindingManagerBase. */
   System::Collections::IEnumerator^ myEnum = myBindingBase->Bindings->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Binding^ b = safe_cast<Binding^>(myEnum->Current);
      Console::WriteLine( b->Control );
   }
}

private void PrintBoundControls1()
{
    // Get the BindingManagerBase for the Customers table.
    BindingManagerBase myBindingBase = 
        this.get_BindingContext().get_Item(ds, "Customers");

    /* Print the information of each control managed by
       the BindingManagerBase. 
     */
    for (int iCtr = 0; iCtr < myBindingBase.get_Bindings().get_Count();
 
        iCtr++) {
        Binding b = myBindingBase.get_Bindings().get_Item(iCtr);
        Console.WriteLine(b.get_Control().ToString());
    }
} //PrintBoundControls1

private void PrintBoundControls2()
{
    /* Get the BindingManagerBase for a child table of
       the Customers table. The RelationName of a DataRelation
       is appended to the parent table's name. 
     */
    BindingManagerBase myBindingBase = 
        this.get_BindingContext().get_Item(ds, "Customers.CustToOrders");
    /* Print the information of each control managed by
       the BindingManagerBase. 
     */
    for (int iCtr = 0; iCtr < myBindingBase.get_Bindings().get_Count();
        iCtr++) {
        Binding b = myBindingBase.get_Bindings().get_Item(iCtr);
        Console.WriteLine(b.get_Control().ToString());
    }
} //PrintBoundControls2
private function PrintBoundControls1()
{
   // Get the BindingManagerBase for the Customers table.
   var myBindingBase : BindingManagerBase = 
      this.BindingContext[ds, "Customers"];

   /* Print the information of each control managed by
      the BindingManagerBase. */
   for(var b : Binding in myBindingBase.Bindings)
   {
      Console.WriteLine(b.Control.ToString());
   }
}

private function PrintBoundControls2()
{
   /* Get the BindingManagerBase for a child table of
   the Customers table. The RelationName of a DataRelation
   is appended to the parent table's name. */
   var myBindingBase : BindingManagerBase  = 
      this.BindingContext[ds, "Customers.CustToOrders"];

   /* Print the information of each control managed by
      the BindingManagerBase. */
   for(var b : Binding in myBindingBase.Bindings)
   {
      Console.WriteLine(b.Control.ToString());
   }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS