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