36 references to Count
PresentationFramework (36)
System\Windows\Automation\Peers\SelectorAutomationPeer.cs (2)
99
int count = owner._selectedItems.
Count
;
156
int numSelected = owner._selectedItems.
Count
;
System\Windows\Controls\DataGrid.cs (1)
4881
int numItemsSelected = _selectedItems.
Count
;
System\Windows\Controls\ListBox.cs (3)
825
if (_selectedItems.
Count
> 0)
828
AnchorItemInternal = _selectedItems[_selectedItems.
Count
- 1];
869
for (int index = 0; index < _selectedItems.
Count
; index++)
System\Windows\Controls\Primitives\Selector.cs (29)
899
for (int i = 0; i < _selectedItems.
Count
; i++)
961
if (!value && (_selectedItems.
Count
> 1))
1509
Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.
Count
== 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1516
for (int i = 0; i < _selectedItems.
Count
; i++)
1571
if (_selectedItems.
Count
== 0)
1646
if (toAdd.
Count
> 0 || toRemove.
Count
> 0)
1695
for (int i=0; i<toAdd.
Count
; ++i)
1701
for (int i=toRemove.
Count
-1; i>=0; --i)
1722
|| (selectedIndex == -1 && _selectedItems.
Count
> 0)
1724
&& (_selectedItems.
Count
== 0 || selectedIndex != _selectedItems[0].Index)))
1749
if (_selectedItems.
Count
> 0)
1971
List<int> knownIndices = new List<int>(_selectedItems.
Count
);
2136
return (_selectedItems.
Count
== 0) ? null : _selectedItems[0].Item;
2142
get { return (_selectedItems.
Count
== 0) ? null : _selectedItems[0]; }
2153
if (_selectedItems.
Count
== 0)
2330
Debug.Assert(_toSelect.
Count
<= 1, "_toSelect.Count was > 1");
2332
if (_toSelect.
Count
== 1) // this is all that should be selected, unselect _selectedItems
2339
if (_owner._selectedItems.
Count
> 1 && _owner._selectedItems.
Count
!= _toUnselect.
Count
+ 1)
2359
for (int i = 0; i < _toDeferSelect.
Count
; i++)
2371
if (_toUnselect.
Count
> 0 || _toSelect.
Count
> 0)
2539
if (!_owner.CanSelectMultiple && _toSelect.
Count
> 0)
2607
if (_toDeferSelect.
Count
> 0)
2616
if (_toSelect.
Count
> 0)
2620
if (_toUnselect.
Count
> 0)
2642
for (int i = _owner._selectedItems.
Count
- 1; i >= 0; i--)
System\Windows\Controls\TabControl.cs (1)
512
if (HasItems && _selectedItems.
Count
== 0)