126 references to Items
Accessibility_Core_App (1)
CommonControl1.Designer.cs (1)
245
this.checkedListBox1.
Items
.AddRange(new object[] {
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)
143
box.
Items
.Add("item1");
268
Assert.Empty(control.
Items
);
273
Assert.Empty(control.
Items
);
281
control.
Items
.Add("item1");
282
control.
Items
.Add("item2");
285
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
290
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
307
Assert.Empty(control.
Items
);
315
Assert.Empty(control.
Items
);
326
control.
Items
.Add("item1");
327
control.
Items
.Add("item2");
337
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
345
Assert.Equal(new object[] { "item1", "item2" }, control.
Items
.Cast<object>());
369
control.
Items
.Add(new CheckBox(), false);
386
control.
Items
.Add(new CheckBox(), false);
396
box.
Items
.Add(new CheckBox(), false);
416
control.
Items
.Add("item1");
417
control.
Items
.Add("item2");
431
control.
Items
.Add("item1");
432
control.
Items
.Add("item2");
484
control.
Items
.Add("item1");
505
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
506
checkedListBox.SelectedItem = checkedListBox.
Items
[0];
508
Assert.Equal(3, checkedListBox.
Items
.Count);
509
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
514
checkedListBox.
Items
.Remove(checkedListBox.
Items
[2]);
516
Assert.Equal(2, checkedListBox.
Items
.Count);
517
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
522
checkedListBox.
Items
.Remove(checkedListBox.
Items
[1]);
524
Assert.Single(checkedListBox.
Items
);
525
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
544
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
546
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
548
checkedListBox.SelectedItem = checkedListBox.
Items
[0];
550
Assert.Equal(checkedListBox.
Items
[0], checkedListBox.SelectedItem);
555
checkedListBox.
Items
.Remove(checkedListBox.
Items
[0]);
558
Assert.Equal(count, checkedListBox.
Items
.Count);
578
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
582
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
587
checkedListBox.
Items
.Remove(checkedListBox.
Items
[2]);
591
Assert.Equal(count, checkedListBox.
Items
.Count);
609
checkedListBox.
Items
.AddRange((object[])["1", "2", "3"]);
611
for (int count = checkedListBox.
Items
.Count; count > 1; count -= 1)
618
checkedListBox.
Items
.Remove(checkedListBox.
Items
[0]);
622
Assert.Equal(count, checkedListBox.
Items
.Count);
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (17)
17
checkedListBox.
Items
.Add("a");
18
checkedListBox.
Items
.Add("b");
19
checkedListBox.
Items
.Add("c");
20
checkedListBox.
Items
.Add("d");
21
checkedListBox.
Items
.Add("e");
22
checkedListBox.
Items
.Add("f");
23
checkedListBox.
Items
.Add("g");
24
checkedListBox.
Items
.Add("h");
25
checkedListBox.
Items
.Add("i");
30
for (int i = 0; i < checkedListBox.
Items
.Count; i++)
115
checkedListBox.
Items
.Add(i);
139
checkedListBox.
Items
.Add(0);
140
checkedListBox.
Items
.Add(1);
141
checkedListBox.
Items
.Add(2);
155
checkedListBox.
Items
.Add(0);
156
checkedListBox.
Items
.Add(1);
157
checkedListBox.
Items
.Add(2);
System\Windows\Forms\AccessibleObjects\CheckedListBoxItemAccessibleObjectTests.cs (31)
46
checkedListBox.
Items
.Add(testName);
56
checkedListBox.
Items
.Add("A");
67
checkedListBox.
Items
.Add(0);
68
checkedListBox.
Items
.Add(1);
69
checkedListBox.
Items
.Add(2);
88
checkedListBox.
Items
.Add("A");
100
checkedListBox.
Items
.Add("A");
115
checkedListBox.
Items
.Add(0);
116
checkedListBox.
Items
.Add(1);
117
checkedListBox.
Items
.Add(2);
131
checkedListBox.
Items
.Add(0);
132
checkedListBox.
Items
.Add(1);
133
checkedListBox.
Items
.Add(2);
150
checkedListBox.
Items
.Add(0);
151
checkedListBox.
Items
.Add(1);
152
checkedListBox.
Items
.Add(2);
168
checkedListBox.
Items
.Add("A");
185
checkedListBox.
Items
.Add("A");
198
checkedListBox.
Items
.Add("A");
212
checkedListBox.
Items
.Add("A");
225
checkedListBox.
Items
.Add("A");
242
checkedListBox.
Items
.Add("A");
261
checkedListBox.
Items
.Add("A");
275
checkedListBox.
Items
.Add("A");
292
checkedListBox.
Items
.Add("A");
308
checkedListBox.
Items
.Add("A");
319
checkedListBox.
Items
.Add("A");
346
checkedListBox.
Items
.Add("Item 1",
353
checkedListBox.
Items
.InnerArray.GetEntryObject(0, 0),
363
checkedListBox.
Items
.Add("Item 1");
368
checkedListBox.
Items
.InnerArray.GetEntryObject(0, 0),
System\Windows\Forms\CheckedListBox.CheckedIndexCollectionTests.cs (3)
21
_checkedListBox.
Items
.Clear();
64
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
87
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
System\Windows\Forms\CheckedListBox.CheckedItemCollectionTests.cs (4)
21
_checkedListBox.
Items
.Clear();
51
_checkedListBox.
Items
.Add("item1", true);
52
_checkedListBox.
Items
.Add("item2", false);
62
_checkedListBox.
Items
.Add(items[i], checkedStates[i]);
System\Windows\Forms\ControlTests.cs (1)
1043
checkedListBox1.
Items
.AddRange((object[])["Foo", "Foo", "Foo"]);
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[] {