78 references to ContainerFromIndex
Microsoft.VisualStudio.LanguageServices (4)
ChangeSignature\ChangeSignatureDialog.xaml.cs (2)
206if (Members.ItemContainerGenerator.ContainerFromIndex(Members.SelectedIndex) is not DataGridRow row) 209row = Members.ItemContainerGenerator.ContainerFromIndex(Members.SelectedIndex) as DataGridRow;
PickMembers\PickMembersDialog.xaml.cs (2)
110if (Members.ItemContainerGenerator.ContainerFromIndex(Members.SelectedIndex) is not ListViewItem row) 113row = Members.ItemContainerGenerator.ContainerFromIndex(Members.SelectedIndex) as ListViewItem;
PresentationFramework (32)
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (2)
211ListViewItem lvi = _listview.ItemContainerGenerator.ContainerFromIndex(row) as ListViewItem; 221lvi = _listview.ItemContainerGenerator.ContainerFromIndex(row) as ListViewItem;
System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (1)
188UIElement uiElement = owner.ItemContainerGenerator.ContainerFromIndex(i) as UIElement;
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
86TreeViewItem treeViewItem = owner.ItemContainerGenerator.ContainerFromIndex(i) as TreeViewItem;
System\Windows\Controls\ComboBox.cs (1)
1581DependencyObject container = ItemContainerGenerator.ContainerFromIndex(i);
System\Windows\Controls\DataGrid.cs (4)
457return (DataGridColumnHeader)ColumnHeadersPresenter.ItemContainerGenerator.ContainerFromIndex(columnIndex); 1813DataGridRow row = (DataGridRow)ItemContainerGenerator.ContainerFromIndex(info.Index); 6433row = ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow; 6482row = ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
System\Windows\Controls\DataGridCellsPanel.cs (1)
970UIElement child = generator.ContainerFromIndex(columnIndex) as UIElement;
System\Windows\Controls\DataGridRow.cs (1)
1362return cellsPresenter.ItemContainerGenerator.ContainerFromIndex(index) as DataGridCell;
System\Windows\Controls\ItemContainerGenerator.cs (1)
932container = groupItem.Generator.ContainerFromIndex(subIndex);
System\Windows\Controls\ItemsControl.cs (7)
2609FrameworkElement container = ItemContainerGenerator.ContainerFromIndex(startIndex) as FrameworkElement; 2677container = ItemContainerGenerator.ContainerFromIndex(index) as FrameworkElement; 2687container = ItemContainerGenerator.ContainerFromIndex(index) as FrameworkElement; 3594return (index >= 0) ? NewItemInfo(Items[index], ItemContainerGenerator.ContainerFromIndex(index), index) 3612container = ItemContainerGenerator.ContainerFromIndex(info.Index); 3684container = ItemContainerGenerator.ContainerFromIndex(index); 3946Container = generator.ContainerFromIndex(Index);
System\Windows\Controls\ListBox.cs (1)
953return ItemContainerGenerator.ContainerFromIndex(index) as ListBoxItem;
System\Windows\Controls\Menu.cs (1)
354MenuItem menuItem = ItemContainerGenerator.ContainerFromIndex(i) as MenuItem;
System\Windows\Controls\MenuItem.cs (1)
635MenuItem subItem = menuItem.ItemContainerGenerator.ContainerFromIndex(i) as MenuItem;
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (2)
166cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i); 184cell = (DataGridCell)ItemContainerGenerator.ContainerFromIndex(i);
System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
697return (DataGridRow)dataGrid.ItemContainerGenerator.ContainerFromIndex(index - 1);
System\Windows\Controls\Primitives\MenuBase.cs (1)
697MenuItem mi = menu.ItemContainerGenerator.ContainerFromIndex(i) as MenuItem;
System\Windows\Controls\TabControl.cs (3)
92TabItem ti = tc.ItemContainerGenerator.ContainerFromIndex(i) as TabItem; 471TabItem tabItem = ItemContainerGenerator.ContainerFromIndex(index) as TabItem; 531tabItem = ItemContainerGenerator.ContainerFromIndex(SelectedIndex) as TabItem;
System\Windows\Controls\TreeView.cs (1)
468container = ItemContainerGenerator.ContainerFromIndex(0) as TreeViewItem;
System\Windows\Controls\TreeViewItem.cs (2)
1047subitem = (TreeViewItem)item.ItemContainerGenerator.ContainerFromIndex(i); 1051subitem = (TreeViewItem)item.ItemContainerGenerator.ContainerFromIndex(i);
System.Windows.Controls.Ribbon (42)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (1)
727RibbonContextualTabGroup groupHeader = groupHeaderItemsControl.ItemContainerGenerator.ContainerFromIndex(i) as RibbonContextualTabGroup;
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (7)
1507RibbonTab ribbonTab = ribbon.ItemContainerGenerator.ContainerFromIndex(i) as RibbonTab; 1568RibbonTab tab = ItemContainerGenerator.ContainerFromIndex(i) as RibbonTab; 1678RibbonTab tab = ItemContainerGenerator.ContainerFromIndex(i) as RibbonTab; 1907selectedTab = ItemContainerGenerator.ContainerFromIndex(selectedIndex) as RibbonTab; 1953return (tabHeaderItemsControl.ItemContainerGenerator.ContainerFromIndex(selectedIndex) as RibbonTabHeader); 2011RibbonGroup group = tab.ItemContainerGenerator.ContainerFromIndex(index) as RibbonGroup; 2055RibbonControl ribbonControl = quickAccessToolBar.ItemContainerGenerator.ContainerFromIndex(index) as RibbonControl;
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroup.cs (2)
462RibbonTab tab = Ribbon.ItemContainerGenerator.ContainerFromIndex(i) as RibbonTab; 526RibbonTab tab = ribbon.ItemContainerGenerator.ContainerFromIndex(i) as RibbonTab;
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroupItemsControl.cs (1)
261RibbonContextualTabGroup tabGroup = this.ItemContainerGenerator.ContainerFromIndex(i) as RibbonContextualTabGroup;
Microsoft\Windows\Controls\Ribbon\RibbonControlGroup.cs (2)
90DependencyObject child = ItemContainerGenerator.ContainerFromIndex(i); 112RibbonControl ribbonControl = controlGroup.ItemContainerGenerator.ContainerFromIndex(i) as RibbonControl;
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (9)
597RibbonGalleryCategory category = (RibbonGalleryCategory)ItemContainerGenerator.ContainerFromIndex(i); 978RibbonGalleryCategory category = ItemContainerGenerator.ContainerFromIndex(i) as RibbonGalleryCategory; 1402galleryItem = category.ItemContainerGenerator.ContainerFromIndex(index) as RibbonGalleryItem; 1445galleryItem = category.ItemContainerGenerator.ContainerFromIndex(index) as RibbonGalleryItem; 2158RibbonGalleryItem galleryItem = category.ItemContainerGenerator.ContainerFromIndex(index) as RibbonGalleryItem; 2223RibbonGalleryItem galleryItem = category.ItemContainerGenerator.ContainerFromIndex(index) as RibbonGalleryItem; 2334category = (RibbonGalleryCategory)this.ItemContainerGenerator.ContainerFromIndex(i); 2371category = (RibbonGalleryCategory)gallery.ItemContainerGenerator.ContainerFromIndex(i); 2534RibbonGalleryCategory category = (RibbonGalleryCategory)gallery.ItemContainerGenerator.ContainerFromIndex(index);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (2)
863RibbonControl ribbonControl = ItemContainerGenerator.ContainerFromIndex(i) as RibbonControl; 1222DependencyObject d = ItemContainerGenerator.ContainerFromIndex(i);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (9)
572FrameworkElement container = itemsControl.ItemContainerGenerator.ContainerFromIndex(startIndex) as FrameworkElement; 578container = itemsControl.ItemContainerGenerator.ContainerFromIndex(startIndex) as FrameworkElement; 775category = gallery.Items.Count > 0 ? gallery.ItemContainerGenerator.ContainerFromIndex(0) as RibbonGalleryCategory : null; 776galleryItem = category != null && category.Items.Count > 0 ? category.ItemContainerGenerator.ContainerFromIndex(0) as RibbonGalleryItem : null; 799category = gallery.ItemContainerGenerator.ContainerFromIndex(catIndex) as RibbonGalleryCategory; 823highlightedGalleryItem = category.ItemContainerGenerator.ContainerFromIndex(startItemIndex) as RibbonGalleryItem; 852highlightedGalleryItem = category.ItemContainerGenerator.ContainerFromIndex(startItemIndex) as RibbonGalleryItem; 890highlightedGalleryItem = category.ItemContainerGenerator.ContainerFromIndex(itemIndex) as RibbonGalleryItem; 2504UIElement container = parentItemsControl.ItemContainerGenerator.ContainerFromIndex(i) as UIElement;
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (2)
591RibbonControl ribbonControl = QuickAccessToolBar.ItemContainerGenerator.ContainerFromIndex(i) as RibbonControl; 617RibbonControl ribbonControl = QuickAccessToolBar.ItemContainerGenerator.ContainerFromIndex(i) as RibbonControl;
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (4)
193return headerItemsControl.ItemContainerGenerator.ContainerFromIndex(index) as RibbonTabHeader; 437nextRibbonGroup = ItemContainerGenerator.ContainerFromIndex(nextGroupIndex) as RibbonGroup; 565RibbonGroup group = ItemContainerGenerator.ContainerFromIndex((_groupAutoResizeIndex--).Value) as RibbonGroup; 790RibbonGroup group = ItemContainerGenerator.ContainerFromIndex(i) as RibbonGroup;
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
130return ribbon.ItemContainerGenerator.ContainerFromIndex(index) as RibbonTab;
Microsoft\Windows\Controls\Ribbon\RibbonTabHeaderItemsControl.cs (1)
161FrameworkElement element = ItemContainerGenerator.ContainerFromIndex(index) as FrameworkElement;
Microsoft\Windows\Controls\TextSearchInternal.cs (1)
146ItemsControl childItemsControl = _attachedTo.ItemContainerGenerator.ContainerFromIndex(currentIndex) as ItemsControl;