1 write to _owner
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (1)
19
_owner
= owner;
31 references to _owner
System.Windows.Forms (31)
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (31)
30
if (
_owner
.IsHandleCreated)
32
return (int)PInvokeCore.SendMessage(
_owner
, PInvoke.LVM_GETSELECTEDCOUNT);
36
if (
_owner
._savedSelectedItems is not null)
38
return
_owner
._savedSelectedItems.Count;
53
if (
_owner
.IsHandleCreated)
59
_owner
,
76
Debug.Assert(
_owner
._savedSelectedItems is not null || count == 0, "if the count of selectedItems is greater than 0 then the selectedItems should have been saved by now");
77
if (
_owner
._savedSelectedItems is not null)
81
indices[i] =
_owner
._savedSelectedItems[i].Index;
100
if (
_owner
.IsHandleCreated)
107
_owner
,
118
Debug.Assert(
_owner
._savedSelectedItems is not null, "Null selected items collection");
119
return
_owner
._savedSelectedItems[index].Index;
170
if (selectedIndex < 0 || selectedIndex >=
_owner
.Items.Count)
175
return
_owner
.Items[selectedIndex].Selected;
258
if (
_owner
.VirtualMode)
260
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex,
_owner
.VirtualListSize);
262
if (
_owner
.IsHandleCreated)
264
_owner
.SetItemState(itemIndex, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED);
274
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex,
_owner
.Items.Count);
276
_owner
.Items[itemIndex].Selected = true;
283
if (!
_owner
.VirtualMode)
285
_owner
._savedSelectedItems = null;
288
if (
_owner
.IsHandleCreated)
290
_owner
.SetItemState(-1, 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED);
318
if (
_owner
.VirtualMode)
320
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex,
_owner
.VirtualListSize);
322
if (
_owner
.IsHandleCreated)
324
_owner
.SetItemState(itemIndex, 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED);
329
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex,
_owner
.Items.Count);
331
_owner
.Items[itemIndex].Selected = false;