Rename Managed.Windows.Forms to System.Windows.Forms for consistency.
[mono.git] / mcs / class / System.Windows.Forms / Documentation / en / System.Windows.Forms / ConvertEventArgs.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="ConvertEventArgs" FullName="System.Windows.Forms.ConvertEventArgs">
3   <TypeSignature Language="C#" Value="public class ConvertEventArgs : EventArgs" />
4   <AssemblyInfo>
5     <AssemblyName>System.Windows.Forms</AssemblyName>
6     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
7     <AssemblyVersion>2.0.0.0</AssemblyVersion>
8   </AssemblyInfo>
9   <Base>
10     <BaseTypeName>System.EventArgs</BaseTypeName>
11   </Base>
12   <Interfaces />
13   <Docs>
14     <remarks>
15       <attribution license="cc4" from="Microsoft" modified="false" />
16       <para>The <see cref="T:System.Windows.Forms.ConvertEventArgs" /> is used to format and unformat values displayed by a Windows Forms control that is bound to data through a <see cref="T:System.Windows.Forms.Binding" /> object. The <see cref="E:System.Windows.Forms.Binding.Format" /> event occurs whenever a control property is bound to a value and the <see cref="E:System.Windows.Forms.Binding.Parse" /> event occurs whenever the bound value changes.</para>
17       <para>The <see cref="E:System.Windows.Forms.Binding.Format" /> and <see cref="E:System.Windows.Forms.Binding.Parse" /> events allow you to create custom formats for displaying data. For example, if the data in a table is of type <see cref="T:System.Decimal" />, you can specify that the data should be displayed in the local currency format--by setting the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property of the <see cref="T:System.Windows.Forms.ConvertEventArgs" /> to the formatted value in the <see cref="E:System.Windows.Forms.Binding.Format" /> event. You must consequently unformat the displayed value in the <see cref="E:System.Windows.Forms.Binding.Parse" /> event.</para>
18       <para>For more information about handling events, see <format type="text/html"><a href="01E4F1BC-E55E-413F-98C7-6588493E5F67">[&lt;topic://cpconEventsOverview&gt;]</a></format>.</para>
19     </remarks>
20     <summary>
21       <attribution license="cc4" from="Microsoft" modified="false" />
22       <para>Provides data for the <see cref="E:System.Windows.Forms.Binding.Format" /> and <see cref="E:System.Windows.Forms.Binding.Parse" /> events.</para>
23     </summary>
24   </Docs>
25   <Members>
26     <Member MemberName=".ctor">
27       <MemberSignature Language="C#" Value="public ConvertEventArgs (object value, Type desiredType);" />
28       <MemberType>Constructor</MemberType>
29       <Parameters>
30         <Parameter Name="value" Type="System.Object" />
31         <Parameter Name="desiredType" Type="System.Type" />
32       </Parameters>
33       <Docs>
34         <remarks>To be added.</remarks>
35         <summary>
36           <attribution license="cc4" from="Microsoft" modified="false" />
37           <para>Initializes a new instance of the <see cref="T:System.Windows.Forms.ConvertEventArgs" /> class.</para>
38         </summary>
39         <param name="value">
40           <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Object" /> that contains the value of the current property. </param>
41         <param name="desiredType">
42           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Type" /> of the value. </param>
43       </Docs>
44       <AssemblyInfo>
45         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
46         <AssemblyVersion>2.0.0.0</AssemblyVersion>
47       </AssemblyInfo>
48     </Member>
49     <Member MemberName="DesiredType">
50       <MemberSignature Language="C#" Value="public Type DesiredType { get; }" />
51       <MemberType>Property</MemberType>
52       <ReturnValue>
53         <ReturnType>System.Type</ReturnType>
54       </ReturnValue>
55       <Docs>
56         <value>To be added.</value>
57         <remarks>
58           <attribution license="cc4" from="Microsoft" modified="false" />
59           <para>The <see cref="P:System.Windows.Forms.ConvertEventArgs.DesiredType" /> property enables you to check the type of the property that the value is being converted to.</para>
60         </remarks>
61         <summary>
62           <attribution license="cc4" from="Microsoft" modified="false" />
63           <para>Gets the data type of the desired value.</para>
64         </summary>
65       </Docs>
66       <AssemblyInfo>
67         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
68         <AssemblyVersion>2.0.0.0</AssemblyVersion>
69       </AssemblyInfo>
70     </Member>
71     <Member MemberName="Value">
72       <MemberSignature Language="C#" Value="public object Value { set; get; }" />
73       <MemberType>Property</MemberType>
74       <ReturnValue>
75         <ReturnType>System.Object</ReturnType>
76       </ReturnValue>
77       <Docs>
78         <value>To be added.</value>
79         <remarks>
80           <attribution license="cc4" from="Microsoft" modified="false" />
81           <para>The value contained by the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property depends on the event in which the <see cref="T:System.Windows.Forms.ConvertEventArgs" /> is returned. The <see cref="T:System.Windows.Forms.ConvertEventArgs" /> can be returned in either the <see cref="E:System.Windows.Forms.Binding.Format" /> event or the <see cref="E:System.Windows.Forms.Binding.Parse" /> event.</para>
82           <para>When the <see cref="T:System.Windows.Forms.ConvertEventArgs" /> is returned in the <see cref="E:System.Windows.Forms.Binding.Format" /> event, the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property contains the unformatted property value of the data source. Within the <see cref="E:System.Windows.Forms.Binding.Format" /> event, you can read the property value, format the value, and reset the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property to the new (formatted) value, thereby setting the value displayed in the data-bound control.</para>
83           <para>When the <see cref="T:System.Windows.Forms.ConvertEventArgs" /> is returned in the <see cref="E:System.Windows.Forms.Binding.Parse" /> event, the property contains the custom-formatted value of the data-bound control. Within the <see cref="E:System.Windows.Forms.Binding.Parse" /> event, you must read the formatted value, parse it, and convert it back to the same data type as the data source. You can then reset the <see cref="P:System.Windows.Forms.ConvertEventArgs.Value" /> property to the unformatted value, and thereby set the value of the data source. To determine the type of the data source, examine the <see cref="P:System.Windows.Forms.ConvertEventArgs.DesiredType" /> property value.</para>
84         </remarks>
85         <summary>
86           <attribution license="cc4" from="Microsoft" modified="false" />
87           <para>Gets or sets the value of the <see cref="T:System.Windows.Forms.ConvertEventArgs" />.</para>
88         </summary>
89       </Docs>
90       <AssemblyInfo>
91         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
92         <AssemblyVersion>2.0.0.0</AssemblyVersion>
93       </AssemblyInfo>
94     </Member>
95   </Members>
96 </Type>