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]; 246_owner, 259Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created"); 261PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEALLITEMS); 265if (_owner.View == View.SmallIcon) 269_owner.FlipViewToLargeIconAndSmallIcon = true; 273Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon, "we only set this when comctl 6.0 is loaded"); 274_owner.View = View.LargeIcon; 275_owner.View = View.SmallIcon; 281int count = _owner.Items.Count; 285ListViewItem item = _owner.Items[i]; 289Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 290_owner._listViewItems.Clear(); 293_owner._listItemsTable.Clear(); 294if (_owner.IsHandleCreated && !_owner.CheckBoxes) 296_owner._savedCheckedItems = null; 299_owner._itemCount = 0; 301if (_owner.ExpectingMouseUp) 303_owner.ItemCollectionChangedInMouseDown = true; 309_owner.ApplyUpdateCachedItems(); 310if (_owner.IsHandleCreated && !_owner.ListViewHandleDestroyed) 312return _owner._listItemsTable.TryGetValue(item._id, out ListViewItem? itemOut) 317Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 318return _owner._listViewItems.Contains(item); 325if (_owner.VirtualMode) 331count = _owner._itemCount; 337if (_owner.VirtualMode) 342Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 347_owner.ApplyUpdateCachedItems(); 350_owner.InsertItems(index, [item], true); 351if (_owner.IsHandleCreated && !_owner.CheckBoxes && item.Checked) 353_owner.UpdateSavedCheckedItems(item, true /*addItem*/); 356if (_owner.ExpectingMouseUp) 358_owner.ItemCollectionChangedInMouseDown = true; 366Debug.Assert(!_owner.VirtualMode, "in virtual mode, this function does not make any sense"); 380int index = _owner.VirtualMode ? Count - 1 : IndexOf(item); 382Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 384if (_owner.VirtualMode) 397if (_owner.VirtualMode) 403ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _owner._itemCount); 405Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item."); 407if (_owner.IsHandleCreated && !_owner.CheckBoxes && this[index].Checked) 409_owner.UpdateSavedCheckedItems(this[index], addItem: false); 412_owner.ApplyUpdateCachedItems(); 418if (_owner.IsHandleCreated) 420Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created"); 421if (PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEITEM, (WPARAM)index) == 0) 428Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created"); 429_owner._listViewItems.RemoveAt(index); 432_owner._itemCount--; 433_owner._listItemsTable.Remove(itemID); 435if (_owner.ExpectingMouseUp) 437_owner.ItemCollectionChangedInMouseDown = true; 443if (_owner._itemCount > 0) 454ListViewItem[] items = new ListViewItem[_owner._itemCount];