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