20 writes to DisplayIndex
System.Windows.Forms.Tests (20)
System\Windows\Forms\ColumnHeaderCollectionTests.cs (5)
378DisplayIndex = 1 382DisplayIndex = 0 386DisplayIndex = 2 390DisplayIndex = 2 394DisplayIndex = 10
System\Windows\Forms\ColumnHeaderTests.cs (15)
102DisplayIndex = value 107header.DisplayIndex = value; 138listView.Columns[columnIndex].DisplayIndex = value; 145listView.Columns[columnIndex].DisplayIndex = value; 171listView.Columns[columnIndex].DisplayIndex = value; 181listView.Columns[columnIndex].DisplayIndex = value; 219listView.Columns[columnIndex].DisplayIndex = value; 233Assert.Throws<ArgumentOutOfRangeException>("DisplayIndex", () => header.DisplayIndex = value); 243item.DisplayIndex = -1; 248item.DisplayIndex = 0; 264item.DisplayIndex = -1; 269item.DisplayIndex = 0; 1462DisplayIndex = 1, 1499DisplayIndex = 1, 1537DisplayIndex = 1,
89 references to DisplayIndex
System.Windows.Forms (22)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (5)
128throw new ArgumentOutOfRangeException(nameof(DisplayIndex), SR.ColumnHeaderBadDisplayIndex); 142if (hdr.DisplayIndex == DisplayIndexInternal) 146else if (hdr.DisplayIndex >= lowDI && hdr.DisplayIndex <= hiDI) 498return DisplayIndex != Index;
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (8)
271if (header.DisplayIndex == -1) 276if (!usedIndices.Contains(header.DisplayIndex) && header.DisplayIndex >= 0 && header.DisplayIndex < values.Length) 278usedIndices.Add(header.DisplayIndex); 281indices[i] = header.DisplayIndex; 523if (hdr.DisplayIndex >= removeHdr.DisplayIndex)
System\Windows\Forms\Controls\ListView\ListView.cs (9)
2399sumOfDisplayIndices += Columns[i].DisplayIndex; 2400Debug.Assert(Columns[i].DisplayIndex > -1 && Columns[i].DisplayIndex < Columns.Count, "display indices out of whack"); 3870else if (hdr.DisplayIndex >= index) 4605indices[index] = column.DisplayIndex; 6177int from = Columns[header->iItem].DisplayIndex; 6214if (hdr.DisplayIndex == from) 6218else if (hdr.DisplayIndex >= lowDI && hdr.DisplayIndex <= hiDI)
System.Windows.Forms.Tests (67)
System\Windows\Forms\ColumnHeaderCollectionTests.cs (38)
134Assert.Equal(0, header.DisplayIndex); 367Assert.Equal(0, header1.DisplayIndex); 368Assert.Equal(1, header2.DisplayIndex); 406Assert.Equal(0, header1.DisplayIndex); 407Assert.Equal(1, header2.DisplayIndex); 408Assert.Equal(2, header3.DisplayIndex); 409Assert.Equal(3, header4.DisplayIndex); 410Assert.Equal(4, header5.DisplayIndex); 441Assert.Equal(0, header.DisplayIndex); 448Assert.Equal(0, header.DisplayIndex); 464Assert.Equal(0, header.DisplayIndex); 471Assert.Equal(0, header.DisplayIndex); 489Assert.Equal(0, header.DisplayIndex); 496Assert.Equal(0, header.DisplayIndex); 515Assert.Equal(0, header.DisplayIndex); 522Assert.Equal(0, header.DisplayIndex); 884Assert.Equal(-1, header.DisplayIndex); 891Assert.Equal(-1, header.DisplayIndex); 906Assert.Equal(-1, header.DisplayIndex); 913Assert.Equal(-1, header.DisplayIndex); 944Assert.Equal(0, collection[0].DisplayIndex); 945Assert.Equal(1, collection[1].DisplayIndex); 946Assert.Equal(2, collection[2].DisplayIndex); 951Assert.Equal(0, collection[0].DisplayIndex); 952Assert.Equal(1, collection[1].DisplayIndex); 957Assert.Equal(0, collection[0].DisplayIndex); 980Assert.Equal(0, collection[0].DisplayIndex); 981Assert.Equal(1, collection[1].DisplayIndex); 982Assert.Equal(2, collection[2].DisplayIndex); 987Assert.Equal(0, collection[0].DisplayIndex); 988Assert.Equal(1, collection[1].DisplayIndex); 993Assert.Equal(0, collection[0].DisplayIndex); 1019Assert.Equal(0, collection[0].DisplayIndex); 1020Assert.Equal(1, collection[1].DisplayIndex); 1021Assert.Equal(2, collection[2].DisplayIndex); 1026Assert.Equal(0, collection[0].DisplayIndex); 1027Assert.Equal(1, collection[1].DisplayIndex); 1032Assert.Equal(0, collection[0].DisplayIndex);
System\Windows\Forms\ColumnHeaderTests.cs (29)
19Assert.Equal(-1, header.DisplayIndex); 45Assert.Equal(-1, header.DisplayIndex); 69Assert.Equal(-1, header.DisplayIndex); 91Assert.Equal(0, header.DisplayIndex); 104Assert.Equal(value, header.DisplayIndex); 108Assert.Equal(value, header.DisplayIndex); 139Assert.Equal(expectedDisplayIndices[0], header1.DisplayIndex); 140Assert.Equal(expectedDisplayIndices[1], header2.DisplayIndex); 141Assert.Equal(expectedDisplayIndices[2], header3.DisplayIndex); 146Assert.Equal(expectedDisplayIndices[0], header1.DisplayIndex); 147Assert.Equal(expectedDisplayIndices[1], header2.DisplayIndex); 148Assert.Equal(expectedDisplayIndices[2], header3.DisplayIndex); 172Assert.Equal(expectedDisplayIndices[0], header1.DisplayIndex); 173Assert.Equal(expectedDisplayIndices[1], header2.DisplayIndex); 174Assert.Equal(expectedDisplayIndices[2], header3.DisplayIndex); 182Assert.Equal(expectedDisplayIndices[0], header1.DisplayIndex); 183Assert.Equal(expectedDisplayIndices[1], header2.DisplayIndex); 184Assert.Equal(expectedDisplayIndices[2], header3.DisplayIndex); 239PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ColumnHeader))[nameof(ColumnHeader.DisplayIndex)]; 244Assert.Equal(-1, item.DisplayIndex); 249Assert.Equal(0, item.DisplayIndex); 253Assert.Equal(0, item.DisplayIndex); 260PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ColumnHeader))[nameof(ColumnHeader.DisplayIndex)]; 265Assert.Equal(-1, item.DisplayIndex); 270Assert.Equal(0, item.DisplayIndex); 274Assert.Equal(0, item.DisplayIndex); 1475Assert.Equal(-1, header.DisplayIndex); 1514Assert.Equal(-1, header.DisplayIndex); 1552Assert.Equal(-1, header.DisplayIndex);