Skip to content

Commit 97b6596

Browse files
hughbeRon Petrusha
authored andcommitted
Fix drafting of MonthCalendar remarks (#3242)
* Fix drafting of MonthCalendar remarks * removed self-links
1 parent 4197154 commit 97b6596

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

xml/System.Windows.Forms/MonthCalendar.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,14 @@
4747
<format type="text/markdown"><![CDATA[
4848
4949
## Remarks
50-
The <xref:System.Windows.Forms.MonthCalendar> control allows the user to select a date using a visual display. You can limit the date and times that can be selected by setting the <xref:System.Windows.Forms.MonthCalendar.MinDate%2A> and <xref:System.Windows.Forms.MonthCalendar.MaxDate%2A> properties.
50+
The `MonthCalendar` control allows the user to select a date using a visual display. You can limit the date and times that can be selected by setting the <xref:System.Windows.Forms.MonthCalendar.MinDate%2A> and <xref:System.Windows.Forms.MonthCalendar.MaxDate%2A> properties.
5151
5252
You can change the look of the calendar portion of the control by setting the <xref:System.Windows.Forms.Control.ForeColor%2A>, <xref:System.Windows.Forms.Control.Font%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleBackColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleForeColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TrailingForeColor%2A>, and <xref:System.Windows.Forms.Control.BackColor%2A> properties.
5353
5454
> [!NOTE]
55-
> The <xref:System.Windows.Forms.DateTimePicker> control only supports Gregorian calendars.
55+
> The `MonthCalendar` control only supports Gregorian calendars.
5656
57-
> [!NOTE]
58-
> The <xref:System.Windows.Forms.DateTimePicker> control only supports Gregorian calendars.
59-
60-
The <xref:System.Windows.Forms.MonthCalendar> control is drawn by the operating system, so the <xref:System.Windows.Forms.MonthCalendar.Paint> event is never raised. If you need to provide a customized look to the <xref:System.Windows.Forms.MonthCalendar> control, you should override the <xref:System.Windows.Forms.Control.OnPrint%2A> method, call the base implementation of <xref:System.Windows.Forms.Control.OnPrint%2A>, and then perform custom painting.
57+
The `MonthCalendar` control is drawn by the operating system, so the <xref:System.Windows.Forms.MonthCalendar.Paint> event is never raised. If you need to provide a customized look to the <xref:System.Windows.Forms.MonthCalendar> control, you should override the <xref:System.Windows.Forms.Control.OnPrint%2A> method, call the base implementation of <xref:System.Windows.Forms.Control.OnPrint%2A>, and then perform custom painting.
6158
6259
If you need custom date formatting and a selection limited to just one date, you might consider using a <xref:System.Windows.Forms.DateTimePicker> control instead of a <xref:System.Windows.Forms.MonthCalendar>. Using the <xref:System.Windows.Forms.DateTimePicker> eliminates much of the need for validating date/time values.
6360
@@ -66,7 +63,7 @@
6663
6764
6865
## Examples
69-
The following code example displays a form containing a <xref:System.Windows.Forms.MonthCalendar> control that displays one calendar year. The example demonstrates setting the <xref:System.Windows.Forms.Control.BackColor%2A>, <xref:System.Windows.Forms.Control.ForeColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleBackColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleForeColor%2A>, <xref:System.Windows.Forms.MonthCalendar.CalendarDimensions%2A>, and <xref:System.Windows.Forms.MonthCalendar.TrailingForeColor%2A> properties to customize the look of the calendar control. Other properties such as <xref:System.Windows.Forms.MonthCalendar.AnnuallyBoldedDates%2A>, <xref:System.Windows.Forms.MonthCalendar.BoldedDates%2A>, and <xref:System.Windows.Forms.MonthCalendar.MonthlyBoldedDates%2A> are set to customize which dates are bold. The example also sets the <xref:System.Windows.Forms.MonthCalendar.FirstDayOfWeek%2A>, <xref:System.Windows.Forms.MonthCalendar.MaxDate%2A>, <xref:System.Windows.Forms.MonthCalendar.MinDate%2A>, and <xref:System.Windows.Forms.MonthCalendar.MaxSelectionCount%2A> properties to change the calendar format. The <xref:System.Windows.Forms.MonthCalendar.DateSelected> and <xref:System.Windows.Forms.MonthCalendar.DateChanged> events are also handled and their status is displayed on the form.
66+
The following code example displays a form containing a `MonthCalendar` control that displays one calendar year. The example demonstrates setting the <xref:System.Windows.Forms.Control.BackColor%2A>, <xref:System.Windows.Forms.Control.ForeColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleBackColor%2A>, <xref:System.Windows.Forms.MonthCalendar.TitleForeColor%2A>, <xref:System.Windows.Forms.MonthCalendar.CalendarDimensions%2A>, and <xref:System.Windows.Forms.MonthCalendar.TrailingForeColor%2A> properties to customize the look of the calendar control. Other properties such as <xref:System.Windows.Forms.MonthCalendar.AnnuallyBoldedDates%2A>, <xref:System.Windows.Forms.MonthCalendar.BoldedDates%2A>, and <xref:System.Windows.Forms.MonthCalendar.MonthlyBoldedDates%2A> are set to customize which dates are bold. The example also sets the <xref:System.Windows.Forms.MonthCalendar.FirstDayOfWeek%2A>, <xref:System.Windows.Forms.MonthCalendar.MaxDate%2A>, <xref:System.Windows.Forms.MonthCalendar.MinDate%2A>, and <xref:System.Windows.Forms.MonthCalendar.MaxSelectionCount%2A> properties to change the calendar format. The <xref:System.Windows.Forms.MonthCalendar.DateSelected> and <xref:System.Windows.Forms.MonthCalendar.DateChanged> events are also handled and their status is displayed on the form.
7067
7168
[!code-cpp[System.Windows.Forms.MonthCalendar#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp#1)]
7269
[!code-csharp[System.Windows.Forms.MonthCalendar#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CS/monthcalendar.cs#1)]

0 commit comments

Comments
 (0)