1 write to ListView
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
45
ListView
= value;
78 references to ListView
System.Windows.Forms (36)
System\Windows\Forms\Controls\ListView\ColumnHeader.ColumnHeaderImageListIndexer.cs (1)
21
return _owner.
ListView
?.SmallImageList;
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (35)
39
return
ListView
;
120
if (
ListView
is null)
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];
179
if (
ListView
is not null)
181
return
ListView
.GetColumnIndex(this);
215
if (
ListView
is not null &&
ListView
.IsHandleCreated)
217
ListView
.SetColumnInfo(LVCOLUMNW_MASK.LVCF_IMAGE, this);
252
if (
ListView
is not null &&
ListView
.IsHandleCreated)
254
ListView
.SetColumnInfo(LVCOLUMNW_MASK.LVCF_IMAGE, this);
317
ListView
?.SetColumnInfo(LVCOLUMNW_MASK.LVCF_TEXT, this);
331
if (!_textAlignInitialized && (
ListView
is not null))
336
if ((Index != 0) && (
ListView
.RightToLeft == RightToLeft.Yes) && !
ListView
.IsMirrored)
357
if (
ListView
is not null)
359
ListView
.SetColumnInfo(LVCOLUMNW_MASK.LVCF_FMT, this);
360
ListView
.Invalidate();
395
if (
ListView
is not null &&
ListView
.IsHandleCreated && !
ListView
.Disposing &&
ListView
.View == View.Details)
398
HWND hwndHdr = (HWND)PInvokeCore.SendMessage(
ListView
, PInvoke.LVM_GETHEADER);
404
_width = (int)PInvokeCore.SendMessage(
ListView
, PInvoke.LVM_GETCOLUMNWIDTH, (WPARAM)Index);
414
ListView
?.SetColumnWidth(Index, ColumnHeaderAutoResizeStyle.None);
425
ListView
?.AutoResizeColumn(Index, headerAutoResize);
455
if (
ListView
is not null)
460
ListView
.Columns.RemoveAt(index);
482
if (
ListView
is not null &&
ListView
.IsHandleCreated && !
ListView
.Disposing)
486
PInvokeCore.SendMessage(
ListView
, PInvoke.LVM_SETCOLUMNORDERARRAY, (WPARAM)cols.Length, (LPARAM)pCols);
System.Windows.Forms.Tests (42)
System\Windows\Forms\ColumnHeaderCollectionTests.cs (35)
132
Assert.Equal(listView, header.
ListView
);
170
Assert.Equal(listView, header.
ListView
);
192
Assert.Equal(listView, header.
ListView
);
215
Assert.Equal(listView, header.
ListView
);
237
Assert.Equal(listView, header.
ListView
);
260
Assert.Equal(listView, header.
ListView
);
285
Assert.Equal(listView, header.
ListView
);
310
Assert.Equal(listView, header.
ListView
);
340
Assert.Equal(listView, header.
ListView
);
439
Assert.Null(header.
ListView
);
446
Assert.Null(header.
ListView
);
462
Assert.Null(header.
ListView
);
469
Assert.Null(header.
ListView
);
487
Assert.Null(header.
ListView
);
494
Assert.Null(header.
ListView
);
513
Assert.Null(header.
ListView
);
520
Assert.Null(header.
ListView
);
711
Assert.Same(listView, header.
ListView
);
723
Assert.Equal(listView, header.
ListView
);
736
Assert.Equal(listView, header.
ListView
);
750
Assert.Equal(listView, header.
ListView
);
763
Assert.Equal(listView, header.
ListView
);
777
Assert.Equal(listView, header.
ListView
);
793
Assert.Equal(listView, header.
ListView
);
809
Assert.Equal(listView, header.
ListView
);
844
Assert.Same(listView, header.
ListView
);
882
Assert.Null(header.
ListView
);
889
Assert.Null(header.
ListView
);
904
Assert.Null(header.
ListView
);
911
Assert.Null(header.
ListView
);
962
Assert.Null(header.
ListView
);
998
Assert.Null(header.
ListView
);
1037
Assert.Null(header.
ListView
);
1086
Assert.Null(header.
ListView
);
1090
Assert.Same(listView, header.
ListView
);
System\Windows\Forms\ColumnHeaderTests.cs (7)
26
Assert.Null(header.
ListView
);
52
Assert.Null(header.
ListView
);
76
Assert.Null(header.
ListView
);
752
Assert.Same(listView, header.
ListView
);
1480
Assert.Null(header.
ListView
);
1519
Assert.Null(header.
ListView
);
1559
Assert.Null(header.
ListView
);