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