13 writes to SelectionRange
System.Windows.Forms.Tests (13)
System\Windows\Forms\MonthCalendarTests.cs (13)
1025SelectionRange = new SelectionRange(lower, upper) 2138SelectionRange = value 2148calendar.SelectionRange = new SelectionRange(expectedSelectionStart, expectedSelectionEnd); 2170calendar.SelectionRange = value; 2182calendar.SelectionRange = new SelectionRange(expectedSelectionStart, expectedSelectionEnd); 2198calendar.SelectionRange = new SelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate); 2202calendar.SelectionRange = new SelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1)); 2207Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate)); 2208Assert.Throws<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1))); 2215calendar.SelectionRange = new SelectionRange(calendar.MaxDate.AddTicks(1), calendar.MaxDate); 2219calendar.SelectionRange = new SelectionRange(calendar.MaxDate, calendar.MaxDate.AddTicks(1)); 2224Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.MaxDate.AddDays(1), calendar.MaxDate)); 2225Assert.Throws<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.MaxDate, calendar.MaxDate.AddDays(1)));
38 references to SelectionRange
System.Windows.Forms (5)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
55[DefaultProperty(nameof(SelectionRange))] 57[DefaultBindingProperty(nameof(SelectionRange))] 1947return $"{s}, {SelectionRange}";
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (2)
545internal SelectionRange SelectionRange => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.SelectionRange : new SelectionRange(); 579range = owner.SelectionRange;
System.Windows.Forms.Tests (33)
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (1)
375SelectionRange expected = monthCalendar.SelectionRange;
System\Windows\Forms\MonthCalendarTests.cs (32)
115Assert.Equal(DateTime.Now.Date, control.SelectionRange.Start); 116Assert.Equal(DateTime.Now.Date, control.SelectionRange.End); 117Assert.NotSame(control.SelectionRange, control.SelectionRange); 2140Assert.Equal(expectedSelectionStart, calendar.SelectionRange.Start); 2141Assert.Equal(expectedSelectionEnd, calendar.SelectionRange.End); 2144Assert.NotSame(value, calendar.SelectionRange); 2149Assert.Equal(expectedSelectionStart, calendar.SelectionRange.Start); 2150Assert.Equal(expectedSelectionEnd, calendar.SelectionRange.End); 2153Assert.NotSame(value, calendar.SelectionRange); 2171Assert.Equal(expectedSelectionStart, calendar.SelectionRange.Start); 2172Assert.Equal(expectedSelectionEnd, calendar.SelectionRange.End); 2175Assert.NotSame(value, calendar.SelectionRange); 2183Assert.Equal(expectedSelectionStart, calendar.SelectionRange.Start); 2184Assert.Equal(expectedSelectionEnd, calendar.SelectionRange.End); 2187Assert.NotSame(value, calendar.SelectionRange); 3968Assert.Equal(date.Date, calendar.SelectionRange.Start); 3969Assert.Equal(date.Date, calendar.SelectionRange.End); 3976Assert.Equal(date.Date, calendar.SelectionRange.Start); 3977Assert.Equal(date.Date, calendar.SelectionRange.End); 3997Assert.Equal(date.Date, calendar.SelectionRange.Start); 3998Assert.Equal(date.Date, calendar.SelectionRange.End); 4008Assert.Equal(date.Date, calendar.SelectionRange.Start); 4009Assert.Equal(date.Date, calendar.SelectionRange.End); 4075Assert.Equal(expectedSelectionStart.Date, calendar.SelectionRange.Start); 4076Assert.Equal(expectedSelectionEnd.Date, calendar.SelectionRange.End); 4083Assert.Equal(expectedSelectionStart.Date, calendar.SelectionRange.Start); 4084Assert.Equal(expectedSelectionEnd.Date, calendar.SelectionRange.End); 4104Assert.Equal(expectedSelectionStart.Date, calendar.SelectionRange.Start); 4105Assert.Equal(expectedSelectionEnd.Date, calendar.SelectionRange.End); 4115Assert.Equal(expectedSelectionStart.Date, calendar.SelectionRange.Start); 4116Assert.Equal(expectedSelectionEnd.Date, calendar.SelectionRange.End);