System\Windows\Controls\ItemContainerGenerator.cs (12)
598static (state, o, d) => ItemsControl.EqualsEx(o, state), item,
937Debug.Assert(item == null || ItemsControl.EqualsEx(item, target),
1034if (!ItemsControl.EqualsEx(genItem, actualItem))
1211ItemsControl.ClearAlternationIndex(((RealizedItemBlock)block).ContainerAt(offset));
1854index = (block == _itemMap) ? -1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1876ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
1893index = (block == _itemMap) ? 1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1915ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
2217Debug.Assert(ItemsControl.EqualsEx(rib.ItemAt(rib.ContainerCount - 1),
2231ItemsControl.EqualsEx(rib.ItemAt(0),
2381Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index");
3058if (ItemsControl.EqualsEx(_entry[k].Item, item))
System\Windows\Controls\ItemsControl.cs (77)
64DefaultStyleKeyProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(typeof(ItemsControl)));
65_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ItemsControl));
66EventManager.RegisterClassHandler(typeof(ItemsControl), Keyboard.GotKeyboardFocusEvent, new KeyboardFocusChangedEventHandler(OnGotFocus));
67VirtualizingStackPanel.ScrollUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnScrollingModeChanged), new CoerceValueCallback(CoerceScrollingMode)));
68VirtualizingPanel.CacheLengthProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged)));
69VirtualizingPanel.CacheLengthUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged), new CoerceValueCallback(CoerceVirtualizationCacheLengthUnit)));
84if (((ItemsControl)d).IsGrouping && baseValueSource == BaseValueSource.Default)
106if ( !((ItemsControl)d).IsGrouping && !(d is TreeView) && baseValueSource == BaseValueSource.Default )
186= DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ItemsControl),
192ItemsControl ic = (ItemsControl) d;
342typeof(ItemsControl),
372typeof(ItemsControl),
394ItemsControl ctrl = (ItemsControl) d;
459typeof(ItemsControl),
481((ItemsControl) d).OnItemTemplateChanged((DataTemplate) e.OldValue, (DataTemplate) e.NewValue);
510typeof(ItemsControl),
537((ItemsControl)d).OnItemTemplateSelectorChanged((DataTemplateSelector) e.OldValue, (DataTemplateSelector) e.NewValue);
565typeof(ItemsControl),
588ItemsControl ctrl = (ItemsControl)d;
614typeof(ItemsControl),
638ItemsControl ctrl = (ItemsControl)d;
686typeof(ItemsControl),
709((ItemsControl) d).OnItemContainerStyleChanged((Style) e.OldValue, (Style) e.NewValue);
738typeof(ItemsControl),
765((ItemsControl) d).OnItemContainerStyleSelectorChanged((StyleSelector) e.OldValue, (StyleSelector) e.NewValue);
790public static ItemsControl GetItemsOwner(DependencyObject element)
792ItemsControl container = null;
808container = panel.TemplatedParent as ItemsControl;
817ItemsControl temp;
828internal static DependencyObject GetItemsOwnerInternal(DependencyObject element, out ItemsControl itemsControl)
849itemsControl = container as ItemsControl;
863= DependencyProperty.Register("ItemsPanel", typeof(ItemsPanelTemplate), typeof(ItemsControl),
893((ItemsControl) d).OnItemsPanelChanged((ItemsPanelTemplate) e.OldValue, (ItemsPanelTemplate) e.NewValue);
908DependencyProperty.RegisterReadOnly("IsGrouping", typeof(bool), typeof(ItemsControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox, new PropertyChangedCallback(OnIsGroupingChanged)));
930((ItemsControl)d).OnIsGroupingChanged(e);
982= DependencyProperty.Register("GroupStyleSelector", typeof(GroupStyleSelector), typeof(ItemsControl),
1005((ItemsControl) d).OnGroupStyleSelectorChanged((GroupStyleSelector) e.OldValue, (GroupStyleSelector) e.NewValue);
1030typeof(ItemsControl),
1061ItemsControl ctrl = (ItemsControl) d;
1083typeof(ItemsControl),
1127typeof(ItemsControl),
1147typeof(ItemsControl),
1166public static ItemsControl ItemsControlFromItemContainer(DependencyObject container)
1173ItemsControl ic = LogicalTreeHelper.GetParent(ui) as ItemsControl;
1187return ItemsControl.GetItemsOwner(ui);
1196public static DependencyObject ContainerFromElement(ItemsControl itemsControl, DependencyObject element)
1234private static bool IsContainerForItemsControl(DependencyObject element, ItemsControl itemsControl)
1452ItemsControl ic = ItemsControlFromItemContainer(container);
1606ItemsControl ic;
1625else if ((ic = element as ItemsControl) != null)
1642ItemsControl ic;
1661else if ((ic = element as ItemsControl) != null)
1750internal void PrepareItemsControl(object item, ItemsControl parentItemsControl)
2161ItemsControl itemsControl = null;
2354ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2420ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2486ItemsControl itemsControl = GetEncapsulatingItemsControl(lastElement);
2514ItemsControl itemsControl = fe as ItemsControl;
3205ItemsControl itemsControl = (ItemsControl)sender;
3422private static ItemsControl GetEncapsulatingItemsControl(FrameworkElement element)
3426ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3438ItemsControl itemsControl = null;
3442private static object GetEncapsulatingItem(FrameworkElement element, out FrameworkElement container, out ItemsControl itemsControl)
3449itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3648else if (info.IsRemoved || !ItemsControl.EqualsEx(info.Item,
3691static (state, o, d) => ItemsControl.EqualsEx(o, state.item) && !state.claimedContainers.Contains(d),
3895if (!ItemsControl.EqualsEx(this.Item, that.Item))
System\Windows\Controls\TextSearch.cs (10)
47private TextSearch(ItemsControl itemsControl)
61internal static TextSearch EnsureInstance(ItemsControl itemsControl)
237_attachedTo.NavigateToItem(matchedItem, matchedItemIndex, new ItemsControl.ItemNavigateArgs(Keyboard.PrimaryDevice, ModifierKeys.None));
379private static int FindMatchingPrefix(ItemsControl itemsControl, string primaryTextPath, string prefix,
508internal static MatchedTextInfo FindMatchingPrefix(ItemsControl itemsControl, string prefix)
564private static string GetPrimaryTextPath(ItemsControl itemsControl)
639internal static string GetPrimaryTextFromItem(ItemsControl itemsControl, object item)
654private static BindingExpression CreateBindingExpression(ItemsControl itemsControl, object item, string primaryTextPath)
728return EnsureInstance(d as ItemsControl);
834private ItemsControl _attachedTo;
System\Windows\Controls\VirtualizingStackPanel.cs (70)
749ItemsControl itemsControl;
750ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
837ItemsControl itemsControl;
838ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
1199ElementViewportPosition elementPosition = ItemsControl.GetElementViewportPosition(
1240ItemsControl itemsControl = fe as ItemsControl;
1260ItemsControl itemsControl;
1263if ((itemsControl = fe as ItemsControl) != null)
1627ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
1694private void BringContainerIntoView(ItemsControl itemsControl, int itemIndex)
2004ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
2153ItemsControl itemsControl = null;
3309ItemsControl itemsControl = null;
3750DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this);
3790ItemsControl itemsControl;
4027ItemsControl itemsControl;
4028ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4091ItemsControl itemsControl = null;
4092DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4144ItemsControl itemsControl = null;
4147DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(itemsHost, out itemsControl);
4162out ItemsControl itemsControl,
4178ItemsControl parentItemsControl = null;
4179DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4187parentItemsControl = ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsControl)) as ItemsControl;
4205ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsOwner)) as IContainItemStorage;
4238ItemsControl itemsControl,
6527ItemsControl scrollingItemsControl = GetScrollingItemsControl(child);
6562private ItemsControl GetScrollingItemsControl(UIElement container)
6566ItemsControl parent = ItemsControl.ItemsControlFromItemContainer(container);
6575parent = ItemsControl.ItemsControlFromItemContainer(parent);
6584ItemsControl parentItemsControl = parent as ItemsControl;
9032ItemsControl itemsControl)
9048ItemsControl itemsControl,
9220ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
9400ItemsControl itemsControl = null;
9401ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
9446private bool NotifyCleanupItem(int childIndex, UIElementCollection children, ItemsControl itemsControl)
9451private bool NotifyCleanupItem(UIElement child, ItemsControl itemsControl)
11006ItemsControl itemsControl;
11036ItemsControl scrollingItemsControl = ItemsControl.GetItemsOwner(this);
11113ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
12077ItemsControl target = o as ItemsControl;
12146ItemsControl itemsControl)
12317private WeakReference<ItemsControl> _wrIC;
12324private ScrollTracer(ItemsControl itemsControl, VirtualizingStackPanel vsp, TraceList traceList)
12326_wrIC = new WeakReference<ItemsControl>(itemsControl);
12359private void IdentifyTrace(ItemsControl ic, VirtualizingStackPanel vsp)
12411ItemsControl ic;
12429ItemsControl ic;
12508private static List<Tuple<WeakReference<ItemsControl>,TraceList>> s_TargetToTraceListMap
12509= new List<Tuple<WeakReference<ItemsControl>,TraceList>>();
12512static TraceList TraceListForItemsControl(ItemsControl target)
12521WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12522ItemsControl itemsControl;
12540private static TraceList AddToMap(ItemsControl target)
12567new Tuple<WeakReference<ItemsControl>,TraceList>(
12568new WeakReference<ItemsControl>(target),
12592WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12593ItemsControl unused;
13066DependencyObject parentContainer = ItemsControl.ContainerFromElement(null, vsp);
System\Windows\Data\ListCollectionView.cs (17)
765if (!System.Windows.Controls.ItemsControl.EqualsEx(newItem, SourceList[index]))
775Debug.Assert(_newItemIndex != -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events");
1035if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1100if (index >= InternalCount || !System.Windows.Controls.ItemsControl.EqualsEx(item, GetItemAt(index)))
1172if (System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1367if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _editItem))
1919(IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(_newItem, newItem)));
1957System.Windows.Controls.ItemsControl.EqualsEx(ItemFrom(InternalList[localOldIndex]), oldItem))
2010bool simpleMove = System.Windows.Controls.ItemsControl.EqualsEx(oldItem, newItem);
2019System.Windows.Controls.ItemsControl.EqualsEx(InternalList[localOldIndex], oldItem))
2191else if (IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2673System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2700if (!System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))
2799if (System.Windows.Controls.ItemsControl.EqualsEx(ilFull[fullIndex], ilPartial[localIndex]))
2805else if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilPartial[localIndex]))
2992if (!IsAddingNew || !System.Windows.Controls.ItemsControl.EqualsEx(_newItem, item))
3204if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))