-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathDatePickerDateValidationErrorEventArgs.xml
187 lines (178 loc) · 12.7 KB
/
DatePickerDateValidationErrorEventArgs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<Type Name="DatePickerDateValidationErrorEventArgs" FullName="System.Windows.Controls.DatePickerDateValidationErrorEventArgs">
<TypeSignature Language="C#" Value="public class DatePickerDateValidationErrorEventArgs : EventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DatePickerDateValidationErrorEventArgs extends System.EventArgs" />
<TypeSignature Language="DocId" Value="T:System.Windows.Controls.DatePickerDateValidationErrorEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class DatePickerDateValidationErrorEventArgs
Inherits EventArgs" />
<TypeSignature Language="F#" Value="type DatePickerDateValidationErrorEventArgs = class
 inherit EventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class DatePickerDateValidationErrorEventArgs : EventArgs" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides data for the <see cref="E:System.Windows.Controls.DatePicker.DateValidationError" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Controls.DatePicker.DateValidationError?displayProperty=nameWithType> event occurs when <xref:System.Windows.Controls.DatePicker.Text%2A?displayProperty=nameWithType> is set to a value that cannot be interpreted as a date or when the date cannot be selected. You can subscribe to this event and specify whether an exception is raised by setting the <xref:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.ThrowException%2A> property. If <xref:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.ThrowException%2A?displayProperty=nameWithType> is `true`, one of the following exceptions is raised:
|Exception type|Condition|
|--------------------|---------------|
|<xref:System.FormatException>|The text entered cannot be parsed to a valid date, and the exception is not suppressed.|
|<xref:System.ArgumentOutOfRangeException>|The text entered parses to a date that is not selectable.|
If <xref:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.ThrowException%2A?displayProperty=nameWithType> is `false`, the application continues execution as usual.
## Examples
The following example creates a <xref:System.Windows.Controls.DatePicker> that displays the dates in August 2009 and specifies that each Saturday and Sunday is not selectable. The <xref:System.Windows.Controls.DatePicker> handles the <xref:System.Windows.Controls.DatePicker.DateValidationError> event. If the user enters a date that is not selectable, the example displays a message. If the user enters text that is not a valid date, an exception is thrown.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/DatePicker/Overview/window1.xaml.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/datepickersnippets/visualbasic/window1.xaml.vb" id="Snippet2":::
:::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/window1.xaml" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/DatePicker/Overview/window1.xaml.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/datepickersnippets/visualbasic/window1.xaml.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DatePickerDateValidationErrorEventArgs (Exception exception, string text);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Exception exception, string text) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.#ctor(System.Exception,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (exception As Exception, text As String)" />
<MemberSignature Language="F#" Value="new System.Windows.Controls.DatePickerDateValidationErrorEventArgs : Exception * string -> System.Windows.Controls.DatePickerDateValidationErrorEventArgs" Usage="new System.Windows.Controls.DatePickerDateValidationErrorEventArgs (exception, text)" />
<MemberSignature Language="C++ CLI" Value="public:
 DatePickerDateValidationErrorEventArgs(Exception ^ exception, System::String ^ text);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="exception" Type="System.Exception" />
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<param name="exception">The initial exception from the <see cref="E:System.Windows.Controls.DatePicker.DateValidationError" /> event.</param>
<param name="text">The text that caused the <see cref="E:System.Windows.Controls.DatePicker.DateValidationError" /> event.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Controls.DatePickerDateValidationErrorEventArgs" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Exception">
<MemberSignature Language="C#" Value="public Exception Exception { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Exception Exception" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.Exception" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Exception As Exception" />
<MemberSignature Language="F#" Value="member this.Exception : Exception" Usage="System.Windows.Controls.DatePickerDateValidationErrorEventArgs.Exception" />
<MemberSignature Language="C++ CLI" Value="public:
 property Exception ^ Exception { Exception ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Exception</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the initial exception associated with the <see cref="E:System.Windows.Controls.DatePicker.DateValidationError" /> event.</summary>
<value>The exception associated with the validation failure.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Text">
<MemberSignature Language="C#" Value="public string Text { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Text" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.Text" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Text As String" />
<MemberSignature Language="F#" Value="member this.Text : string" Usage="System.Windows.Controls.DatePickerDateValidationErrorEventArgs.Text" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Text { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text that caused the <see cref="E:System.Windows.Controls.DatePicker.DateValidationError" /> event.</summary>
<value>The text that caused the validation failure.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ThrowException">
<MemberSignature Language="C#" Value="public bool ThrowException { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ThrowException" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.ThrowException" />
<MemberSignature Language="VB.NET" Value="Public Property ThrowException As Boolean" />
<MemberSignature Language="F#" Value="member this.ThrowException : bool with get, set" Usage="System.Windows.Controls.DatePickerDateValidationErrorEventArgs.ThrowException" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ThrowException { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether <see cref="P:System.Windows.Controls.DatePickerDateValidationErrorEventArgs.Exception" /> should be thrown.</summary>
<value>
<see langword="true" /> if the exception should be thrown; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>