67 references to _selectedItems
PresentationFramework (67)
System\Windows\Automation\Peers\SelectorAutomationPeer.cs (4)
87int count = owner._selectedItems.Count; 96SelectorItemAutomationPeer peer = FindOrCreateItemAutomationPeer(owner._selectedItems[i].Item) as SelectorItemAutomationPeer; 144int numSelected = owner._selectedItems.Count; 149SelectorItemAutomationPeer peer = FindOrCreateItemAutomationPeer(owner._selectedItems[0].Item) as SelectorItemAutomationPeer;
System\Windows\Automation\Peers\SelectorItemAutomationPeer.cs (1)
95return parentSelector._selectedItems.Contains(parentSelector.NewItemInfo(Item));
System\Windows\Controls\DataGrid.cs (4)
4882int numItemsSelected = _selectedItems.Count; 4891ItemInfo itemInfo = _selectedItems[index]; 4932ItemInfo itemInfo = _selectedItems[index]; 4977if (minimalModify && _selectedItems.Contains(info))
System\Windows\Controls\ListBox.cs (5)
821if (_selectedItems.Count > 0) 824AnchorItemInternal = _selectedItems[_selectedItems.Count - 1]; 865for (int index = 0; index < _selectedItems.Count; index++) 867ItemInfo info = _selectedItems[index];
System\Windows\Controls\Primitives\Selector.cs (51)
888for (int i = 0; i < _selectedItems.Count; i++) 890SelectionChange.Unselect(_selectedItems[i]); 950if (!value && (_selectedItems.Count > 1)) 1066foreach (ItemInfo info in _selectedItems) 1228if (!_selectedItems.Contains(info)) 1253AdjustItemInfos(e, _selectedItems); 1272if (_selectedItems.Contains(info)) 1498Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.Count == 0)), "SelectedIndex >= 0 implies _selectedItems nonempty"); 1505for (int i = 0; i < _selectedItems.Count; i++) 1508ItemSetIsSelected(_selectedItems[i], true); 1520AdjustItemInfosAfterGeneratorChange(_selectedItems, claimUniqueContainer:true); 1560if (_selectedItems.Count == 0) 1567int index = _selectedItems[0].Index; 1603toAdd.UsesItemHashCodes = _selectedItems.UsesItemHashCodes; 1604toRemove.UsesItemHashCodes = _selectedItems.UsesItemHashCodes; 1618foreach (ItemInfo e in _selectedItems) 1711|| (selectedIndex == -1 && _selectedItems.Count > 0) 1713&& (_selectedItems.Count == 0 || selectedIndex != _selectedItems[0].Index))) 1738if (_selectedItems.Count > 0) 1950_selectedItems.UsesItemHashCodes = Items.CollectionView.HasReliableHashCodes(); 1961List<int> knownIndices = new List<int>(_selectedItems.Count); 1966foreach (ItemInfo info in _selectedItems) 1996ItemInfo info = _selectedItems.FindMatch(key); 2043foreach (ItemInfo info in _selectedItems) 2126return (_selectedItems.Count == 0) ? null : _selectedItems[0].Item; 2132get { return (_selectedItems.Count == 0) ? null : _selectedItems[0]; } 2143if (_selectedItems.Count == 0) 2146int index = _selectedItems[0].Index; 2149index = Items.IndexOf(_selectedItems[0].Item); 2150_selectedItems[0].Index = index; 2324_toUnselect = new InternalSelectedItemsStorage(_owner._selectedItems); 2329if (_owner._selectedItems.Count > 1 && _owner._selectedItems.Count != _toUnselect.Count + 1) 2332ItemInfo selectedItem = _owner._selectedItems[0]; 2335foreach (ItemInfo info in _owner._selectedItems) 2365using (_owner._selectedItems.DeferRemove()) 2374if (_owner._selectedItems.Remove(info)) 2390ItemInfo match = _owner._selectedItems.FindMatch(ItemInfo.Key(info)); 2394_owner._selectedItems.Remove(match); 2416if (!_owner._selectedItems.Contains(info)) 2418_owner._selectedItems.Add(info); 2450if (_toSelect.Contains(key) && !_owner._selectedItems.Contains(info)) 2453_owner._selectedItems.Add(info); 2523if (_owner._selectedItems.Contains(info)) return false; 2567if (!_owner._selectedItems.Contains(key)) return false; 2632for (int i = _owner._selectedItems.Count - 1; i >= 0; i--) 2634if (info != _owner._selectedItems[i]) 2636Unselect(_owner._selectedItems[i]);
System\Windows\Controls\SelectedItemCollection.cs (1)
41foreach (ItemsControl.ItemInfo current in _selector._selectedItems)
System\Windows\Controls\TabControl.cs (1)
502if (HasItems && _selectedItems.Count == 0)