16 references to IndexOf
System.Windows.Forms (9)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
105int subItemIndex = _owningItem.SubItems.IndexOf(subItemAccessibleObject.OwningSubItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (1)
95int index = _owningItem.SubItems.IndexOf(subItemAccessibleObject.OwningSubItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (3)
101return _owner._listView.GetSubItemRect(_owner.Index, _owner.SubItems.IndexOf(this)); 187internal int Index => _owner is null ? -1 : _owner.SubItems.IndexOf(this); 209_owner?.UpdateSubItems(_owner.SubItems.IndexOf(this));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (4)
191return IndexOf(Add(itemValue)); 211public bool Contains(ListViewSubItem? subItem) => IndexOf(subItem) != -1; 262return IndexOf(subItemValue); 329int index = IndexOf(item);
System.Windows.Forms.Tests (7)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
1164int subItemIndex = listView.Items[0].SubItems.IndexOf(listViewSubItem);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (6)
539Assert.Equal(0, collection.IndexOf(subItem)); 540Assert.Equal(-1, collection.IndexOf(new ListViewItem.ListViewSubItem())); 541Assert.Equal(-1, collection.IndexOf(null)); 550Assert.Equal(-1, collection.IndexOf(new ListViewItem.ListViewSubItem())); 551Assert.Equal(-1, collection.IndexOf(null)); 588Assert.Equal(-1, collection.IndexOf(null));