277 references to Items
PresentationFramework (221)
src\Framework\MS\Internal\Documents\DocumentGridContextMenu.cs (2)
227this.Items.Add(new Separator()); 255this.Items.Add(menuItem);
src\Framework\System\Windows\Automation\Peers\DataGridAutomationPeer.cs (4)
144return this.OwningDataGrid.Items.Count; 150if (row >= 0 && row < this.OwningDataGrid.Items.Count && 153object item = this.OwningDataGrid.Items[row]; 279foreach (object item in this.OwningDataGrid.Items)
src\Framework\System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (1)
523return this.OwningDataGrid.Items.IndexOf(this.Item);
src\Framework\System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (3)
236IEditableCollectionView iecv = (IEditableCollectionView)this.OwningDataGrid.Items; 315if (this.OwningDataGrid.Items.Contains(item)) 377int rowIndex = dataGrid.Items.IndexOf(Item);
src\Framework\System\Windows\Automation\Peers\GridViewAutomationPeer.cs (5)
45_oldItemsCount = _listview.Items.Count; 106if (_oldItemsCount != _listview.Items.Count) 108peer.RaisePropertyChangedEvent(GridPatternIdentifiers.RowCountProperty, _oldItemsCount, _listview.Items.Count); 110_oldItemsCount = _listview.Items.Count; 194get { return _listview.Items.Count; }
src\Framework\System\Windows\Automation\Peers\GridViewItemAutomationPeer.cs (1)
61int row = listview.Items.IndexOf(item);
src\Framework\System\Windows\Automation\Peers\ItemAutomationPeer.cs (2)
303ItemCollection itemCollection = itemsControl.Items; 318ItemCollection itemCollection = itemsControl.Items;
src\Framework\System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (3)
70ItemCollection items = owner.Items; 237ItemCollection items = owner.Items; 262items = owner.Items;
src\Framework\System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (1)
156ItemCollection items = owner.Items;
src\Framework\System\Windows\Automation\Peers\SelectorAutomationPeer.cs (1)
97int itemsCount = (owner as ItemsControl).Items.Count;
src\Framework\System\Windows\Automation\Peers\StatusBarAutomationPeer.cs (1)
46foreach (object obj in itemscontrol.Items)
src\Framework\System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
73ItemCollection items = owner.Items;
src\Framework\System\Windows\Controls\ComboBox.cs (6)
1118index = Items.IndexOf(info.Item); 1530if (!Items.IsEmpty) 1545int count = Items.Count; 1562SelectItemHelper(0, +1, Items.Count); 1567SelectItemHelper(Items.Count - 1, -1, -1); 1582object item = Items[i];
src\Framework\System\Windows\Controls\DataGrid.cs (53)
94((INotifyCollectionChanged)Items).CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsCollectionChanged); 96((INotifyCollectionChanged)Items.SortDescriptions).CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsSortDescriptionsChanged); 97Items.GroupDescriptions.CollectionChanged += new NotifyCollectionChangedEventHandler(OnItemsGroupDescriptionsChanged); 1807if (rowIndex < (Items.Count - 1)) 2655indexToSelect = Math.Min(Items.Count - numSelected - 1, indexToSelect); 2707object itemToSelect = Items[indexToSelect]; 2736index = Items.Count - 2; 2737if (index >= 0 && ItemsControl.EqualsEx(newItem, Items[index])) 2745if (index < Items.Count && ItemsControl.EqualsEx(newItem, Items[index])) 2755info = ItemInfoFromIndex(Items.IndexOf(newItem)); 3582IEditableCollectionViewAddNewItem ani = (IEditableCollectionViewAddNewItem)Items; 3684newItemIndex = Items.IndexOf(currentAddItem); 3744get { return (IEditableCollectionView)Items; } 3828int itemCount = Items.Count; 3831SetCurrentItem(Items[itemCount - 1]); 3836if (Items.Count > 0) 3838SetCurrentItem(Items[0]); 3847int itemsCount = Items.Count; 4364int numItems = Items.Count; 4397int numItems = Items.Count; 4954IEnumerator enumerator = ((IEnumerable)Items).GetEnumerator(); 5066ItemCollection items = Items; 5129object item = Items[i]; 5661(e.Key == Key.Down && currentRowIndex == Items.Count - 1)) 5793nextRowIndex = Items.Count - 1; 5819nextRowIndex = Math.Max(0, Items.Count - 1); 5824if (nextRowIndex >= Items.Count) 5998int numItems = Items.Count; 6002index = Items.IndexOf(CurrentItem); 6076if ((_columns.Count > 0) && (Items.Count > 0)) 6104ItemInfo info = controlModifier ? ItemInfoFromIndex(homeKey ? 0 : Items.Count - 1) : CurrentInfo; 6149targetIndex = Math.Max(0, Math.Min(targetIndex, Items.Count - 1)); 6431for (int i = (isGrouping ? Items.Count - 1 : itemsHost.Children.Count - 1); i >= 0; i--) 6480for (int i = (isGrouping ? Items.Count - 1 : itemsHost.Children.Count - 1); i >= 0; i--) 7096dataGrid.Items.CanSort == false) 7153if (Items.NeedsRefresh) 7157Items.Refresh(); 7161Items.SortDescriptions.Clear(); 7213using (Items.DeferRefresh()) 7219Items.SortDescriptions.Clear(); 7224for (int i = 0; i < Items.SortDescriptions.Count; i++) 7226if (string.Compare(Items.SortDescriptions[i].PropertyName, sortPropertyName, StringComparison.Ordinal) == 0 && 7239Items.SortDescriptions[descriptorIndex] = sortDescription; 7243Items.SortDescriptions.Add(sortDescription); 7259Items.SortDescriptions.Clear(); 7353Items.SortDescriptions.RemoveAt(GroupingSortDescriptionIndices[i] - i); 7394foreach (GroupDescription groupDescription in Items.GroupDescriptions) 7400Items.SortDescriptions.Insert(insertIndex, sortDescription); 7598Items.SortDescriptions.Clear(); 7806ReadOnlyCollection<ItemPropertyInfo> itemProperties = ((IItemProperties)Items).ItemProperties; 8322object row = Items[i]; 8400rowIndex = Items.IndexOf(args.Item);
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (2)
1086cellsPresenter.IsItemItsOwnContainerInternal(cellsPresenter.Items[columnIndex])) || 1088headersPresenter.IsItemItsOwnContainerInternal(headersPresenter.Items[columnIndex])))
src\Framework\System\Windows\Controls\HeaderedItemsControl.cs (2)
345itemCount = HasItems ? Items.Count : 0; 356itemCount = HasItems ? Items.Count : 0;
src\Framework\System\Windows\Controls\ItemsControl.cs (15)
205ic.Items.SetItemsSource(newValue, (object x)=>beb.GetSourceItem(x) ); 211ic.Items.SetItemsSource(newValue); 216ic.Items.ClearItemsSource(); 246get { return Items.ItemsSource; } 292return this.Items.LogicalChildren; 1273Items.Add(value); 1292Items.Add(text); 1310get { return Items; } 1470HasItems && Items.Contains(container); 2585elementIndex = Items.IndexOf(item); 2609int count = Items.Count; 2621return Items[startIndex]; 3525return (index >= 0) ? NewItemInfo(Items[index], ItemContainerGenerator.ContainerFromIndex(index), index) 3742info.Index = Items.IndexOf(info.Item); 3938int itemsCount = HasItems ? Items.Count : 0;
src\Framework\System\Windows\Controls\ListBox.cs (2)
788AnchorItemInternal = NewItemInfo(Items[0], null, 0); 838IEnumerator enumerator = ((IEnumerable)Items).GetEnumerator();
src\Framework\System\Windows\Controls\Menu.cs (2)
378for (int i = 0; i < Items.Count; i++) 382if (menuItem != null && !(Items[i] is Separator))
src\Framework\System\Windows\Controls\MenuItem.cs (2)
628for (int i = 0; i < menuItem.Items.Count; i++) 2424int count = parent.Items.Count;
src\Framework\System\Windows\Controls\Primitives\DataGridRowHeader.cs (2)
654dataGrid.CanUserResizeRows && dataGrid.Items.Count > 1 && 655!object.ReferenceEquals(parent.Item, dataGrid.Items[0]))
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (1)
704int itemsCount = menu.Items.Count;
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (30)
849verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere", ScrollBar.ScrollHereCommand)); 850verticalContextMenu.Items.Add(new Separator()); 851verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_Top, "Top", ScrollBar.ScrollToTopCommand)); 852verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_Bottom, "Bottom", ScrollBar.ScrollToBottomCommand)); 853verticalContextMenu.Items.Add(new Separator()); 854verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageUp, "PageUp", ScrollBar.PageUpCommand)); 855verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageDown, "PageDown", ScrollBar.PageDownCommand)); 856verticalContextMenu.Items.Add(new Separator()); 857verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollUp, "ScrollUp", ScrollBar.LineUpCommand)); 858verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollDown, "ScrollDown", ScrollBar.LineDownCommand)); 869horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere", ScrollBar.ScrollHereCommand)); 870horizontalContextMenuLeftToRight.Items.Add(new Separator()); 871horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_LeftEdge, "LeftEdge", ScrollBar.ScrollToLeftEndCommand)); 872horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_RightEdge, "RightEdge", ScrollBar.ScrollToRightEndCommand)); 873horizontalContextMenuLeftToRight.Items.Add(new Separator()); 874horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageLeft, "PageLeft", ScrollBar.PageLeftCommand)); 875horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageRight, "PageRight", ScrollBar.PageRightCommand)); 876horizontalContextMenuLeftToRight.Items.Add(new Separator()); 877horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollLeft, "ScrollLeft", ScrollBar.LineLeftCommand)); 878horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollRight, "ScrollRight", ScrollBar.LineRightCommand)); 889horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere", ScrollBar.ScrollHereCommand)); 890horizontalContextMenuRightToLeft.Items.Add(new Separator()); 891horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_LeftEdge, "LeftEdge", ScrollBar.ScrollToRightEndCommand)); 892horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_RightEdge, "RightEdge", ScrollBar.ScrollToLeftEndCommand)); 893horizontalContextMenuRightToLeft.Items.Add(new Separator()); 894horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageLeft, "PageLeft", ScrollBar.PageRightCommand)); 895horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageRight, "PageRight", ScrollBar.PageLeftCommand)); 896horizontalContextMenuRightToLeft.Items.Add(new Separator()); 897horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollLeft, "ScrollLeft", ScrollBar.LineRightCommand)); 898horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollRight, "ScrollRight", ScrollBar.LineLeftCommand));
src\Framework\System\Windows\Controls\Primitives\Selector.cs (29)
55Items.CurrentChanged += new EventHandler(OnCurrentChanged); 305!CollectionViewSource.IsDefaultView(Items.CollectionView); 372if ((value is int) && (int) value >= s.Items.Count) 424if ( (selectedIndex > -1 && selectedIndex < s.Items.Count && s.Items[selectedIndex] == value) 425|| s.Items.Contains(value)) 590BindingExpression bindingExpr = PrepareItemValueBinding(Items.GetRepresentativeItem()); 607index = Items.IndexOf(value); 616return SystemXmlHelper.FindXmlNodeWithInnerText(Items, value, out index); 625foreach (object current in Items) 1064foreach (object current in Items) 1227if (Items.IsEmpty) 1232if (Items.CurrentItem != null && IsSynchronizedWithCurrentItemPrivate == true) 1249for (int i = 0; i < Items.Count; i++) 1563object item = Items.CurrentItem; 1567SelectionChange.SelectJustThisItem(NewItemInfo(item, null, Items.CurrentPosition), true /* assumeInItemsCollection */); 1594Items.MoveCurrentToPosition(-1); 1602Items.MoveCurrentToPosition(index); 1606Items.MoveCurrentTo(InternalSelectedItem); 1741if ((selectedIndex > Items.Count - 1) 2003if (!Items.IsEmpty) 2005_selectedItems.UsesItemHashCodes = Items.CollectionView.HasReliableHashCodes(); 2040for (int i=0; unknownCount > 0 && i<Items.Count; ++i) 2049key.Reset(Items[i]); 2204index = Items.IndexOf(_selectedItems[0].Item); 2408if (_owner.Items.Contains(info.Item)) 2501for (int index = 0; _toSelect.UnresolvedCount > 0 && index < _owner.Items.Count; ++index) 2503ItemInfo info = _owner.NewItemInfo(_owner.Items[index], null, index); 2560if (!_owner.Items.Contains(info.Item))
src\Framework\System\Windows\Controls\TabControl.cs (6)
90ItemCollection tabItemCollection = tc.Items; 403if (startIndex > Items.Count) 443startIndex = Items.Count; 464for (int i = 0; i < Items.Count; i++) 467if (index >= Items.Count) 470index = Items.Count - 1;
src\Framework\System\Windows\Controls\TextSearch.cs (4)
212ItemCollection itemCollection = _attachedTo.Items as ItemCollection; 396ItemCollection itemCollection = itemsControl.Items; 425object item0 = itemsControl.Items[0]; 540string matchedText = GetPrimaryTextFromItem(itemsControl, itemsControl.Items[matchedItemIndex]);
src\Framework\System\Windows\Controls\TreeView.cs (1)
468item = Items[0];
src\Framework\System\Windows\Controls\TreeViewItem.cs (1)
1039for (int i = 0, count = item.Items.Count; i < count; i++)
src\Framework\System\Windows\Controls\VirtualizedCellInfoCollection.cs (12)
159ItemCollection items = _owner.Items; 986int numItems = _owner.Items.Count; 1015int numItems = _owner.Items.Count; 1071int numItems = _owner.Items.Count; 1159int numItems = _owner.Items.Count; 1188int rowIndex = _owner.Items.IndexOf(rows[i]); 1203int numItems = _owner.Items.Count; 1241RemoveRegion(0, columnIndex, _owner.Items.Count, 1, ref removedRegions); 1262int numItems = _owner.Items.Count; 1421int rowIndex = _owner.Items.IndexOf(rows[i]); 1578rowIndex = _owner.Items.IndexOf(cell.Item); 1618(rowIndex < owner.Items.Count) && (columnIndex < owner.Columns.Count))
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (1)
12202"Items:", ic.Items.Count,
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (9)
499this.Items.Add(new Separator()); 524this.Items.Add(menuItem); 535this.Items.Add(menuItem); 543this.Items.Add(menuItem); 612this.Items.Add(menuItem); 625this.Items.Add(menuItem); 650this.Items.Add(menuItem); 656this.Items.Add(menuItem); 668this.Items.Add(menuItem);
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (15)
4284bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ComboBox)target).Items; }; 4319bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ContextMenu)target).Items; }; 4747bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.HeaderedItemsControl)target).Items; }; 4935bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ItemsControl)target).Items; }; 5020bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ListBox)target).Items; }; 5072bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ListView)target).Items; }; 5124bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.Menu)target).Items; }; 5141bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.Primitives.MenuBase)target).Items; }; 5158bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.MenuItem)target).Items; }; 5568bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.Primitives.Selector)target).Items; }; 5653bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.Primitives.StatusBar)target).Items; }; 5738bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.TabControl)target).Items; }; 5910bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ToolBar)target).Items; }; 5996bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.TreeView)target).Items; }; 6013bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.TreeViewItem)target).Items; };
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
2450return (o as System.Windows.Controls.ItemsControl).Items;
System.Activities.Core.Presentation (1)
System\Activities\Core\Presentation\ComboBoxHelper.cs (1)
18foreach (string item in comboBox.Items)
System.Activities.Presentation (55)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Automation\CategoryContainerAutomationPeer.cs (2)
127if (editors == null || editors.Items.Count == 0) 144int childCount = properties.Items.Count;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Automation\SubPropertyEditorAutomationPeer.cs (1)
107int childCount = properties.Items.Count;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (10)
106return this.Items.Count; 220return (CategoryEntry)this.Items[index]; 239this.Items.Insert(index, category); 261this.Items.RemoveAt(index); 432foreach (CategoryBase category in this.Items) 968foreach (CategoryEntry category in this.Items) 993foreach (ModelCategoryEntry category in this.Items) 1015if (string.IsNullOrEmpty(editorTypeName) || this.Items == null) 1020foreach (ModelCategoryEntry currentCategory in this.Items) 1060foreach (CategoryBase categoryBase in this.Items)
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeDesigner.xaml.cs (1)
39var toHide = menu.Items.OfType<MenuItem>().Where(p =>
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (10)
165foreach (SortDescription description in this.dataGrid.Items.SortDescriptions.Reverse()) 169this.dataGrid.Items.SortDescriptions.Remove(description); 177this.dataGrid.Items.SortDescriptions.Add(new SortDescription(e.Column.SortMemberPath, direction)); 181this.dataGrid.Items.SortDescriptions.Add(new SortDescription(this.dataGrid.Columns[0].SortMemberPath, ListSortDirection.Ascending)); 183this.dataGrid.Items.Refresh(); 203ItemCollection items = dataGrid.Items; 234IEditableCollectionView editableItems = (IEditableCollectionView)(this.dataGrid.Items); 1047dataGrid.ScrollIntoView(dataGrid.Items[index]); 1153nextSelectedIndex = dataGrid.Items.IndexOf(toBeDeleted.ElementAt(0)); 1163&& nextSelectedIndex < dataGrid.Items.Count - 1)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (18)
324foreach (MenuItem menuItem in this.ContextMenu.Items.OfType<MenuItem>()) 369foreach (MenuItem subItem in menuItem.Items.OfType<MenuItem>()) 453foreach (var entry in this.ContextMenu.Items.OfType<Control>().Reverse()) 455this.ContextMenu.Items.Remove(entry); 457newMenu.Items.Insert(0, entry); 465var items = this.contextMenuTarget.ContextMenu.Items.OfType<Control>().Reverse(); 466int insertIndex = this.ContextMenu.Items.Count; 470this.contextMenuTarget.ContextMenu.Items.Remove(item); 472this.ContextMenu.Items.Insert(insertIndex, item); 495var items = contextMenuToUnload.Items.OfType<Control>() 502contextMenuToUnload.Items.Remove(item); 505DesignerView.GetMenuItemOrigin(item).ContextMenu.Items.Insert(0, item); 527foreach (var item in menuSource.ContextMenu.Items.OfType<MenuItem>()) 535foreach (var item in menuSource.ContextMenu.Items.OfType<MenuItem>()) 565int index = this.ContextMenu.Items.IndexOf(separator); 567for (int i = index + 1; i < this.ContextMenu.Items.Count && !visible; i++) 569object contextMenuItem = this.ContextMenu.Items[i]; 586separator.Visibility = this.ContextMenu.Items
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (2)
938if (null != breadcrumbItems && breadcrumbItems.Items.Count > 0 && Keyboard.Modifiers == ModifierKeys.None && (e.Key == Key.Left || e.Key == Key.Right)) 943UIElement last = (UIElement)breadcrumbItems.ItemContainerGenerator.ContainerFromIndex(breadcrumbItems.Items.Count - 1);
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (11)
250this.panel.Items.Insert(itemViewIndex, itemView as UIElement); 253this.panel.Items.Insert(itemViewIndex + 1, spacer); 273this.panel.Items.RemoveAt(itemViewIndex); 275this.panel.Items.RemoveAt(itemViewIndex); 378this.panel.Items.Clear(); 389this.panel.Items.Add(header); 393this.panel.Items.Add(startSpacer); 400this.panel.Items.Add(itemView as UIElement); 403this.panel.Items.Add(spacer); 415this.panel.Items.Add(footer); 490return GetSpacerIndex(this.panel.Items.IndexOf(sender));