241 references to Columns
Accessibility_Core_App (1)
DataBindingExample.cs (1)
97
listView1.
Columns
.Add(colName);
System.Windows.Forms (41)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (5)
126
if (value < 0 || value > (ListView.
Columns
.Count - 1))
133
int[] colsOrder = new int[ListView.
Columns
.Count];
139
for (int i = 0; i < ListView.
Columns
.Count; i++)
141
ColumnHeader hdr = ListView.
Columns
[i];
460
ListView.
Columns
.RemoveAt(index);
System\Windows\Forms\Controls\ListView\ListView.cs (22)
2205
Columns
[lvhi.iItem].Text);
2401
for (int i = 0; i <
Columns
.Count; i++)
2403
sumOfDisplayIndices +=
Columns
[i].DisplayIndex;
2404
Debug.Assert(
Columns
[i].DisplayIndex > -1 &&
Columns
[i].DisplayIndex <
Columns
.Count, "display indices out of whack");
2407
int colsCount =
Columns
.Count;
2453
Columns
.Clear();
3580
if (View == View.Details &&
Columns
.Count == 0)
3609
if (View == View.Details &&
Columns
.Count == 0)
3650
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(subItemIndex,
Columns
.Count);
3656
if (
Columns
.Count == 0)
3865
int[] indices = new int[
Columns
.Count];
3866
for (int i = 0; i <
Columns
.Count; i++)
3868
ColumnHeader hdr =
Columns
[i];
5063
foreach (ColumnHeader columnHeader in
Columns
)
5327
Columns
[i].DisplayIndexInternal = indices[i];
6181
int from =
Columns
[header->iItem].DisplayIndex;
6199
Columns
[header->iItem]);
6214
int[] indices = new int[
Columns
.Count];
6215
for (int i = 0; i <
Columns
.Count; i++)
6217
ColumnHeader hdr =
Columns
[i];
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (4)
40
=> this.TryGetOwnerAs(out ListView? owningListView) ? owningListView.
Columns
.Count : base.ColumnCount;
173
var columnHeaders = new IRawElementProviderSimple.Interface[owningListView.
Columns
.Count];
176
columnHeaders[i] = owningListView.
Columns
[i].AccessibilityObject;
328
for (int i = 1; i < owningListView.
Columns
.Count; i++)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (6)
23
private int LastChildIndex => HasImage ? _owningListView.
Columns
.Count : _owningListView.
Columns
.Count - 1;
33
? _owningListView.
Columns
[accessibleChildIndex - 1]._correspondingListViewSubItemIndex
34
: _owningListView.
Columns
[accessibleChildIndex]._correspondingListViewSubItemIndex;
107
for (int i = 0; i < _owningListView.
Columns
.Count; i++)
109
if (_owningListView.
Columns
[i]._correspondingListViewSubItemIndex == subItemIndex)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (2)
54
|| _owningListView.
Columns
.Count <= index
109
int subItemCount = Math.Min(_owningListView.
Columns
.Count, _owningItem.SubItems.Count);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (2)
53
if (!_owningListView.FullRowSelect && index == ParentInternal.FirstSubItemIndex && _owningListView.
Columns
.Count > 1)
143
? [_owningListView.
Columns
[Column].AccessibilityObject]
System.Windows.Forms.Design (5)
System\Windows\Forms\Design\ColumnHeaderCollectionEditor.cs (1)
66
listview.
Columns
.Remove(column);
System\Windows\Forms\Design\ListViewActionList.cs (1)
25
EditorServiceContext.EditValue(_designer, Component!, nameof(ListView.
Columns
));
System\Windows\Forms\Design\ListViewDesigner.cs (1)
36
return lv.
Columns
;
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
159
_listViewCannedMasks.
Columns
.AddRange(
System\Windows\Forms\Design\StyleEditorForm.cs (1)
306
_columnsAndRowsListView.
Columns
.AddRange(
System.Windows.Forms.Design.Tests (2)
ListViewDesignerTests.cs (2)
17
listView.
Columns
.Add("123");
18
listView.
Columns
.Add("abc");
System.Windows.Forms.Tests (179)
System\Windows\Forms\AccessibleObjects\ColumnHeader.ListViewColumnHeaderAccessibleObjectTests.cs (6)
46
listView.
Columns
.Add(columnHeader);
61
listView.
Columns
.Add(columnHeader);
75
listView.
Columns
.Add(columnHeader);
78
listView.
Columns
.Clear();
89
listView.
Columns
.Add(columnHeader);
92
listView.
Columns
.Remove(columnHeader);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (23)
266
listView.
Columns
.Add(new ColumnHeader());
347
listView.
Columns
.Add(new ColumnHeader());
389
listView.
Columns
.Add(new ColumnHeader());
450
listView.
Columns
.Add(new ColumnHeader());
512
listView.
Columns
.Add(new ColumnHeader());
583
listView.
Columns
.Add(new ColumnHeader());
638
listView.
Columns
.Add(new ColumnHeader());
718
listView.
Columns
.Add(new ColumnHeader());
800
listView.
Columns
.Add(new ColumnHeader());
852
listView.
Columns
.Add(new ColumnHeader());
1149
listView.
Columns
.Add(new ColumnHeader("Column 1") { Width = 70 });
1150
listView.
Columns
.Add(new ColumnHeader("Column 2") { Width = 70 });
1172
listView.
Columns
.Add(new ColumnHeader("Column 1") { Width = 70 });
1173
listView.
Columns
.Add(new ColumnHeader("Column 2") { Width = 70 });
1191
listView.
Columns
.Add(new ColumnHeader("Column 1") { Width = 70 });
1192
listView.
Columns
.Add(new ColumnHeader("Column 2") { Width = 70 });
1193
listView.
Columns
.Add(new ColumnHeader("Column 3") { Width = 70 });
1217
listView.
Columns
.Add(new ColumnHeader("Column 1") { Width = 70 });
1218
listView.
Columns
.Add(new ColumnHeader("Column 2") { Width = 70 });
1219
listView.
Columns
.Add(new ColumnHeader("Column 3") { Width = 70 });
1402
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 1" });
1403
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 2" });
1404
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 3" });
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (3)
587
listView.
Columns
.Add(new ColumnHeader());
1217
listView.
Columns
.Add(new ColumnHeader());
1429
listView.
Columns
.Add(new ColumnHeader());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (22)
1156
listView.
Columns
.Add(new ColumnHeader($"Column {i}"));
1213
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 1" });
1214
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 2" });
1215
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 3" });
1294
listView.
Columns
.Add(new ColumnHeader());
1353
listView.
Columns
.Add(new ColumnHeader());
1411
listView.
Columns
.Add(new ColumnHeader());
1458
listView.
Columns
.Add(new ColumnHeader());
1538
listView.
Columns
.Add(new ColumnHeader());
1539
listView.
Columns
.Add(new ColumnHeader());
1582
listView.
Columns
.Add(new ColumnHeader());
1583
listView.
Columns
.Add(new ColumnHeader());
1584
listView.
Columns
.Add(new ColumnHeader());
1596
listView.
Columns
.Add(new ColumnHeader());
1597
listView.
Columns
.Add(new ColumnHeader());
1598
listView.
Columns
.Add(new ColumnHeader());
1599
listView.
Columns
.Add(new ColumnHeader());
1623
listView.
Columns
.Add(new ColumnHeader());
1641
listView.
Columns
.Add(new ColumnHeader());
1642
listView.
Columns
.Add(new ColumnHeader());
1643
listView.
Columns
.Add(new ColumnHeader());
1977
listView.
Columns
.Add(new ColumnHeader());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (15)
23
control.
Columns
.Add(new ColumnHeader());
39
control.
Columns
.AddRange((ColumnHeader[])[new(), new(), new()]);
43
AccessibleObject expected = item.SubItems[control.
Columns
.Count - 1].AccessibilityObject;
54
control.
Columns
.AddRange((ColumnHeader[])[new(), new(), new()]);
55
int outRangeIndex = control.
Columns
.Count + 1;
71
control.
Columns
.AddRange((ColumnHeader[])[new(), new(), new()]);
102
control.
Columns
.AddRange((ColumnHeader[])[new(), new(), new()]);
107
Assert.Equal(control.
Columns
.Count, accessibleObject.GetChildCount());
117
control.
Columns
.AddRange((ColumnHeader[])[new(), new(), new()]);
141
listView.
Columns
.Add(new ColumnHeader());
169
listView1.
Columns
.AddRange((ColumnHeader[])[columnHeader1, columnHeader2, columnHeader3]);
200
listView1.
Columns
.RemoveAt(0);
204
foreach (ColumnHeader col in listView1.
Columns
)
224
listView1.
Columns
.RemoveAt(0);
228
foreach (ColumnHeader col in listView1.
Columns
)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (2)
24
list.
Columns
.Add(column);
50
list.
Columns
.Add(column);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (10)
28
list.
Columns
.AddRange(
65
list.
Columns
.AddRange(
640
list.
Columns
.AddRange(
687
list.
Columns
.AddRange(
728
list.
Columns
.AddRange(
764
list.
Columns
.AddRange(
820
listView.
Columns
.Add(new ColumnHeader($"Column {i}"));
877
listView.
Columns
.AddRange([new() { Width = 120, Text = "Column 1" }, new() { Width = 120, Text = "Column 2" }]);
899
listView.
Columns
.AddRange([new() { Width = 120, Text = "Column 1" }, new() { Width = 120, Text = "Column 2" }]);
1014
ListView.ColumnHeaderCollection columns = control.
Columns
;
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
161
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 1", Width = 100 });
System\Windows\Forms\ColumnHeaderTests.cs (70)
90
listView.
Columns
.Add(header);
134
listView.
Columns
.Add(header1);
135
listView.
Columns
.Add(header2);
136
listView.
Columns
.Add(header3);
138
listView.
Columns
[columnIndex].DisplayIndex = value;
145
listView.
Columns
[columnIndex].DisplayIndex = value;
160
listView.
Columns
.Add(header1);
161
listView.
Columns
.Add(header2);
162
listView.
Columns
.Add(header3);
171
listView.
Columns
[columnIndex].DisplayIndex = value;
181
listView.
Columns
[columnIndex].DisplayIndex = value;
214
listView.
Columns
.Add(header1);
215
listView.
Columns
.Add(header2);
216
listView.
Columns
.Add(header3);
219
listView.
Columns
[columnIndex].DisplayIndex = value;
232
listView.
Columns
.Add(header);
325
listView.
Columns
.Add(header);
351
listView.
Columns
.Add(header);
382
listView.
Columns
.Add(header);
404
listView.
Columns
.Add(header);
439
listView.
Columns
.Add(header);
468
listView.
Columns
.Add(header);
494
listView.
Columns
.Add(header);
544
listView.
Columns
.Add(header);
568
listView.
Columns
.Add(header);
601
listView.
Columns
.Add(header);
621
listView.
Columns
.Add(header);
659
listView.
Columns
.Add(header);
690
listView.
Columns
.Add(header);
708
listView.
Columns
.Add(header);
720
listView.
Columns
.Add(header);
733
listView.
Columns
.Add(header);
742
listView.
Columns
.Add(header);
751
listView.
Columns
.Add(header);
794
listView.
Columns
.Add(header);
812
listView.
Columns
.Add(header);
971
listView.
Columns
.Add(header);
987
listView.
Columns
.Add(header);
1004
listView.
Columns
.Add(header);
1035
listView.
Columns
.Add(header1);
1036
listView.
Columns
.Add(header2);
1132
listView.
Columns
.Add(header1);
1133
listView.
Columns
.Add(header2);
1135
listView.
Columns
[columnIndex].TextAlign = value;
1136
Assert.Equal(expected, listView.
Columns
[columnIndex].TextAlign);
1140
listView.
Columns
[columnIndex].TextAlign = value;
1141
Assert.Equal(expected, listView.
Columns
[columnIndex].TextAlign);
1157
listView.
Columns
.Add(header1);
1158
listView.
Columns
.Add(header2);
1167
listView.
Columns
[columnIndex].TextAlign = value;
1168
Assert.Equal(expected, listView.
Columns
[columnIndex].TextAlign);
1175
listView.
Columns
[columnIndex].TextAlign = value;
1176
Assert.Equal(expected, listView.
Columns
[columnIndex].TextAlign);
1195
listView.
Columns
.Add(header1);
1196
listView.
Columns
.Add(header2);
1199
listView.
Columns
[columnIndex].TextAlign = value;
1221
listView.
Columns
.Add(header);
1231
listView.
Columns
.Add(header);
1255
listView.
Columns
.Add(header);
1303
listView.
Columns
.Add(header);
1321
listView.
Columns
.Add(header);
1358
listView.
Columns
.Add(header);
1376
listView.
Columns
.Add(header);
1402
listView.
Columns
.Add(header);
1420
listView.
Columns
.Add(header);
1509
listView.
Columns
.Add(source);
1581
listView.
Columns
.Add(header);
1583
Assert.Empty(listView.
Columns
);
1586
Assert.Empty(listView.
Columns
);
1636
listView.
Columns
.Add(header);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (14)
146
listView.
Columns
.Add(new ColumnHeader() { Width = 50 });
166
listView.
Columns
.Add(new ColumnHeader() { Width = columnWidth });
411
listView.
Columns
.Add(new ColumnHeader());
430
listView.
Columns
.Add(new ColumnHeader());
451
listView.
Columns
.Add(new ColumnHeader());
471
listView.
Columns
.Add(new ColumnHeader());
492
listView.
Columns
.Add(new ColumnHeader());
514
listView.
Columns
.Add(new ColumnHeader());
535
listView.
Columns
.Add(new ColumnHeader());
555
listView.
Columns
.Add(new ColumnHeader());
575
listView.
Columns
.Add(new ColumnHeader());
592
listView.
Columns
.Add(new ColumnHeader());
609
listView.
Columns
.Add(new ColumnHeader());
627
listView.
Columns
.Add(new ColumnHeader());
System\Windows\Forms\ListViewTests.cs (13)
54
Assert.Empty(control.
Columns
);
55
Assert.Same(control.
Columns
, control.
Columns
);
5016
listView.
Columns
.AddRange(
5072
listView.
Columns
.AddRange(
5147
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 1", Width = 100 });
5148
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 2", Width = 100 });
5149
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 3", Width = 100 });
5224
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 1", Width = 100 });
5225
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 2", Width = 100 });
5226
listView.
Columns
.Add(new ColumnHeader() { Text = "Column 3", Width = 100 });
5429
listView.
Columns
.AddRange(
6194
listView.
Columns
.Add(new ColumnHeader() { Name = "Column 1" });
System.Windows.Forms.UI.IntegrationTests (2)
ListViewTests.cs (2)
520
listView.
Columns
.AddRange([columnHeader1, columnHeader2, columnHeader3]);
553
listView.
Columns
.Add(new ColumnHeader() { Text = $"ColumnHeader{i}" });
WinFormsControlsTest (11)
ListViewTest.cs (6)
119
listView2.
Columns
.Add("column1", "Item Column", -2, HorizontalAlignment.Left, 0);
120
listView2.
Columns
.Add("Column 2", -2, HorizontalAlignment.Left);
121
listView2.
Columns
.Add("Column 3", -2, HorizontalAlignment.Left);
122
listView2.
Columns
.Add("Column 4", -2, HorizontalAlignment.Center);
228
listView2.
Columns
[random.Next(0, listView2.
Columns
.Count)].ImageIndex = random.Next(0, 2);
ListViewTest.Designer.cs (1)
67
this.listView1.
Columns
.AddRange(new System.Windows.Forms.ColumnHeader[] {
MultipleControls.cs (4)
81
listView2.
Columns
.Add("column1", "Item Column", -2, HorizontalAlignment.Left, 0);
82
listView2.
Columns
.Add("Column 2", -2, HorizontalAlignment.Left);
83
listView2.
Columns
.Add("Column 3", -2, HorizontalAlignment.Left);
84
listView2.
Columns
.Add("Column 4", -2, HorizontalAlignment.Center);