77 references to DefaultIndex
System.Windows.Forms (77)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (6)
411ImageIndex = ImageList.Indexer.DefaultIndex; 451[DefaultValue(ImageList.Indexer.DefaultIndex)] 457get => _imageIndex.Index != ImageList.Indexer.DefaultIndex && _imageList is not null && _imageIndex.Index >= _imageList.Images.Count 462ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 464if (value == _imageIndex.Index && value != ImageList.Indexer.DefaultIndex) 469if (value != ImageList.Indexer.DefaultIndex)
System\Windows\Forms\Controls\ImageList\ImageList.Indexer.cs (3)
23private int _index = DefaultIndex; 34_index = DefaultIndex; 65return DefaultIndex;
System\Windows\Forms\Controls\Labels\Label.cs (5)
410[DefaultValue(ImageList.Indexer.DefaultIndex)] 431return ImageList.Indexer.DefaultIndex; 435ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 437if (ImageIndex == value && value != ImageList.Indexer.DefaultIndex) 442if (value != ImageList.Indexer.DefaultIndex)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (4)
188[DefaultValue(ImageList.Indexer.DefaultIndex)] 197if (_imageIndexer.Index != ImageList.Indexer.DefaultIndex && ImageList is not null && _imageIndexer.Index >= ImageList.Images.Count) 206ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 208if (_imageIndexer.Index == value && value != ImageList.Indexer.DefaultIndex)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5738if (group.TitleImageIndex != ImageList.Indexer.DefaultIndex || group.TitleImageKey != ImageList.Indexer.DefaultKey)
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
274ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 276if (ImageIndexer.Index == value && value != ImageList.Indexer.DefaultIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (11)
74: this(text, ImageList.Indexer.DefaultIndex) 86: this(items, ImageList.Indexer.DefaultIndex) 465[DefaultValue(ImageList.Indexer.DefaultIndex)] 483ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 669_state[s_stateImageMaskSet] = (value == ImageList.Indexer.DefaultIndex ? 0 : 1); 715[DefaultValue(ImageList.Indexer.DefaultIndex)] 735ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 740_state[s_stateImageMaskSet] = (value == ImageList.Indexer.DefaultIndex ? 0 : 1); 1083if (SavedStateImageIndex > ImageList.Indexer.DefaultIndex) 1188int imageIndex = ImageList.Indexer.DefaultIndex; 1244else if (imageIndex != ImageList.Indexer.DefaultIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
56&& _owningItem.ImageIndex != ImageList.Indexer.DefaultIndex;
System\Windows\Forms\Controls\ListView\ListViewItemStateImageIndexConverter.cs (2)
78values[nImages] = ImageList.Indexer.DefaultIndex; 97return new StandardValuesCollection(new object[] { ImageList.Indexer.DefaultIndex });
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (4)
1064ImageIndex = ImageList.Indexer.DefaultIndex; 1117if ((Owner is not null) && ImageIndexer.Index != ImageList.Indexer.DefaultIndex 1127ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 3346=> Image is not null && ImageIndexer.ActualIndex >= 0 && ImageIndexer.Index != ImageList.Indexer.DefaultIndex;
System\Windows\Forms\Controls\TreeView\TreeNode.cs (20)
503[DefaultValue(ImageList.Indexer.DefaultIndex)] 511&& ImageIndexer.Index != ImageList.Indexer.DefaultIndex 526&& value != ImageList.Indexer.DefaultIndex) 884[DefaultValue(ImageList.Indexer.DefaultIndex)] 894&& SelectedImageIndexer.Index != ImageList.Indexer.DefaultIndex 909&& value != ImageList.Indexer.DefaultIndex) 1009[DefaultValue(ImageList.Indexer.DefaultIndex)] 1020if (StateImageIndexer.Index != ImageList.Indexer.DefaultIndex && 1031ArgumentOutOfRangeException.ThrowIfLessThan(value, ImageList.Indexer.DefaultIndex); 1034if (StateImageIndexer.Index == value && value != ImageList.Indexer.DefaultIndex) 1485int imageIndex = ImageList.Indexer.DefaultIndex; 1488int selectedImageIndex = ImageList.Indexer.DefaultIndex; 1491int stateImageIndex = ImageList.Indexer.DefaultIndex; 1546else if (imageIndex != ImageList.Indexer.DefaultIndex) 1556else if (selectedImageIndex != ImageList.Indexer.DefaultIndex) 1566else if (stateImageIndex != ImageList.Indexer.DefaultIndex) 1845tvis.item.iImage = (ImageIndexer.ActualIndex == ImageList.Indexer.DefaultIndex) ? tv.ImageIndexer.ActualIndex : ImageIndexer.ActualIndex; 1846tvis.item.iSelectedImage = (SelectedImageIndexer.ActualIndex == ImageList.Indexer.DefaultIndex) ? tv.SelectedImageIndexer.ActualIndex : SelectedImageIndexer.ActualIndex; 2174if (StateImageIndexer.ActualIndex != ImageList.Indexer.DefaultIndex) 2198=> actualIndex is ImageList.Indexer.NoneIndex or ImageList.Indexer.DefaultIndex;
System\Windows\Forms\Controls\TreeView\TreeView.cs (10)
526[DefaultValue(ImageList.Indexer.DefaultIndex)] 540return ImageList.Indexer.DefaultIndex; 556if (value == ImageList.Indexer.DefaultIndex) 596ImageIndex = (ImageList is not null) ? 0 : ImageList.Indexer.DefaultIndex; 998[DefaultValue(ImageList.Indexer.DefaultIndex)] 1011return ImageList.Indexer.DefaultIndex; 1027if (value == ImageList.Indexer.DefaultIndex) 1068SelectedImageIndex = (ImageList is not null) ? 0 : ImageList.Indexer.DefaultIndex; 2375return SelectedImageIndex != ImageList.Indexer.DefaultIndex; 2385return ImageIndex != ImageList.Indexer.DefaultIndex;
System\Windows\Forms\Controls\TreeView\TreeViewImageIndexConverter.cs (4)
32return ImageList.Indexer.DefaultIndex; 56if (index == ImageList.Indexer.DefaultIndex) 122values[nImages - 2] = ImageList.Indexer.DefaultIndex; 139ImageList.Indexer.DefaultIndex,
System\Windows\Forms\ImageIndexConverter.cs (4)
55return ImageList.Indexer.DefaultIndex; 72if (destinationType == typeof(string) && value is int index && index == ImageList.Indexer.DefaultIndex) 148values[nImages] = ImageList.Indexer.DefaultIndex; 168return new StandardValuesCollection(new object[] { ImageList.Indexer.DefaultIndex });