349 references to Items
Microsoft.VisualStudio.LanguageServices (13)
ChangeSignature\ChangeSignatureDialog.xaml.cs (8)
107Members.Items.Refresh(); 130Members.Items.Refresh(); 140Members.Items.Refresh(); 151Members.Items.Refresh(); 235var potentialNewSelectedParameter = Members.Items[oldSelectedIndex - 1] as ChangeSignatureDialogViewModel.ParameterViewModel; 248if (oldSelectedIndex >= 0 && oldSelectedIndex < Members.Items.Count - 1) 264Members.SelectedIndex = Members.Items.IndexOf(Members.CurrentItem); 286Members.Items.Refresh();
PickMembers\PickMembersDialog.xaml.cs (3)
66Members.Items.Refresh(); 87Members.Items.Refresh(); 100Members.Items.Refresh();
ValueTracking\ValueTrackingTree.xaml.cs (2)
100return (TreeViewItemBase)ValueTrackingTreeView.Items[0]; 117return (TreeViewItemBase)ValueTrackingTreeView.Items[^1];
PresentationFramework (222)
MS\Internal\Documents\DocumentGridContextMenu.cs (2)
189this.Items.Add(new Separator()); 217this.Items.Add(menuItem);
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (4)
140return this.OwningDataGrid.Items.Count; 146if (row >= 0 && row < this.OwningDataGrid.Items.Count && 149object item = this.OwningDataGrid.Items[row]; 275foreach (object item in this.OwningDataGrid.Items)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (1)
543return this.OwningDataGrid.Items.IndexOf(this.Item);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (3)
228IEditableCollectionView iecv = (IEditableCollectionView)this.OwningDataGrid.Items; 307if (this.OwningDataGrid.Items.Contains(item)) 369int rowIndex = dataGrid.Items.IndexOf(Item);
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (5)
37_oldItemsCount = _listview.Items.Count; 98if (_oldItemsCount != _listview.Items.Count) 100peer.RaisePropertyChangedEvent(GridPatternIdentifiers.RowCountProperty, _oldItemsCount, _listview.Items.Count); 102_oldItemsCount = _listview.Items.Count; 186get { return _listview.Items.Count; }
System\Windows\Automation\Peers\ItemAutomationPeer.cs (2)
330ItemCollection itemCollection = itemsControl.Items; 345ItemCollection itemCollection = itemsControl.Items;
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (3)
61ItemCollection items = owner.Items; 228ItemCollection items = owner.Items; 253items = owner.Items;
System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (3)
92foreach (var item in parent.Items) 124foreach (var item in parent.Items) 168ItemCollection items = owner.Items;
System\Windows\Automation\Peers\SelectorAutomationPeer.cs (1)
88int itemsCount = (owner as ItemsControl).Items.Count;
System\Windows\Automation\Peers\StatusBarAutomationPeer.cs (1)
39foreach (object obj in itemscontrol.Items)
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
63ItemCollection items = owner.Items;
System\Windows\Controls\ComboBox.cs (6)
1110index = Items.IndexOf(info.Item); 1524if (!Items.IsEmpty) 1539int count = Items.Count; 1556SelectItemHelper(0, +1, Items.Count); 1561SelectItemHelper(Items.Count - 1, -1, -1); 1576object item = Items[i];
System\Windows\Controls\DataGrid.cs (53)
90((INotifyCollectionChanged)Items).CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsCollectionChanged); 92((INotifyCollectionChanged)Items.SortDescriptions).CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsSortDescriptionsChanged); 93Items.GroupDescriptions.CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsGroupDescriptionsChanged); 1802if (rowIndex < (Items.Count - 1)) 2651indexToSelect = Math.Min(Items.Count - numSelected - 1, indexToSelect); 2703object itemToSelect = Items[indexToSelect]; 2732index = Items.Count - 2; 2733if (index >= 0 && ItemsControl.EqualsEx(newItem, Items[index])) 2741if (index < Items.Count && ItemsControl.EqualsEx(newItem, Items[index])) 2751info = ItemInfoFromIndex(Items.IndexOf(newItem)); 3578IEditableCollectionViewAddNewItem ani = (IEditableCollectionViewAddNewItem)Items; 3680newItemIndex = Items.IndexOf(currentAddItem); 3740get { return (IEditableCollectionView)Items; } 3824int itemCount = Items.Count; 3827SetCurrentItem(Items[itemCount - 1]); 3832if (Items.Count > 0) 3834SetCurrentItem(Items[0]); 3843int itemsCount = Items.Count; 4360int numItems = Items.Count; 4393int numItems = Items.Count; 4950IEnumerator enumerator = ((IEnumerable)Items).GetEnumerator(); 5062ItemCollection items = Items; 5125object item = Items[i]; 5657(e.Key == Key.Down && currentRowIndex == Items.Count - 1)) 5789nextRowIndex = Items.Count - 1; 5815nextRowIndex = Math.Max(0, Items.Count - 1); 5820if (nextRowIndex >= Items.Count) 5994int numItems = Items.Count; 5998index = Items.IndexOf(CurrentItem); 6072if ((_columns.Count > 0) && (Items.Count > 0)) 6100ItemInfo info = controlModifier ? ItemInfoFromIndex(homeKey ? 0 : Items.Count - 1) : CurrentInfo; 6145targetIndex = Math.Max(0, Math.Min(targetIndex, Items.Count - 1)); 6427for (int i = (isGrouping ? Items.Count - 1 : itemsHost.Children.Count - 1); i >= 0; i--) 6476for (int i = (isGrouping ? Items.Count - 1 : itemsHost.Children.Count - 1); i >= 0; i--) 7098dataGrid.Items.CanSort == false) 7155if (Items.NeedsRefresh) 7159Items.Refresh(); 7163Items.SortDescriptions.Clear(); 7215using (Items.DeferRefresh()) 7221Items.SortDescriptions.Clear(); 7226for (int i = 0; i < Items.SortDescriptions.Count; i++) 7228if (string.Equals(Items.SortDescriptions[i].PropertyName, sortPropertyName, StringComparison.Ordinal) && 7241Items.SortDescriptions[descriptorIndex] = sortDescription; 7245Items.SortDescriptions.Add(sortDescription); 7261Items.SortDescriptions.Clear(); 7355Items.SortDescriptions.RemoveAt(GroupingSortDescriptionIndices[i] - i); 7396foreach (GroupDescription groupDescription in Items.GroupDescriptions) 7402Items.SortDescriptions.Insert(insertIndex, sortDescription); 7600Items.SortDescriptions.Clear(); 7808ReadOnlyCollection<ItemPropertyInfo> itemProperties = ((IItemProperties)Items).ItemProperties; 8316object row = Items[i]; 8378rowIndex = Items.IndexOf(args.Item);
System\Windows\Controls\DataGridCellsPanel.cs (2)
1080cellsPresenter.IsItemItsOwnContainerInternal(cellsPresenter.Items[columnIndex])) || 1082headersPresenter.IsItemItsOwnContainerInternal(headersPresenter.Items[columnIndex])))
System\Windows\Controls\HeaderedItemsControl.cs (2)
344itemCount = HasItems ? Items.Count : 0; 355itemCount = HasItems ? Items.Count : 0;
System\Windows\Controls\ItemsControl.cs (15)
195ic.Items.SetItemsSource(newValue, (object x)=>beb.GetSourceItem(x) ); 200ic.Items.SetItemsSource(newValue); 205ic.Items.ClearItemsSource(); 235get { return Items.ItemsSource; } 281return this.Items.LogicalChildren; 1260Items.Add(value); 1279Items.Add(text); 1297get { return Items; } 1458HasItems && Items.Contains(container); 2573elementIndex = Items.IndexOf(item); 2597int count = Items.Count; 2609return Items[startIndex]; 3585return (index >= 0) ? NewItemInfo(Items[index], ItemContainerGenerator.ContainerFromIndex(index), index) 3801info.Index = Items.IndexOf(info.Item); 3997int itemsCount = HasItems ? Items.Count : 0;
System\Windows\Controls\ListBox.cs (2)
829AnchorItemInternal = NewItemInfo(Items[0], null, 0); 878IEnumerator enumerator = ((IEnumerable)Items).GetEnumerator();
System\Windows\Controls\Menu.cs (2)
342for (int i = 0; i < Items.Count; i++) 346if (menuItem != null && !(Items[i] is Separator))
System\Windows\Controls\MenuItem.cs (2)
623for (int i = 0; i < menuItem.Items.Count; i++) 2356int count = parent.Items.Count;
System\Windows\Controls\Primitives\DataGridRowHeader.cs (2)
648dataGrid.CanUserResizeRows && dataGrid.Items.Count > 1 && 649!object.ReferenceEquals(parent.Item, dataGrid.Items[0]))
System\Windows\Controls\Primitives\MenuBase.cs (1)
684int itemsCount = menu.Items.Count;
System\Windows\Controls\Primitives\ScrollBar.cs (30)
830verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 831verticalContextMenu.Items.Add(new Separator()); 832verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Top), "Top", ScrollBar.ScrollToTopCommand)); 833verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Bottom), "Bottom", ScrollBar.ScrollToBottomCommand)); 834verticalContextMenu.Items.Add(new Separator()); 835verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageUp), "PageUp", ScrollBar.PageUpCommand)); 836verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageDown), "PageDown", ScrollBar.PageDownCommand)); 837verticalContextMenu.Items.Add(new Separator()); 838verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollUp), "ScrollUp", ScrollBar.LineUpCommand)); 839verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollDown), "ScrollDown", ScrollBar.LineDownCommand)); 850horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 851horizontalContextMenuLeftToRight.Items.Add(new Separator()); 852horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToLeftEndCommand)); 853horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToRightEndCommand)); 854horizontalContextMenuLeftToRight.Items.Add(new Separator()); 855horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageLeftCommand)); 856horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageRightCommand)); 857horizontalContextMenuLeftToRight.Items.Add(new Separator()); 858horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineLeftCommand)); 859horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineRightCommand)); 870horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 871horizontalContextMenuRightToLeft.Items.Add(new Separator()); 872horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToRightEndCommand)); 873horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToLeftEndCommand)); 874horizontalContextMenuRightToLeft.Items.Add(new Separator()); 875horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageRightCommand)); 876horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageLeftCommand)); 877horizontalContextMenuRightToLeft.Items.Add(new Separator()); 878horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineRightCommand)); 879horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineLeftCommand));
System\Windows\Controls\Primitives\Selector.cs (29)
42Items.CurrentChanged += new EventHandler(OnCurrentChanged); 283!CollectionViewSource.IsDefaultView(Items.CollectionView); 350if ((value is int) && (int) value >= s.Items.Count) 402if ( (selectedIndex > -1 && selectedIndex < s.Items.Count && s.Items[selectedIndex] == value) 403|| s.Items.Contains(value)) 568BindingExpression bindingExpr = PrepareItemValueBinding(Items.GetRepresentativeItem()); 585index = Items.IndexOf(value); 594return SystemXmlHelper.FindXmlNodeWithInnerText(Items, value, out index); 603foreach (object current in Items) 1043foreach (object current in Items) 1198if (Items.IsEmpty) 1203if (Items.CurrentItem != null && IsSynchronizedWithCurrentItemPrivate == true) 1220for (int i = 0; i < Items.Count; i++) 1532object item = Items.CurrentItem; 1536SelectionChange.SelectJustThisItem(NewItemInfo(item, null, Items.CurrentPosition), true /* assumeInItemsCollection */); 1563Items.MoveCurrentToPosition(-1); 1571Items.MoveCurrentToPosition(index); 1575Items.MoveCurrentTo(InternalSelectedItem); 1710if ((selectedIndex > Items.Count - 1) 1948if (!Items.IsEmpty) 1950_selectedItems.UsesItemHashCodes = Items.CollectionView.HasReliableHashCodes(); 1985for (int i=0; unknownCount > 0 && i<Items.Count; ++i) 1994key.Reset(Items[i]); 2149index = Items.IndexOf(_selectedItems[0].Item); 2353if (_owner.Items.Contains(info.Item)) 2446for (int index = 0; _toSelect.UnresolvedCount > 0 && index < _owner.Items.Count; ++index) 2448ItemInfo info = _owner.NewItemInfo(_owner.Items[index], null, index); 2505if (!_owner.Items.Contains(info.Item))
System\Windows\Controls\TabControl.cs (6)
79ItemCollection tabItemCollection = tc.Items; 392if (startIndex > Items.Count) 432startIndex = Items.Count; 453for (int i = 0; i < Items.Count; i++) 456if (index >= Items.Count) 459index = Items.Count - 1;
System\Windows\Controls\TextSearch.cs (4)
186ItemCollection itemCollection = _attachedTo.Items as ItemCollection; 371ItemCollection itemCollection = itemsControl.Items; 400object item0 = itemsControl.Items[0]; 515string matchedText = GetPrimaryTextFromItem(itemsControl, itemsControl.Items[matchedItemIndex]);
System\Windows\Controls\TreeView.cs (1)
464item = Items[0];
System\Windows\Controls\TreeViewItem.cs (1)
1035for (int i = 0, count = item.Items.Count; i < count; i++)
System\Windows\Controls\VirtualizedCellInfoCollection.cs (12)
154ItemCollection items = _owner.Items; 979int numItems = _owner.Items.Count; 1008int numItems = _owner.Items.Count; 1064int numItems = _owner.Items.Count; 1152int numItems = _owner.Items.Count; 1181int rowIndex = _owner.Items.IndexOf(rows[i]); 1196int numItems = _owner.Items.Count; 1234RemoveRegion(0, columnIndex, _owner.Items.Count, 1, ref removedRegions); 1255int numItems = _owner.Items.Count; 1414int rowIndex = _owner.Items.IndexOf(rows[i]); 1571rowIndex = _owner.Items.IndexOf(cell.Item); 1611(rowIndex < owner.Items.Count) && (columnIndex < owner.Columns.Count))
System\Windows\Controls\VirtualizingStackPanel.cs (1)
12357"Items:", ic.Items.Count,
System\windows\Documents\TextEditorContextMenu.cs (9)
471this.Items.Add(new Separator()); 498this.Items.Add(menuItem); 511this.Items.Add(menuItem); 521this.Items.Add(menuItem); 586this.Items.Add(menuItem); 601this.Items.Add(menuItem); 620this.Items.Add(menuItem); 628this.Items.Add(menuItem); 636this.Items.Add(menuItem);
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (15)
4546GetDelegate = delegate (object target) { return ((System.Windows.Controls.ComboBox)target).Items; }, 4585GetDelegate = delegate (object target) { return ((System.Windows.Controls.ContextMenu)target).Items; }, 5059GetDelegate = delegate (object target) { return ((System.Windows.Controls.HeaderedItemsControl)target).Items; }, 5269GetDelegate = delegate (object target) { return ((System.Windows.Controls.ItemsControl)target).Items; }, 5362GetDelegate = delegate (object target) { return ((System.Windows.Controls.ListBox)target).Items; }, 5420GetDelegate = delegate (object target) { return ((System.Windows.Controls.ListView)target).Items; }, 5478GetDelegate = delegate (object target) { return ((System.Windows.Controls.Menu)target).Items; }, 5497GetDelegate = delegate (object target) { return ((System.Windows.Controls.Primitives.MenuBase)target).Items; }, 5516GetDelegate = delegate (object target) { return ((System.Windows.Controls.MenuItem)target).Items; }, 5989GetDelegate = delegate (object target) { return ((System.Windows.Controls.Primitives.Selector)target).Items; }, 6084GetDelegate = delegate (object target) { return ((System.Windows.Controls.Primitives.StatusBar)target).Items; }, 6177GetDelegate = delegate (object target) { return ((System.Windows.Controls.TabControl)target).Items; }, 6369GetDelegate = delegate (object target) { return ((System.Windows.Controls.ToolBar)target).Items; }, 6465GetDelegate = delegate (object target) { return ((System.Windows.Controls.TreeView)target).Items; }, 6484GetDelegate = delegate (object target) { return ((System.Windows.Controls.TreeViewItem)target).Items; },
System\Windows\Markup\KnownTypes.cs (1)
2451return (o as System.Windows.Controls.ItemsControl).Items;
PresentationUI (4)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (4)
1097DigitalSignaturesMenuItem.Items.Add(menuItem); 1104DigitalSignaturesMenuItem.Items.Add(menuItem); 1111DigitalSignaturesMenuItem.Items.Add(menuItem); 1845ZoomComboBox.Items.Add(newItem);
Roslyn.VisualStudio.DiagnosticsWindow (5)
DiagnosticsWindow.cs (3)
62tabControl.Items.Add(perfMarginPanel); 63tabControl.Items.Add(telemetryPanel); 64tabControl.Items.Add(workspacePanel);
PerfMargin\PerfMarginPanel.cs (2)
110listView.Items.Add(s); 132foreach (StackPanel item in _detailsListView.Items)
System.Windows.Controls.Ribbon (105)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (1)
721int groupHeaderCount = groupHeaderItemsControl.Items.Count;
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (9)
1501int itemCount = ribbon.Items.Count; 1538if (SelectedIndex < 0 && Items.Count > 0) 1562int itemCount = Items.Count; 1674int itemCount = Items.Count; 1991tab.Items.Count, 2042quickAccessToolBar.Items.Count, 2481ribbon.QuickAccessToolBar.Items.Add(e.CloneInstance); 2575if (qat.Items.Contains(originalSource)) 2577qat.Items.Remove(originalSource);
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (3)
1053handled = RibbonHelper.NavigateToPreviousMenuItemOrGallery(this, Items.Count, BringIndexIntoView); 1074handled = RibbonHelper.NavigateToPreviousMenuItemOrGallery(this, Items.Count, BringIndexIntoView); 1347foreach(object item in Items)
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (14)
281_defaultRibbonClientAreaContextMenu.Items.Add(GenerateQATPlacementMenuItem(_defaultRibbonClientAreaContextMenu)); 282_defaultRibbonClientAreaContextMenu.Items.Add(new RibbonSeparator()); 283_defaultRibbonClientAreaContextMenu.Items.Add(GenerateMinimizeTheRibbonItem(_defaultRibbonClientAreaContextMenu)); 294_ribbonControlContextMenu.Items.Add(GenerateAddToOrRemoveFromQATItem(false, _ribbonControlContextMenu)); 295_ribbonControlContextMenu.Items.Add(new RibbonSeparator()); 296_ribbonControlContextMenu.Items.Add(GenerateQATPlacementMenuItem(_ribbonControlContextMenu)); 297_ribbonControlContextMenu.Items.Add(new RibbonSeparator()); 298_ribbonControlContextMenu.Items.Add(GenerateMinimizeTheRibbonItem(_ribbonControlContextMenu)); 309_qatControlContextMenu.Items.Add(GenerateAddToOrRemoveFromQATItem(true, _qatControlContextMenu)); 310_qatControlContextMenu.Items.Add(new RibbonSeparator()); 311_qatControlContextMenu.Items.Add(GenerateQATPlacementMenuItem(_qatControlContextMenu)); 312_qatControlContextMenu.Items.Add(new RibbonSeparator()); 313_qatControlContextMenu.Items.Add(GenerateMinimizeTheRibbonItem(_qatControlContextMenu)); 327_galleryContextMenu.Items.Add(addGalleryToQATItem);
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroup.cs (2)
458for (int i = 0; i < Ribbon.Items.Count; i++) 521int itemCount = ribbon.Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroupItemsControl.cs (2)
99return RibbonHelper.FindContainer(this, Items.Count - 1, -1, null, HasTabs) as RibbonContextualTabGroup; 256int count = this.Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonControlGroup.cs (2)
85for (int i = 0; i < Items.Count; i++) 102int itemCount = controlGroup.Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (25)
593if (Items != null) 595for (int i = 0; i < Items.Count; i++) 976for (int i = 0; i < Items.Count; i++ ) 1083CollectionView = Items; 1169if (category != null && category.Items.Count > 0) 1172SetCurrentValue(SelectedItemProperty, category.Items[0]); 1394foreach (object current in Items) 1399index = category.Items.IndexOf(item); 1434foreach (object current in Items) 1439for (int index=0; index<category.Items.Count; index++) 1441item = category.Items[index]; 2158for (int index = 0; index < category.Items.Count; index++) 2166if (VerifyEqual(selectedItem, category.Items[index])) 2175SetCurrentValue(SelectedItemProperty, category.Items[index]); 2223for (int index = 0; index < category.Items.Count; index++) 2228object dataItem = category.Items[index]; 2322for (int i = 0; i < this.Items.Count; i++) 2329if (this.Items[i] is RibbonGalleryCategory) 2331category = (RibbonGalleryCategory)this.Items[i]; 2337filterToAdd = this.Items[i]; 2359for (int i = 0; i < gallery.Items.Count; i++) 2366if (gallery.Items[i] is RibbonGalleryCategory) 2368category = (RibbonGalleryCategory)gallery.Items[i]; 2374dataToCompareAgainst = gallery.Items[i]; 2534for (int index = 0; index < gallery.Items.Count; index++)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (1)
454CollectionView = Items;
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (8)
502if (Items.Count > 3) 532else if (Items.Count == 3) 552else if (Items.Count == 2) 841if (Items.Count == 0) 858for (int i = 0; i < Items.Count; i++) 1216int itemCount = Items.Count; 1575foreach (object item in RibbonGroup.Items) 1589foreach (object controlGroupItem in controlGroup.Items)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (22)
555FrameworkElement lastItem = FindContainer(itemsControl, itemsControl.Items.Count - 1, -1, bringIntoViewCallback, additionalCheck); 568int count = itemsControl.Items.Count; 592if (itemIndex < parent.Items.Count) 606if (startIndex == parent.Items.Count - 1) 609if (startIndex < parent.Items.Count - 1) 636startIndex = parent.Items.Count; 662RibbonGalleryCategory lastCategory = RibbonHelper.FindContainer(gallery, gallery.Items.Count - 1, -1, null, IsContainerVisible) as RibbonGalleryCategory; 774category = gallery.Items.Count > 0 ? gallery.ItemContainerGenerator.ContainerFromIndex(0) as RibbonGalleryCategory : null; 775galleryItem = category != null && category.Items.Count > 0 ? category.ItemContainerGenerator.ContainerFromIndex(0) as RibbonGalleryItem : null; 792endCatIndex = gallery.Items.Count; 813startItemIndex = galleryItem != null ? category.ItemContainerGenerator.IndexFromContainer(galleryItem) : category.Items.Count - 1; 836startColumnIndex = (galleryItem != null ? startItemIndex : category.Items.Count - 1) % columnCount; 843endItemIndex = category.Items.Count; 865int remainingItems = category.Items.Count; 905int remainingItems = category.Items.Count - itemIndex; 1933else if (menuItem.Items.Count == 0) 1944if (menuItem.Items.Count == 0) 1984wrapperButton.Items.Add(clone); 2250for (int i = 0; i < originalItemsControl.Items.Count; i++) 2252object clonedItem = CreateClone(originalItemsControl.Items[i]); 2253cloneItemsControl.Items.Add(clonedItem); 2498int parentItemCount = parentItemsControl.Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
859handled = RibbonHelper.NavigateToPreviousMenuItemOrGallery(this, Items.Count, BringIndexIntoView);
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (2)
521foreach (object o in this.Items) 580int itemCount = QuickAccessToolBar.Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (5)
361_groupAutoResizeIndex = Items.Count - 1; 552_groupAutoResizeIndex = Items.Count - 1; 578_groupAutoResizeIndex = Items.Count - 1; 585if (numAttempts == Items.Count) 785int itemCount = Items.Count;
Microsoft\Windows\Controls\Ribbon\RibbonTabHeaderItemsControl.cs (1)
133ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Items.Count);
Microsoft\Windows\Controls\TextSearchInternal.cs (7)
138int itemCount = _attachedTo.Items.Count; 155ItemCollection itemCollection = childItemsControl.Items as ItemCollection; 243ItemCollection itemCollection = _attachedTo.Items as ItemCollection; 374ItemCollection itemCollection = itemsControl.Items; 500foreach (object item in itemsControl.Items) 510return childItemsControl.Items[matchedIndex]; 520return itemsControl.Items[matchedIndex];