|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
Binding.Control, propriété
.NET Framework 4.5
Espace de noms : System.Windows.Forms
Assembly : System.Windows.Forms (dans System.Windows.Forms.dll)
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()); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.