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