36 references to Count
PresentationFramework (36)
src\Framework\System\Windows\Automation\Peers\SelectorAutomationPeer.cs (2)
96
int count = owner._selectedItems.
Count
;
153
int numSelected = owner._selectedItems.
Count
;
src\Framework\System\Windows\Controls\DataGrid.cs (1)
4886
int numItemsSelected = _selectedItems.
Count
;
src\Framework\System\Windows\Controls\ListBox.cs (3)
780
if (_selectedItems.
Count
> 0)
783
AnchorItemInternal = _selectedItems[_selectedItems.
Count
- 1];
825
for (int index = 0; index < _selectedItems.
Count
; index++)
src\Framework\System\Windows\Controls\Primitives\Selector.cs (29)
909
for (int i = 0; i < _selectedItems.
Count
; i++)
971
if (!value && (_selectedItems.
Count
> 1))
1528
Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.
Count
== 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1535
for (int i = 0; i < _selectedItems.
Count
; i++)
1591
if (_selectedItems.
Count
== 0)
1666
if (toAdd.
Count
> 0 || toRemove.
Count
> 0)
1715
for (int i=0; i<toAdd.
Count
; ++i)
1721
for (int i=toRemove.
Count
-1; i>=0; --i)
1742
|| (selectedIndex == -1 && _selectedItems.
Count
> 0)
1744
&& (_selectedItems.
Count
== 0 || selectedIndex != _selectedItems[0].Index)))
1769
if (_selectedItems.
Count
> 0)
2016
List<int> knownIndices = new List<int>(_selectedItems.
Count
);
2181
return (_selectedItems.
Count
== 0) ? null : _selectedItems[0].Item;
2187
get { return (_selectedItems.
Count
== 0) ? null : _selectedItems[0]; }
2198
if (_selectedItems.
Count
== 0)
2375
Debug.Assert(_toSelect.
Count
<= 1, "_toSelect.Count was > 1");
2377
if (_toSelect.
Count
== 1) // this is all that should be selected, unselect _selectedItems
2384
if (_owner._selectedItems.
Count
> 1 && _owner._selectedItems.
Count
!= _toUnselect.
Count
+ 1)
2404
for (int i = 0; i < _toDeferSelect.
Count
; i++)
2416
if (_toUnselect.
Count
> 0 || _toSelect.
Count
> 0)
2584
if (!_owner.CanSelectMultiple && _toSelect.
Count
> 0)
2653
if (_toDeferSelect.
Count
> 0)
2662
if (_toSelect.
Count
> 0)
2666
if (_toUnselect.
Count
> 0)
2688
for (int i = _owner._selectedItems.
Count
- 1; i >= 0; i--)
src\Framework\System\Windows\Controls\TabControl.cs (1)
513
if (HasItems && _selectedItems.
Count
== 0)