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)
30if (_owner.IsHandleCreated) 32return (int)PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETSELECTEDCOUNT); 36if (_owner._savedSelectedItems is not null) 38return _owner._savedSelectedItems.Count; 53if (_owner.IsHandleCreated) 59_owner, 76Debug.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"); 77if (_owner._savedSelectedItems is not null) 81indices[i] = _owner._savedSelectedItems[i].Index; 100if (_owner.IsHandleCreated) 107_owner, 118Debug.Assert(_owner._savedSelectedItems is not null, "Null selected items collection"); 119return _owner._savedSelectedItems[index].Index; 170if (selectedIndex < 0 || selectedIndex >= _owner.Items.Count) 175return _owner.Items[selectedIndex].Selected; 258if (_owner.VirtualMode) 260ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.VirtualListSize); 262if (_owner.IsHandleCreated) 264_owner.SetItemState(itemIndex, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED); 274ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.Items.Count); 276_owner.Items[itemIndex].Selected = true; 283if (!_owner.VirtualMode) 285_owner._savedSelectedItems = null; 288if (_owner.IsHandleCreated) 290_owner.SetItemState(-1, 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED); 318if (_owner.VirtualMode) 320ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.VirtualListSize); 322if (_owner.IsHandleCreated) 324_owner.SetItemState(itemIndex, 0, LIST_VIEW_ITEM_STATE_FLAGS.LVIS_SELECTED); 329ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(itemIndex, _owner.Items.Count); 331_owner.Items[itemIndex].Selected = false;