System.Windows.Forms.ConvertEventArgs Class

Provides data for the Binding.Format and Binding.Parse events.

See Also: ConvertEventArgs Members


public class ConvertEventArgs : EventArgs


The System.Windows.Forms.ConvertEventArgs is used to format and unformat values displayed by a Windows Forms control that is bound to data through a System.Windows.Forms.Binding object. The Binding.Format event occurs whenever a control property is bound to a value and the Binding.Parse event occurs whenever the bound value changes.

The Binding.Format and Binding.Parse events allow you to create custom formats for displaying data. For example, if the data in a table is of type decimal, you can specify that the data should be displayed in the local currency format--by setting the ConvertEventArgs.Value property of the System.Windows.Forms.ConvertEventArgs to the formatted value in the Binding.Format event. You must consequently unformat the displayed value in the Binding.Parse event.

For more information about handling events, see [<topic://cpconEventsOverview>].


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0,