126 references to Items
Accessibility_Core_App (1)
CommonControl1.Designer.cs (1)
245this.checkedListBox1.Items.AddRange(new object[] {
System.Windows.Forms (16)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedIndexCollection.cs (2)
148return _owner.Items.InnerArray; 161if (index >= 0 && index < _owner.Items.Count)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedItemCollection.cs (1)
43return _owner.Items.InnerArray;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (13)
229ObjectCollection items = Items; 373ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Items.Count); 415if (index < 0 || index >= Items.Count) 485if (e.Index < Items.Count) 487item = Items[e.Index]; 507if (e.Index < Items.Count) 714if (Items.Count == 0 && 835CheckState[] savedCheckedItems = new CheckState[Items.Count]; 836for (int i = 0; i < Items.Count; i++) 845for (int j = 0; j < Items.Count; j++) 858ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Items.Count); 945if (item < 0 || item >= Items.Count) 958if (item < 0 || item >= Items.Count || (state != LB_CHECKED && state != LB_UNCHECKED))
System.Windows.Forms.Tests (106)
CheckedListBoxTests.cs (50)
143box.Items.Add("item1"); 268Assert.Empty(control.Items); 273Assert.Empty(control.Items); 281control.Items.Add("item1"); 282control.Items.Add("item2"); 285Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 290Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 307Assert.Empty(control.Items); 315Assert.Empty(control.Items); 326control.Items.Add("item1"); 327control.Items.Add("item2"); 337Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 345Assert.Equal(new object[] { "item1", "item2" }, control.Items.Cast<object>()); 369control.Items.Add(new CheckBox(), false); 386control.Items.Add(new CheckBox(), false); 396box.Items.Add(new CheckBox(), false); 416control.Items.Add("item1"); 417control.Items.Add("item2"); 431control.Items.Add("item1"); 432control.Items.Add("item2"); 484control.Items.Add("item1"); 505checkedListBox.Items.AddRange((object[])["1", "2", "3"]); 506checkedListBox.SelectedItem = checkedListBox.Items[0]; 508Assert.Equal(3, checkedListBox.Items.Count); 509Assert.Equal(checkedListBox.Items[0], checkedListBox.SelectedItem); 514checkedListBox.Items.Remove(checkedListBox.Items[2]); 516Assert.Equal(2, checkedListBox.Items.Count); 517Assert.Equal(checkedListBox.Items[0], checkedListBox.SelectedItem); 522checkedListBox.Items.Remove(checkedListBox.Items[1]); 524Assert.Single(checkedListBox.Items); 525Assert.Equal(checkedListBox.Items[0], checkedListBox.SelectedItem); 544checkedListBox.Items.AddRange((object[])["1", "2", "3"]); 546for (int count = checkedListBox.Items.Count; count > 1; count -= 1) 548checkedListBox.SelectedItem = checkedListBox.Items[0]; 550Assert.Equal(checkedListBox.Items[0], checkedListBox.SelectedItem); 555checkedListBox.Items.Remove(checkedListBox.Items[0]); 558Assert.Equal(count, checkedListBox.Items.Count); 578checkedListBox.Items.AddRange((object[])["1", "2", "3"]); 582for (int count = checkedListBox.Items.Count; count > 1; count -= 1) 587checkedListBox.Items.Remove(checkedListBox.Items[2]); 591Assert.Equal(count, checkedListBox.Items.Count); 609checkedListBox.Items.AddRange((object[])["1", "2", "3"]); 611for (int count = checkedListBox.Items.Count; count > 1; count -= 1) 618checkedListBox.Items.Remove(checkedListBox.Items[0]); 622Assert.Equal(count, checkedListBox.Items.Count);
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (17)
17checkedListBox.Items.Add("a"); 18checkedListBox.Items.Add("b"); 19checkedListBox.Items.Add("c"); 20checkedListBox.Items.Add("d"); 21checkedListBox.Items.Add("e"); 22checkedListBox.Items.Add("f"); 23checkedListBox.Items.Add("g"); 24checkedListBox.Items.Add("h"); 25checkedListBox.Items.Add("i"); 30for (int i = 0; i < checkedListBox.Items.Count; i++) 115checkedListBox.Items.Add(i); 139checkedListBox.Items.Add(0); 140checkedListBox.Items.Add(1); 141checkedListBox.Items.Add(2); 155checkedListBox.Items.Add(0); 156checkedListBox.Items.Add(1); 157checkedListBox.Items.Add(2);
System\Windows\Forms\AccessibleObjects\CheckedListBoxItemAccessibleObjectTests.cs (31)
46checkedListBox.Items.Add(testName); 56checkedListBox.Items.Add("A"); 67checkedListBox.Items.Add(0); 68checkedListBox.Items.Add(1); 69checkedListBox.Items.Add(2); 88checkedListBox.Items.Add("A"); 100checkedListBox.Items.Add("A"); 115checkedListBox.Items.Add(0); 116checkedListBox.Items.Add(1); 117checkedListBox.Items.Add(2); 131checkedListBox.Items.Add(0); 132checkedListBox.Items.Add(1); 133checkedListBox.Items.Add(2); 150checkedListBox.Items.Add(0); 151checkedListBox.Items.Add(1); 152checkedListBox.Items.Add(2); 168checkedListBox.Items.Add("A"); 185checkedListBox.Items.Add("A"); 198checkedListBox.Items.Add("A"); 212checkedListBox.Items.Add("A"); 225checkedListBox.Items.Add("A"); 242checkedListBox.Items.Add("A"); 261checkedListBox.Items.Add("A"); 275checkedListBox.Items.Add("A"); 292checkedListBox.Items.Add("A"); 308checkedListBox.Items.Add("A"); 319checkedListBox.Items.Add("A"); 346checkedListBox.Items.Add("Item 1", 353checkedListBox.Items.InnerArray.GetEntryObject(0, 0), 363checkedListBox.Items.Add("Item 1"); 368checkedListBox.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)
1043checkedListBox1.Items.AddRange((object[])["Foo", "Foo", "Foo"]);
WinFormsControlsTest (3)
MultipleControls.cs (1)
132checkedListBox1.Items.Add("Pennsylvania", CheckState.Checked);
MultipleControls.Designer.cs (2)
227this.checkedListBox1.Items.AddRange(new object[] { 283this.checkedListBox2.Items.AddRange(new object[] {