126 references to Items
System.Windows.Forms (16)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedIndexCollection.cs (2)
148
return _owner.
Items
.InnerArray;
161
if (index >= 0 && index < _owner.
Items
.Count)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedItemCollection.cs (1)
43
return _owner.
Items
.InnerArray;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (13)
229
ObjectCollection items =
Items
;
373
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index,
Items
.Count);
415
if (index < 0 || index >=
Items
.Count)
485
if (e.Index <
Items
.Count)
487
item =
Items
[e.Index];
507
if (e.Index <
Items
.Count)
714
if (
Items
.Count == 0 &&
835
CheckState[] savedCheckedItems = new CheckState[
Items
.Count];
836
for (int i = 0; i <
Items
.Count; i++)
845
for (int j = 0; j <
Items
.Count; j++)
858
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index,
Items
.Count);
945
if (item < 0 || item >=
Items
.Count)
958
if (item < 0 || item >=
Items
.Count || (state != LB_CHECKED && state != LB_UNCHECKED))
System.Windows.Forms.Tests (106)
CheckedListBoxTests.cs (50)
145
box.
Items
.Add("item1");
270
Assert.Empty(control.
Items
);
275
Assert.Empty(control.
Items
);
283
control.
Items
.Add("item1");
284
control.
Items
.Add("item2");
287
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
292
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
309
Assert.Empty(control.
Items
);
317
Assert.Empty(control.
Items
);
328
control.
Items
.Add("item1");
329
control.
Items
.Add("item2");
339
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
347
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
371
control.
Items
.Add(new CheckBox(), false);
388
control.
Items
.Add(new CheckBox(), false);
398
box.
Items
.Add(new CheckBox(), false);
418
control.
Items
.Add("item1");
419
control.
Items
.Add("item2");
433
control.
Items
.Add("item1");
434
control.
Items
.Add("item2");
486
control.
Items
.Add("item1");
507
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
508
checkedListBox.SelectedItem = checkedListBox.
Items
[0];
510
Assert.Equal(3, checkedListBox.
Items
.Count);
511
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
516
checkedListBox.
Items
.Remove(checkedListBox.
Items
[2]);
518
Assert.Equal(2, checkedListBox.
Items
.Count);
519
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
524
checkedListBox.
Items
.Remove(checkedListBox.
Items
[1]);
526
Assert.Single(checkedListBox.
Items
);
527
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
546
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
548
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
550
checkedListBox.SelectedItem = checkedListBox.
Items
[0];
552
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
557
checkedListBox.
Items
.Remove(checkedListBox.
Items
[0]);
560
Assert.Equal(count, checkedListBox.
Items
.Count);
580
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
584
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
589
checkedListBox.
Items
.Remove(checkedListBox.
Items
[2]);
593
Assert.Equal(count, checkedListBox.
Items
.Count);
611
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
613
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
620
checkedListBox.
Items
.Remove(checkedListBox.
Items
[0]);
624
Assert.Equal(count, checkedListBox.
Items
.Count);
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (17)
19
checkedListBox.
Items
.Add("a");
20
checkedListBox.
Items
.Add("b");
21
checkedListBox.
Items
.Add("c");
22
checkedListBox.
Items
.Add("d");
23
checkedListBox.
Items
.Add("e");
24
checkedListBox.
Items
.Add("f");
25
checkedListBox.
Items
.Add("g");
26
checkedListBox.
Items
.Add("h");
27
checkedListBox.
Items
.Add("i");
32
for (int i = 0; i < checkedListBox.
Items
.Count; i++)
117
checkedListBox.
Items
.Add(i);
141
checkedListBox.
Items
.Add(0);
142
checkedListBox.
Items
.Add(1);
143
checkedListBox.
Items
.Add(2);
157
checkedListBox.
Items
.Add(0);
158
checkedListBox.
Items
.Add(1);
159
checkedListBox.
Items
.Add(2);
System\Windows\Forms\AccessibleObjects\CheckedListBoxItemAccessibleObjectTests.cs (31)
48
checkedListBox.
Items
.Add(testName);
58
checkedListBox.
Items
.Add("A");
69
checkedListBox.
Items
.Add(0);
70
checkedListBox.
Items
.Add(1);
71
checkedListBox.
Items
.Add(2);
90
checkedListBox.
Items
.Add("A");
102
checkedListBox.
Items
.Add("A");
117
checkedListBox.
Items
.Add(0);
118
checkedListBox.
Items
.Add(1);
119
checkedListBox.
Items
.Add(2);
133
checkedListBox.
Items
.Add(0);
134
checkedListBox.
Items
.Add(1);
135
checkedListBox.
Items
.Add(2);
152
checkedListBox.
Items
.Add(0);
153
checkedListBox.
Items
.Add(1);
154
checkedListBox.
Items
.Add(2);
170
checkedListBox.
Items
.Add("A");
187
checkedListBox.
Items
.Add("A");
200
checkedListBox.
Items
.Add("A");
214
checkedListBox.
Items
.Add("A");
227
checkedListBox.
Items
.Add("A");
244
checkedListBox.
Items
.Add("A");
263
checkedListBox.
Items
.Add("A");
277
checkedListBox.
Items
.Add("A");
294
checkedListBox.
Items
.Add("A");
310
checkedListBox.
Items
.Add("A");
321
checkedListBox.
Items
.Add("A");
348
checkedListBox.
Items
.Add("Item 1",
355
checkedListBox.
Items
.InnerArray.GetEntryObject(0, 0),
365
checkedListBox.
Items
.Add("Item 1");
370
checkedListBox.
Items
.InnerArray.GetEntryObject(0, 0),
System\Windows\Forms\CheckedListBox.CheckedIndexCollectionTests.cs (3)
23
_checkedListBox.
Items
.Clear();
66
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
89
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
System\Windows\Forms\CheckedListBox.CheckedItemCollectionTests.cs (4)
23
_checkedListBox.
Items
.Clear();
53
_checkedListBox.
Items
.Add("item1", true);
54
_checkedListBox.
Items
.Add("item2", false);
64
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
System\Windows\Forms\ControlTests.cs (1)
1045
checkedListBox1.
Items
.AddRange((object[])["Foo", "Foo", "Foo"]);
TestPassApp (1)
CommonControl1.Designer.cs (1)
245
this.checkedListBox1.
Items
.AddRange(new object[] {
WinFormsControlsTest (3)
MultipleControls.cs (1)
132
checkedListBox1.
Items
.Add("Pennsylvania", CheckState.Checked);
MultipleControls.Designer.cs (2)
227
this.checkedListBox1.
Items
.AddRange(new object[] {
283
this.checkedListBox2.
Items
.AddRange(new object[] {