36 references to Count
PresentationFramework (36)
System\Windows\Automation\Peers\SelectorAutomationPeer.cs (2)
87
int count = owner._selectedItems.
Count
;
144
int numSelected = owner._selectedItems.
Count
;
System\Windows\Controls\DataGrid.cs (1)
4882
int numItemsSelected = _selectedItems.
Count
;
System\Windows\Controls\ListBox.cs (3)
821
if (_selectedItems.
Count
> 0)
824
AnchorItemInternal = _selectedItems[_selectedItems.
Count
- 1];
865
for (int index = 0; index < _selectedItems.
Count
; index++)
System\Windows\Controls\Primitives\Selector.cs (29)
888
for (int i = 0; i < _selectedItems.
Count
; i++)
950
if (!value && (_selectedItems.
Count
> 1))
1498
Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.
Count
== 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1505
for (int i = 0; i < _selectedItems.
Count
; i++)
1560
if (_selectedItems.
Count
== 0)
1635
if (toAdd.
Count
> 0 || toRemove.
Count
> 0)
1684
for (int i=0; i<toAdd.
Count
; ++i)
1690
for (int i=toRemove.
Count
-1; i>=0; --i)
1711
|| (selectedIndex == -1 && _selectedItems.
Count
> 0)
1713
&& (_selectedItems.
Count
== 0 || selectedIndex != _selectedItems[0].Index)))
1738
if (_selectedItems.
Count
> 0)
1961
List<int> knownIndices = new List<int>(_selectedItems.
Count
);
2126
return (_selectedItems.
Count
== 0) ? null : _selectedItems[0].Item;
2132
get { return (_selectedItems.
Count
== 0) ? null : _selectedItems[0]; }
2143
if (_selectedItems.
Count
== 0)
2320
Debug.Assert(_toSelect.
Count
<= 1, "_toSelect.Count was > 1");
2322
if (_toSelect.
Count
== 1) // this is all that should be selected, unselect _selectedItems
2329
if (_owner._selectedItems.
Count
> 1 && _owner._selectedItems.
Count
!= _toUnselect.
Count
+ 1)
2349
for (int i = 0; i < _toDeferSelect.
Count
; i++)
2361
if (_toUnselect.
Count
> 0 || _toSelect.
Count
> 0)
2529
if (!_owner.CanSelectMultiple && _toSelect.
Count
> 0)
2597
if (_toDeferSelect.
Count
> 0)
2606
if (_toSelect.
Count
> 0)
2610
if (_toUnselect.
Count
> 0)
2632
for (int i = _owner._selectedItems.
Count
- 1; i >= 0; i--)
System\Windows\Controls\TabControl.cs (1)
502
if (HasItems && _selectedItems.
Count
== 0)