3 writes to _listView
System.Windows.Forms (3)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (3)
1001_listView = parent; 1178_listView = null; 1299_listView = listView;
126 references to _listView
System.Windows.Forms (126)
System\Windows\Forms\Controls\ListView\ListView.cs (3)
3398Debug.Assert(item._listView == this, "Can't GetDisplayIndex if the list item doesn't belong to us"); 4011if (items[i]._listView is not null) 4038if (checkHosting && item._listView is not null)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (103)
251ListView owningListView = _listView ?? Group?.ListView 286if (_listView is not null) 288return _listView.BackColor; 310if (_listView is not null) 312return _listView.GetItemRect(Index); 331if (_listView is not null && _listView.IsHandleCreated) 337if (_listView is not null && !_listView.UseCompatibleStateImageBehavior) 339if (!_listView.CheckBoxes) 341_listView.UpdateSavedCheckedItems(this, value); 362if (_listView is not null && _listView.IsHandleCreated) 364return _listView.GetItemState(Index, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED) != 0; 372if (_listView is not null && _listView.IsHandleCreated) 374_listView.SetItemState(Index, value ? LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED : 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_FOCUSED); 376if (_listView.IsAccessibilityObjectCreated) 394if (_listView is not null) 396return _listView.Font; 417if (_listView is not null) 419return _listView.ForeColor; 487if (_listView is not null && _listView.IsHandleCreated) 489_listView.SetItemImage(itemIndex: Index, imageIndex: ImageIndexer.ActualIndex); 513if (_listView is not null && _listView.IsHandleCreated) 515_listView.SetItemImage(Index, ImageIndexer.ActualIndex); 525if (_listView is not null) 527switch (_listView.View) 531return _listView.LargeImageList; 535return _listView.SmallImageList; 559if (_listView is not null && _listView.IsHandleCreated) 561_listView.SetItemIndentCount(Index, _indentCount); 575if (_listView is not null) 579if (!_listView.VirtualMode) 581_lastIndex = _listView.GetDisplayIndex(this, _lastIndex); 598public ListView? ListView => _listView; 630if (_listView is not null && _listView.IsHandleCreated) 632_position = _listView.GetItemPosition(Index); 642if (_listView is not null && _listView.IsHandleCreated) 644if (!_listView.VirtualMode) 646_listView.SetItemPosition(Index, _position.X, _position.Y); 685if (_listView is not null && _listView.IsHandleCreated) 687return _listView.GetItemState(Index, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED) != 0; 694if (_listView is not null && _listView.IsHandleCreated) 696_listView.SetItemState(Index, value ? LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED : 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED); 699_listView.SetSelectionMark(Index); 704if (_listView is not null && _listView.IsHandleCreated) 707_listView.CacheSelectedStateForItem(this, value); 725if (_listView is not null && _listView.IsHandleCreated) 727LIST_VIEW_ITEM_STATE_FLAGS state = _listView.GetItemState(Index, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK); 738if (_listView is not null && _listView.IsHandleCreated) 742_listView.SetItemState(Index, state, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_STATEIMAGEMASK); 840if (_listView is not null && _listView.IsHandleCreated) 842_listView.ListViewItemToolTipChanged(this); 947if (_listView is not null && _listView.IsHandleCreated) 949_listView.EnsureVisible(Index); 968if (_listView is not null && _listView.IsHandleCreated) 970return _listView.GetItemRect(Index, portion); 978if (_listView is not null && _listView.IsHandleCreated && _listView.View == View.Details) 980_listView.GetSubItemAt(x, y, out int iItem, out int iSubItem); 997Debug.Assert(_listView is null || !_listView.VirtualMode, "ListViewItem::Host can't be used w/ a virtual item"); 1009KeyboardToolTipStateMachine.Instance.Hook(this, _listView!.KeyboardToolTip); 1037Debug.Assert(_listView is not null, "This method is used only when items are parented in a list view"); 1038Debug.Assert(!_listView.VirtualMode, "we need to update the group only when the user specifies the list view items in localizable forms"); 1044Group = _listView.Groups[_groupName]; 1063Debug.Assert(_listView!.IsHandleCreated, "Should only invoke UpdateStateToListView when handle is created."); 1094if (_listView.GroupsEnabled) 1097lvItem.iGroupId = _listView.GetNativeGroupId(this); 1099nint result = PInvokeCore.SendMessage(_listView, PInvoke.LVM_ISGROUPVIEWENABLED); 1101result = PInvokeCore.SendMessage(_listView, PInvoke.LVM_HASGROUP, (WPARAM)lvItem.iGroupId); 1107PInvokeCore.SendMessage(_listView, PInvoke.LVM_SETITEMW, 0, ref lvItem); 1113if (_listView is not null && _listView.IsHandleCreated && displayIndex != -1) 1136PInvokeCore.SendMessage(_listView, PInvoke.LVM_GETITEMW, 0, ref lvItem); 1164if (_listView is not null) 1166if ((_listView.Site is null || !_listView.Site.DesignMode) && _group is not null) 1171KeyboardToolTipStateMachine.Instance.Unhook(this, _listView.KeyboardToolTip); 1181public virtual void Remove() => _listView?.Items.Remove(this); 1312if (_listView is not null && _listView.IsHandleCreated) 1314_listView.Invalidate(); 1322if (_listView is null || !_listView.IsHandleCreated) 1332_listView.SetItemText(itemIndex, index, _subItems[index].Text); 1339_listView.SetItemText(itemIndex, i, _subItems[i].Text); 1346_listView.SetItemText(itemIndex, i, string.Empty);
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (14)
10private bool AllowsToolTips => _listView?.ShowItemToolTips ?? false; 25if (_listView is null) 30switch (_listView.View) 50neighboringRectangles.Add(_listView.Items[Index - 1].AccessibilityObject.Bounds); 53if (Index < _listView.Items.Count - 1) 55neighboringRectangles.Add(_listView.Items[Index + 1].AccessibilityObject.Bounds); 64IWin32Window? IKeyboardToolTip.GetOwnerWindow() => _listView; 66bool IKeyboardToolTip.HasRtlModeEnabled() => _listView?.RightToLeft == RightToLeft.Yes; 70bool IKeyboardToolTip.IsHoveredWithMouse() => _listView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false; 84if (_listView is null) 89ListViewItem item = _listView.Items[index]; 95Rectangle itemBounds = _listView.GetItemRect(index, ItemBoundsPortion.Label); 96Rectangle listviewBounds = _listView.AccessibilityObject.Bounds; 99return _listView.View switch
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (6)
80return _owner?._listView?.BackColor ?? SystemColors.Window; 99if (_owner?._listView is not null && _owner._listView.IsHandleCreated) 101return _owner._listView.GetSubItemRect(_owner.Index, _owner.SubItems.IndexOf(this)); 150return _owner?._listView?.Font ?? Control.DefaultFont; 173return _owner?._listView?.ForeColor ?? SystemColors.WindowText;