|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
BindingsCollection (Clase)
System.MarshalByRefObject
System.Windows.Forms.BaseCollection
System.Windows.Forms.BindingsCollection
System.Windows.Forms.ControlBindingsCollection
Espacio de nombres: System.Windows.Forms
Ensamblado: System.Windows.Forms (en System.Windows.Forms.dll)
El tipo BindingsCollection expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | Count | |
![]() | IsReadOnly | |
![]() | IsSynchronized | |
![]() | Item | |
![]() | List | Infraestructura. |
![]() | SyncRoot |
| Nombre | Descripción | |
|---|---|---|
![]() | Add | |
![]() | AddCore | Infraestructura. |
![]() | Clear | |
![]() | ClearCore | Infraestructura. |
![]() | CopyTo | |
![]() | CreateObjRef | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | GetEnumerator | |
![]() | GetHashCode | |
![]() | GetLifetimeService | |
![]() | GetType | |
![]() | InitializeLifetimeService | |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | |
![]() | OnCollectionChanged | |
![]() | OnCollectionChanging | |
![]() | Remove | |
![]() | RemoveAt | |
![]() | RemoveCore | Infraestructura. |
![]() | ShouldSerializeMyAll | |
![]() | ToString |
| Nombre | Descripción | |
|---|---|---|
![]() | CollectionChanged | |
![]() | CollectionChanging |
private void BindTextBoxControl() { DataSet myDataSet = new DataSet(); /* Insert code to populate the DataSet with tables, columns, and data. */ // Creates a new Binding object. Binding myBinding = new Binding ("Text", myDataSet, "customers.custToOrders.OrderAmount"); // Adds event delegates for the Parse and Format events. myBinding.Parse += new ConvertEventHandler(CurrencyToDecimal); myBinding.Format += new ConvertEventHandler(DecimalToCurrency); // Adds the new Binding to the BindingsCollection. text1.DataBindings.Add(myBinding); } private void DecimalToCurrency(object sender, ConvertEventArgs cevent) { /* This method is the Format event handler. Whenever the control displays a new value, the value is converted from its native Decimal type to a string. The ToString method then formats the value as a Currency, by using the formatting character "c". */ cevent.Value = ((decimal) cevent.Value).ToString("c"); } private void CurrencyToDecimal(object sender, ConvertEventArgs cevent) { /* This method is the Parse event handler. The Parse event occurs whenever the displayed value changes. The static Parse method of the Decimal structure converts the string back to its native Decimal type. */ cevent.Value = Decimal.Parse(cevent.Value.ToString(), NumberStyles.Currency, null); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
