System\Windows\Controls\ItemContainerGenerator.cs (12)
592static (state, o, d) => ItemsControl.EqualsEx(o, state), item,
931Debug.Assert(item == null || ItemsControl.EqualsEx(item, target),
1028if (!ItemsControl.EqualsEx(genItem, actualItem))
1202ItemsControl.ClearAlternationIndex(((RealizedItemBlock)block).ContainerAt(offset));
1845index = (block == _itemMap) ? -1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1867ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
1884index = (block == _itemMap) ? 1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1906ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
2208Debug.Assert(ItemsControl.EqualsEx(rib.ItemAt(rib.ContainerCount - 1),
2222ItemsControl.EqualsEx(rib.ItemAt(0),
2372Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index");
3053if (ItemsControl.EqualsEx(_entry[k].Item, item))
System\Windows\Controls\ItemsControl.cs (77)
55DefaultStyleKeyProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(typeof(ItemsControl)));
56_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ItemsControl));
57EventManager.RegisterClassHandler(typeof(ItemsControl), Keyboard.GotKeyboardFocusEvent, new KeyboardFocusChangedEventHandler(OnGotFocus));
58VirtualizingStackPanel.ScrollUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnScrollingModeChanged), new CoerceValueCallback(CoerceScrollingMode)));
59VirtualizingPanel.CacheLengthProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged)));
60VirtualizingPanel.CacheLengthUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged), new CoerceValueCallback(CoerceVirtualizationCacheLengthUnit)));
75if (((ItemsControl)d).IsGrouping && baseValueSource == BaseValueSource.Default)
97if ( !((ItemsControl)d).IsGrouping && !(d is TreeView) && baseValueSource == BaseValueSource.Default )
177= DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ItemsControl),
183ItemsControl ic = (ItemsControl) d;
333typeof(ItemsControl),
363typeof(ItemsControl),
385ItemsControl ctrl = (ItemsControl) d;
450typeof(ItemsControl),
472((ItemsControl) d).OnItemTemplateChanged((DataTemplate) e.OldValue, (DataTemplate) e.NewValue);
498typeof(ItemsControl),
525((ItemsControl)d).OnItemTemplateSelectorChanged((DataTemplateSelector) e.OldValue, (DataTemplateSelector) e.NewValue);
553typeof(ItemsControl),
576ItemsControl ctrl = (ItemsControl)d;
602typeof(ItemsControl),
626ItemsControl ctrl = (ItemsControl)d;
674typeof(ItemsControl),
697((ItemsControl) d).OnItemContainerStyleChanged((Style) e.OldValue, (Style) e.NewValue);
723typeof(ItemsControl),
750((ItemsControl) d).OnItemContainerStyleSelectorChanged((StyleSelector) e.OldValue, (StyleSelector) e.NewValue);
775public static ItemsControl GetItemsOwner(DependencyObject element)
777ItemsControl container = null;
793container = panel.TemplatedParent as ItemsControl;
802ItemsControl temp;
813internal static DependencyObject GetItemsOwnerInternal(DependencyObject element, out ItemsControl itemsControl)
834itemsControl = container as ItemsControl;
848= DependencyProperty.Register("ItemsPanel", typeof(ItemsPanelTemplate), typeof(ItemsControl),
878((ItemsControl) d).OnItemsPanelChanged((ItemsPanelTemplate) e.OldValue, (ItemsPanelTemplate) e.NewValue);
893DependencyProperty.RegisterReadOnly("IsGrouping", typeof(bool), typeof(ItemsControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox, new PropertyChangedCallback(OnIsGroupingChanged)));
915((ItemsControl)d).OnIsGroupingChanged(e);
964= DependencyProperty.Register("GroupStyleSelector", typeof(GroupStyleSelector), typeof(ItemsControl),
987((ItemsControl) d).OnGroupStyleSelectorChanged((GroupStyleSelector) e.OldValue, (GroupStyleSelector) e.NewValue);
1009typeof(ItemsControl),
1040ItemsControl ctrl = (ItemsControl) d;
1062typeof(ItemsControl),
1106typeof(ItemsControl),
1126typeof(ItemsControl),
1145public static ItemsControl ItemsControlFromItemContainer(DependencyObject container)
1152ItemsControl ic = LogicalTreeHelper.GetParent(ui) as ItemsControl;
1166return ItemsControl.GetItemsOwner(ui);
1175public static DependencyObject ContainerFromElement(ItemsControl itemsControl, DependencyObject element)
1213private static bool IsContainerForItemsControl(DependencyObject element, ItemsControl itemsControl)
1425ItemsControl ic = ItemsControlFromItemContainer(container);
1573ItemsControl ic;
1592else if ((ic = element as ItemsControl) != null)
1609ItemsControl ic;
1628else if ((ic = element as ItemsControl) != null)
1714internal void PrepareItemsControl(object item, ItemsControl parentItemsControl)
2122ItemsControl itemsControl = null;
2315ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2381ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2447ItemsControl itemsControl = GetEncapsulatingItemsControl(lastElement);
2475ItemsControl itemsControl = fe as ItemsControl;
3166ItemsControl itemsControl = (ItemsControl)sender;
3383private static ItemsControl GetEncapsulatingItemsControl(FrameworkElement element)
3387ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3399ItemsControl itemsControl = null;
3403private static object GetEncapsulatingItem(FrameworkElement element, out FrameworkElement container, out ItemsControl itemsControl)
3410itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3609else if (info.IsRemoved || !ItemsControl.EqualsEx(info.Item,
3652static (state, o, d) => ItemsControl.EqualsEx(o, state.item) && !state.claimedContainers.Contains(d),
3853if (!ItemsControl.EqualsEx(this.Item, that.Item))
System\Windows\Controls\TextSearch.cs (10)
36private TextSearch(ItemsControl itemsControl)
50internal static TextSearch EnsureInstance(ItemsControl itemsControl)
226_attachedTo.NavigateToItem(matchedItem, matchedItemIndex, new ItemsControl.ItemNavigateArgs(Keyboard.PrimaryDevice, ModifierKeys.None));
368private static int FindMatchingPrefix(ItemsControl itemsControl, string primaryTextPath, string prefix,
497internal static MatchedTextInfo FindMatchingPrefix(ItemsControl itemsControl, string prefix)
553private static string GetPrimaryTextPath(ItemsControl itemsControl)
628internal static string GetPrimaryTextFromItem(ItemsControl itemsControl, object item)
643private static BindingExpression CreateBindingExpression(ItemsControl itemsControl, object item, string primaryTextPath)
714return EnsureInstance(d as ItemsControl);
820private ItemsControl _attachedTo;
System\Windows\Controls\VirtualizingStackPanel.cs (70)
744ItemsControl itemsControl;
745ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
832ItemsControl itemsControl;
833ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
1194ElementViewportPosition elementPosition = ItemsControl.GetElementViewportPosition(
1235ItemsControl itemsControl = fe as ItemsControl;
1255ItemsControl itemsControl;
1258if ((itemsControl = fe as ItemsControl) != null)
1615ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
1679private void BringContainerIntoView(ItemsControl itemsControl, int itemIndex)
1989ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
2137ItemsControl itemsControl = null;
3290ItemsControl itemsControl = null;
3731DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this);
3771ItemsControl itemsControl;
4008ItemsControl itemsControl;
4009ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4066ItemsControl itemsControl = null;
4067DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4119ItemsControl itemsControl = null;
4122DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(itemsHost, out itemsControl);
4137out ItemsControl itemsControl,
4153ItemsControl parentItemsControl = null;
4154DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4162parentItemsControl = ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsControl)) as ItemsControl;
4180ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsOwner)) as IContainItemStorage;
4213ItemsControl itemsControl,
6499ItemsControl scrollingItemsControl = GetScrollingItemsControl(child);
6534private ItemsControl GetScrollingItemsControl(UIElement container)
6538ItemsControl parent = ItemsControl.ItemsControlFromItemContainer(container);
6547parent = ItemsControl.ItemsControlFromItemContainer(parent);
6556ItemsControl parentItemsControl = parent as ItemsControl;
9006ItemsControl itemsControl)
9022ItemsControl itemsControl,
9194ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
9374ItemsControl itemsControl = null;
9375ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
9420private bool NotifyCleanupItem(int childIndex, UIElementCollection children, ItemsControl itemsControl)
9425private bool NotifyCleanupItem(UIElement child, ItemsControl itemsControl)
10979ItemsControl itemsControl;
11009ItemsControl scrollingItemsControl = ItemsControl.GetItemsOwner(this);
11086ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
12051ItemsControl target = o as ItemsControl;
12120ItemsControl itemsControl)
12287private WeakReference<ItemsControl> _wrIC;
12294private ScrollTracer(ItemsControl itemsControl, VirtualizingStackPanel vsp, TraceList traceList)
12296_wrIC = new WeakReference<ItemsControl>(itemsControl);
12329private void IdentifyTrace(ItemsControl ic, VirtualizingStackPanel vsp)
12380if (_wrIC.TryGetTarget(out ItemsControl ic))
12396if (_wrIC.TryGetTarget(out ItemsControl ic))
12474private static List<Tuple<WeakReference<ItemsControl>,TraceList>> s_TargetToTraceListMap
12475= new List<Tuple<WeakReference<ItemsControl>,TraceList>>();
12478static TraceList TraceListForItemsControl(ItemsControl target)
12487WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12488ItemsControl itemsControl;
12506private static TraceList AddToMap(ItemsControl target)
12533new Tuple<WeakReference<ItemsControl>,TraceList>(
12534new WeakReference<ItemsControl>(target),
12558WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12559ItemsControl unused;
13036DependencyObject parentContainer = ItemsControl.ContainerFromElement(null, vsp);
System\Windows\Data\ListCollectionView.cs (17)
759if (!System.Windows.Controls.ItemsControl.EqualsEx(newItem, SourceList[index]))
769Debug.Assert(_newItemIndex != -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events");
1020if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1085if (index >= InternalCount || !System.Windows.Controls.ItemsControl.EqualsEx(item, GetItemAt(index)))
1157if (System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1343if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _editItem))
1895(IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(_newItem, newItem)));
1933System.Windows.Controls.ItemsControl.EqualsEx(ItemFrom(InternalList[localOldIndex]), oldItem))
1986bool simpleMove = System.Windows.Controls.ItemsControl.EqualsEx(oldItem, newItem);
1995System.Windows.Controls.ItemsControl.EqualsEx(InternalList[localOldIndex], oldItem))
2167else if (IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2649System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2676if (!System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))
2775if (System.Windows.Controls.ItemsControl.EqualsEx(ilFull[fullIndex], ilPartial[localIndex]))
2781else if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilPartial[localIndex]))
2968if (!IsAddingNew || !System.Windows.Controls.ItemsControl.EqualsEx(_newItem, item))
3180if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))