67 references to _selectedItems
PresentationFramework (67)
src\Framework\System\Windows\Automation\Peers\SelectorAutomationPeer.cs (4)
96
int count = owner.
_selectedItems
.Count;
105
SelectorItemAutomationPeer peer = FindOrCreateItemAutomationPeer(owner.
_selectedItems
[i].Item) as SelectorItemAutomationPeer;
153
int numSelected = owner.
_selectedItems
.Count;
158
SelectorItemAutomationPeer peer = FindOrCreateItemAutomationPeer(owner.
_selectedItems
[0].Item) as SelectorItemAutomationPeer;
src\Framework\System\Windows\Automation\Peers\SelectorItemAutomationPeer.cs (1)
105
return parentSelector.
_selectedItems
.Contains(parentSelector.NewItemInfo(Item));
src\Framework\System\Windows\Controls\DataGrid.cs (4)
4886
int numItemsSelected =
_selectedItems
.Count;
4895
ItemInfo itemInfo =
_selectedItems
[index];
4936
ItemInfo itemInfo =
_selectedItems
[index];
4981
if (minimalModify &&
_selectedItems
.Contains(info))
src\Framework\System\Windows\Controls\ListBox.cs (5)
780
if (
_selectedItems
.Count > 0)
783
AnchorItemInternal =
_selectedItems
[
_selectedItems
.Count - 1];
825
for (int index = 0; index <
_selectedItems
.Count; index++)
827
ItemInfo info =
_selectedItems
[index];
src\Framework\System\Windows\Controls\Primitives\Selector.cs (51)
909
for (int i = 0; i <
_selectedItems
.Count; i++)
911
SelectionChange.Unselect(
_selectedItems
[i]);
971
if (!value && (
_selectedItems
.Count > 1))
1087
foreach (ItemInfo info in
_selectedItems
)
1257
if (!
_selectedItems
.Contains(info))
1282
AdjustItemInfos(e,
_selectedItems
);
1301
if (
_selectedItems
.Contains(info))
1528
Debug.Assert(!((SelectedIndex >= 0) && (
_selectedItems
.Count == 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1535
for (int i = 0; i <
_selectedItems
.Count; i++)
1538
ItemSetIsSelected(
_selectedItems
[i], true);
1551
AdjustItemInfosAfterGeneratorChange(
_selectedItems
, claimUniqueContainer:true);
1591
if (
_selectedItems
.Count == 0)
1598
int index =
_selectedItems
[0].Index;
1634
toAdd.UsesItemHashCodes =
_selectedItems
.UsesItemHashCodes;
1635
toRemove.UsesItemHashCodes =
_selectedItems
.UsesItemHashCodes;
1649
foreach (ItemInfo e in
_selectedItems
)
1742
|| (selectedIndex == -1 &&
_selectedItems
.Count > 0)
1744
&& (
_selectedItems
.Count == 0 || selectedIndex !=
_selectedItems
[0].Index)))
1769
if (
_selectedItems
.Count > 0)
2005
_selectedItems
.UsesItemHashCodes = Items.CollectionView.HasReliableHashCodes();
2016
List<int> knownIndices = new List<int>(
_selectedItems
.Count);
2021
foreach (ItemInfo info in
_selectedItems
)
2051
ItemInfo info =
_selectedItems
.FindMatch(key);
2098
foreach (ItemInfo info in
_selectedItems
)
2181
return (
_selectedItems
.Count == 0) ? null :
_selectedItems
[0].Item;
2187
get { return (
_selectedItems
.Count == 0) ? null :
_selectedItems
[0]; }
2198
if (
_selectedItems
.Count == 0)
2201
int index =
_selectedItems
[0].Index;
2204
index = Items.IndexOf(
_selectedItems
[0].Item);
2205
_selectedItems
[0].Index = index;
2379
_toUnselect = new InternalSelectedItemsStorage(_owner.
_selectedItems
);
2384
if (_owner.
_selectedItems
.Count > 1 && _owner.
_selectedItems
.Count != _toUnselect.Count + 1)
2387
ItemInfo selectedItem = _owner.
_selectedItems
[0];
2390
foreach (ItemInfo info in _owner.
_selectedItems
)
2420
using (_owner.
_selectedItems
.DeferRemove())
2429
if (_owner.
_selectedItems
.Remove(info))
2445
ItemInfo match = _owner.
_selectedItems
.FindMatch(ItemInfo.Key(info));
2449
_owner.
_selectedItems
.Remove(match);
2471
if (!_owner.
_selectedItems
.Contains(info))
2473
_owner.
_selectedItems
.Add(info);
2505
if (_toSelect.Contains(key) && !_owner.
_selectedItems
.Contains(info))
2508
_owner.
_selectedItems
.Add(info);
2578
if (_owner.
_selectedItems
.Contains(info)) return false;
2622
if (!_owner.
_selectedItems
.Contains(key)) return false;
2688
for (int i = _owner.
_selectedItems
.Count - 1; i >= 0; i--)
2690
if (info != _owner.
_selectedItems
[i])
2692
Unselect(_owner.
_selectedItems
[i]);
src\Framework\System\Windows\Controls\SelectedItemCollection.cs (1)
50
foreach (ItemsControl.ItemInfo current in _selector.
_selectedItems
)
src\Framework\System\Windows\Controls\TabControl.cs (1)
513
if (HasItems &&
_selectedItems
.Count == 0)