19 references to SetSelectionRange
System.Windows.Forms (4)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
713
set =>
SetSelectionRange
(value.Start, value.End);
1626
private void ResetSelectionRange() =>
SetSelectionRange
(Now, Now);
1802
SetSelectionRange
(date, date);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
555
owner.
SetSelectionRange
(d1, d2);
System.Windows.Forms.Tests (15)
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarHeaderAccessibleObjectTests.cs (1)
36
control.
SetSelectionRange
(new DateTime(2020, 8, 19), new DateTime(2020, 8, 19));
System\Windows\Forms\MonthCalendarTests.cs (14)
4074
calendar.
SetSelectionRange
(date1, date2);
4082
calendar.
SetSelectionRange
(expectedSelectionStart, expectedSelectionEnd);
4103
calendar.
SetSelectionRange
(date1, date2);
4114
calendar.
SetSelectionRange
(expectedSelectionStart, expectedSelectionEnd);
4129
calendar.
SetSelectionRange
(calendar.MinDate.AddTicks(-1), calendar.MinDate);
4133
calendar.
SetSelectionRange
(calendar.MinDate, calendar.MinDate.AddTicks(-1));
4138
Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.
SetSelectionRange
(calendar.MinDate.AddTicks(-1), calendar.MinDate));
4139
Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.
SetSelectionRange
(calendar.MinDate, calendar.MinDate.AddTicks(-1)));
4146
calendar.
SetSelectionRange
(calendar.MaxDate.AddTicks(1), calendar.MaxDate);
4150
calendar.
SetSelectionRange
(calendar.MaxDate, calendar.MaxDate.AddTicks(1));
4155
Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.
SetSelectionRange
(calendar.MaxDate.AddDays(1), calendar.MaxDate));
4156
Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.
SetSelectionRange
(calendar.MaxDate, calendar.MaxDate.AddDays(1)));
4193
calendar.
SetSelectionRange
(new DateTime(2021, 9, 1), new DateTime(2022, 8, 31));
4639
(cal, range) => cal.
SetSelectionRange
(range.Item1, range.Item2),