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