5
5
namespace Eto . Forms ;
6
6
7
7
/// <summary>
8
- /// Modes for the <see cref="DateTimePicker"/>
8
+ /// Available modes for how a <see cref="DateTimePicker"/> can be displayed.
9
9
/// </summary>
10
10
[ Flags ]
11
11
public enum DateTimePickerMode
12
12
{
13
13
/// <summary>
14
- /// Show only the date component
14
+ /// Only the date component will be shown.
15
15
/// </summary>
16
16
Date = 1 ,
17
17
/// <summary>
18
- /// Show only the time component
18
+ /// Only the time component will be shown.
19
19
/// </summary>
20
20
Time = 2 ,
21
21
/// <summary>
22
- /// Show both the date and time components
22
+ /// Both the date and time components will be shown.
23
23
/// </summary>
24
24
DateTime = Date | Time
25
25
}
26
26
27
27
/// <summary>
28
- /// Date/time picker control to enter a date and/or time value
28
+ /// A control that allows the user to select a date and/or a time.
29
29
/// </summary>
30
+ /// <example>
31
+ /// Here is an example that creates a date/time picker, where the user will only be able to choose between two dates:
32
+ /// <code>
33
+ /// var dateTimePicker = new DateTimePicker () { MinDate = DateTime.Now, MaxDate = DateTime.Now.AddYears(2) };
34
+ /// </code>
35
+ /// </example>
30
36
[ Handler ( typeof ( DateTimePicker . IHandler ) ) ]
31
37
public class DateTimePicker : CommonControl
32
38
{
33
39
new IHandler Handler { get { return ( IHandler ) base . Handler ; } }
34
40
35
41
/// <summary>
36
- /// Occurs when the <see cref="DateTimePicker.Value"/> property has changed by the user
42
+ /// Occurs when the <see cref="DateTimePicker.Value"/> property has changed by the user.
37
43
/// </summary>
38
44
public event EventHandler < EventArgs > ValueChanged ;
39
45
40
46
/// <summary>
41
47
/// Raises the <see cref="ValueChanged"/> event.
42
48
/// </summary>
43
- /// <param name="e">Event arguments</param>
49
+ /// <param name="e">Event arguments. </param>
44
50
protected virtual void OnValueChanged ( EventArgs e )
45
51
{
46
52
if ( ValueChanged != null )
47
53
ValueChanged ( this , e ) ;
48
54
}
49
55
50
56
/// <summary>
51
- /// Gets or sets the minimum date entered
57
+ /// Gets or sets the minimum date that is allowed to be entered.
52
58
/// </summary>
53
59
/// <value>The minimum date.</value>
54
60
public DateTime MinDate
@@ -58,7 +64,7 @@ public DateTime MinDate
58
64
}
59
65
60
66
/// <summary>
61
- /// Gets or sets the maximum date entered
67
+ /// Gets or sets the maximum date that is allowed to be entered.
62
68
/// </summary>
63
69
/// <value>The maximum date.</value>
64
70
public DateTime MaxDate
@@ -68,7 +74,7 @@ public DateTime MaxDate
68
74
}
69
75
70
76
/// <summary>
71
- /// Gets or sets the value of the date/time picker. Null to display blank or with a unchecked checkbox.
77
+ /// Gets or sets the value of the date/time picker. <see langword="null"/> to display blank or with a unchecked checkbox.
72
78
/// </summary>
73
79
/// <value>The current value.</value>
74
80
public DateTime ? Value
@@ -96,7 +102,7 @@ public DateTime? Value
96
102
}
97
103
98
104
/// <summary>
99
- /// Gets or sets the mode of the date/time picker.
105
+ /// Gets or sets the mode of how the date/time picker will be displayed .
100
106
/// </summary>
101
107
/// <value>The picker mode.</value>
102
108
[ DefaultValue ( DateTimePickerMode . Date ) ]
@@ -106,13 +112,7 @@ public DateTimePickerMode Mode
106
112
set { Handler . Mode = value ; }
107
113
}
108
114
109
- /// <summary>
110
- /// Gets or sets the color of the text.
111
- /// </summary>
112
- /// <remarks>
113
- /// By default, the text will get a color based on the user's theme. However, this is usually black.
114
- /// </remarks>
115
- /// <value>The color of the text.</value>
115
+ /// <inheritdoc cref="TextControl.TextColor"/>
116
116
public Color TextColor
117
117
{
118
118
get { return Handler . TextColor ; }
@@ -124,10 +124,9 @@ public Color TextColor
124
124
/// </summary>
125
125
/// <remarks>
126
126
/// This is a hint to omit the border of the control and show it as plainly as possible.
127
- ///
128
127
/// Typically used when you want to show the control within a cell of the <see cref="GridView"/>.
129
128
/// </remarks>
130
- /// <value><c> true</c > to show the control border; otherwise, <c> false</c >.</value>
129
+ /// <value><see langword=" true"/ > to show the control border; otherwise, <see langword=" false"/ >.</value>
131
130
[ DefaultValue ( true ) ]
132
131
public bool ShowBorder
133
132
{
@@ -136,20 +135,17 @@ public bool ShowBorder
136
135
}
137
136
138
137
static readonly object callback = new Callback ( ) ;
139
- /// <summary>
140
- /// Gets an instance of an object used to perform callbacks to the widget from handler implementations
141
- /// </summary>
142
- /// <returns>The callback instance to use for this widget</returns>
138
+
139
+ /// <inheritdoc/>
143
140
protected override object GetCallback ( ) { return callback ; }
144
141
145
142
/// <summary>
146
143
/// Callback interface for the <see cref="DateTimePicker"/>.
147
144
/// </summary>
148
145
public new interface ICallback : CommonControl . ICallback
149
146
{
150
- /// <summary>
151
- /// Raises the value changed event.
152
- /// </summary>
147
+ /// <summary><inheritdoc cref="DateTimePicker.OnValueChanged"/></summary>
148
+ // TODO: parameters
153
149
void OnValueChanged ( DateTimePicker widget , EventArgs e ) ;
154
150
}
155
151
@@ -158,9 +154,7 @@ public bool ShowBorder
158
154
/// </summary>
159
155
protected new class Callback : CommonControl . Callback , ICallback
160
156
{
161
- /// <summary>
162
- /// Raises the value changed event.
163
- /// </summary>
157
+ /// <inheritdoc cref="ICallback.OnValueChanged"/>
164
158
public void OnValueChanged ( DateTimePicker widget , EventArgs e )
165
159
{
166
160
using ( widget . Platform . Context )
@@ -175,48 +169,22 @@ public void OnValueChanged(DateTimePicker widget, EventArgs e)
175
169
/// </summary>
176
170
public new interface IHandler : CommonControl . IHandler
177
171
{
178
- /// <summary>
179
- /// Gets or sets the value of the date/time picker
180
- /// </summary>
181
- /// <value>The current value.</value>
172
+ /// <inheritdoc cref="DateTimePicker.Value"/>
182
173
DateTime ? Value { get ; set ; }
183
174
184
- /// <summary>
185
- /// Gets or sets the minimum date entered
186
- /// </summary>
187
- /// <value>The minimum date.</value>
175
+ /// <inheritdoc cref="DateTimePicker.MinDate"/>
188
176
DateTime MinDate { get ; set ; }
189
177
190
- /// <summary>
191
- /// Gets or sets the maximum date entered
192
- /// </summary>
193
- /// <value>The maximum date.</value>
178
+ /// <inheritdoc cref="DateTimePicker.MaxDate"/>
194
179
DateTime MaxDate { get ; set ; }
195
180
196
- /// <summary>
197
- /// Gets or sets the mode of the date/time picker.
198
- /// </summary>
199
- /// <value>The picker mode.</value>
181
+ /// <inheritdoc cref="DateTimePicker.Mode"/>
200
182
DateTimePickerMode Mode { get ; set ; }
201
183
202
- /// <summary>
203
- /// Gets or sets the color of the text.
204
- /// </summary>
205
- /// <remarks>
206
- /// By default, the text will get a color based on the user's theme. However, this is usually black.
207
- /// </remarks>
208
- /// <value>The color of the text.</value>
184
+ /// <inheritdoc cref="DateTimePicker.TextColor"/>
209
185
Color TextColor { get ; set ; }
210
186
211
- /// <summary>
212
- /// Gets or sets a value indicating whether to show the control's border.
213
- /// </summary>
214
- /// <remarks>
215
- /// This is a hint to omit the border of the control and show it as plainly as possible.
216
- ///
217
- /// Typically used when you want to show the control within a cell of the <see cref="GridView"/>.
218
- /// </remarks>
219
- /// <value><c>true</c> to show the control border; otherwise, <c>false</c>.</value>
187
+ /// <inheritdoc cref="DateTimePicker.ShowBorder"/>
220
188
bool ShowBorder { get ; set ; }
221
189
}
222
190
0 commit comments