1 write to _owner
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (1)
19_owner = owner;
118 references to _owner
System.Windows.Forms (118)
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (118)
26_owner.ApplyUpdateCachedItems(); 27return _owner.VirtualMode ? _owner.VirtualListSize : _owner._itemCount; 31public bool OwnerIsVirtualListView => _owner.VirtualMode; 33public bool OwnerIsDesignMode => _owner.DesignMode; 40_owner.ApplyUpdateCachedItems(); 41if (_owner.VirtualMode) 47ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(displayIndex, _owner._itemCount); 49if (_owner.ExpectingMouseUp) 51_owner.ItemCollectionChangedInMouseDown = true; 64_owner.ApplyUpdateCachedItems(); 66if (_owner.VirtualMode) 70_owner.OnRetrieveVirtualItem(rVI); 76rVI.Item.SetItemIndex(_owner, index); 82ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _owner._itemCount); 84if (_owner.IsHandleCreated && !_owner.ListViewHandleDestroyed) 86_owner._listItemsTable.TryGetValue(DisplayIndexToID(index), out ListViewItem? item); 91Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 92return _owner._listViewItems[index]; 99if (_owner.VirtualMode) 105Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 112_owner.InsertItems(_owner._itemCount, [value], true); 114if (_owner.IsHandleCreated && !_owner.CheckBoxes && valueChecked) 116_owner.UpdateSavedCheckedItems(value, true /*addItem*/); 119if (_owner.ExpectingMouseUp) 121_owner.ItemCollectionChangedInMouseDown = true; 132if (_owner.VirtualMode) 137IComparer? comparer = _owner._listItemSorter; 138_owner._listItemSorter = null; 140Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 144if (_owner.IsHandleCreated && !_owner.CheckBoxes) 158_owner.BeginUpdate(); 159_owner.InsertItems(_owner._itemCount, values, true); 161if (_owner.IsHandleCreated && !_owner.CheckBoxes) 167_owner.UpdateSavedCheckedItems(values[i], true /*addItem*/); 174_owner._listItemSorter = comparer; 175_owner.EndUpdate(); 178if (_owner.ExpectingMouseUp) 180_owner.ItemCollectionChangedInMouseDown = true; 184((_owner.Sorting != SortOrder.None) && !_owner.VirtualMode)) 186_owner.Sort(); 192Debug.Assert(!_owner.VirtualMode, "in virtual mode, this method does not make any sense"); 193if (_owner.IsHandleCreated && !_owner.ListViewHandleDestroyed) 202PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETITEMW, (WPARAM)0, ref lvItem); 213if (_owner._itemCount <= 0) 218_owner.ApplyUpdateCachedItems(); 220if (_owner.IsHandleCreated && !_owner.ListViewHandleDestroyed) 225int count = _owner.Items.Count; 227_owner, 234ListViewItem item = _owner.Items[i]; 243_owner, 257Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created"); 259PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEALLITEMS); 263if (_owner.View == View.SmallIcon) 267_owner.FlipViewToLargeIconAndSmallIcon = true; 271Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon, "we only set this when comctl 6.0 is loaded"); 272_owner.View = View.LargeIcon; 273_owner.View = View.SmallIcon; 279int count = _owner.Items.Count; 283ListViewItem item = _owner.Items[i]; 287Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 288_owner._listViewItems.Clear(); 291_owner._listItemsTable.Clear(); 292if (_owner.IsHandleCreated && !_owner.CheckBoxes) 294_owner._savedCheckedItems = null; 297_owner._itemCount = 0; 299if (_owner.ExpectingMouseUp) 301_owner.ItemCollectionChangedInMouseDown = true; 307_owner.ApplyUpdateCachedItems(); 308if (_owner.IsHandleCreated && !_owner.ListViewHandleDestroyed) 310return _owner._listItemsTable.TryGetValue(item._id, out ListViewItem? itemOut) 315Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 316return _owner._listViewItems.Contains(item); 323if (_owner.VirtualMode) 329count = _owner._itemCount; 335if (_owner.VirtualMode) 340Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 345_owner.ApplyUpdateCachedItems(); 348_owner.InsertItems(index, [item], true); 349if (_owner.IsHandleCreated && !_owner.CheckBoxes && item.Checked) 351_owner.UpdateSavedCheckedItems(item, true /*addItem*/); 354if (_owner.ExpectingMouseUp) 356_owner.ItemCollectionChangedInMouseDown = true; 364Debug.Assert(!_owner.VirtualMode, "in virtual mode, this function does not make any sense"); 378int index = _owner.VirtualMode ? Count - 1 : IndexOf(item); 380Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 382if (_owner.VirtualMode) 395if (_owner.VirtualMode) 401ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _owner._itemCount); 403Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 405if (_owner.IsHandleCreated && !_owner.CheckBoxes && this[index].Checked) 407_owner.UpdateSavedCheckedItems(this[index], addItem: false); 410_owner.ApplyUpdateCachedItems(); 416if (_owner.IsHandleCreated) 418Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created"); 419if (PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEITEM, (WPARAM)index) == 0) 426Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 427_owner._listViewItems.RemoveAt(index); 430_owner._itemCount--; 431_owner._listItemsTable.Remove(itemID); 433if (_owner.ExpectingMouseUp) 435_owner.ItemCollectionChangedInMouseDown = true; 441if (_owner._itemCount > 0) 452ListViewItem[] items = new ListViewItem[_owner._itemCount];