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))
1205ItemsControl.ClearAlternationIndex(((RealizedItemBlock)block).ContainerAt(offset));
1848index = (block == _itemMap) ? -1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1870ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
1887index = (block == _itemMap) ? 1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1909ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
2211Debug.Assert(ItemsControl.EqualsEx(rib.ItemAt(rib.ContainerCount - 1),
2225ItemsControl.EqualsEx(rib.ItemAt(0),
2375Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index");
3052if (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);
501typeof(ItemsControl),
528((ItemsControl)d).OnItemTemplateSelectorChanged((DataTemplateSelector) e.OldValue, (DataTemplateSelector) e.NewValue);
556typeof(ItemsControl),
579ItemsControl ctrl = (ItemsControl)d;
605typeof(ItemsControl),
629ItemsControl ctrl = (ItemsControl)d;
677typeof(ItemsControl),
700((ItemsControl) d).OnItemContainerStyleChanged((Style) e.OldValue, (Style) e.NewValue);
729typeof(ItemsControl),
756((ItemsControl) d).OnItemContainerStyleSelectorChanged((StyleSelector) e.OldValue, (StyleSelector) e.NewValue);
781public static ItemsControl GetItemsOwner(DependencyObject element)
783ItemsControl container = null;
799container = panel.TemplatedParent as ItemsControl;
808ItemsControl temp;
819internal static DependencyObject GetItemsOwnerInternal(DependencyObject element, out ItemsControl itemsControl)
840itemsControl = container as ItemsControl;
854= DependencyProperty.Register("ItemsPanel", typeof(ItemsPanelTemplate), typeof(ItemsControl),
884((ItemsControl) d).OnItemsPanelChanged((ItemsPanelTemplate) e.OldValue, (ItemsPanelTemplate) e.NewValue);
899DependencyProperty.RegisterReadOnly("IsGrouping", typeof(bool), typeof(ItemsControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox, new PropertyChangedCallback(OnIsGroupingChanged)));
921((ItemsControl)d).OnIsGroupingChanged(e);
973= DependencyProperty.Register("GroupStyleSelector", typeof(GroupStyleSelector), typeof(ItemsControl),
996((ItemsControl) d).OnGroupStyleSelectorChanged((GroupStyleSelector) e.OldValue, (GroupStyleSelector) e.NewValue);
1021typeof(ItemsControl),
1052ItemsControl ctrl = (ItemsControl) d;
1074typeof(ItemsControl),
1118typeof(ItemsControl),
1138typeof(ItemsControl),
1157public static ItemsControl ItemsControlFromItemContainer(DependencyObject container)
1164ItemsControl ic = LogicalTreeHelper.GetParent(ui) as ItemsControl;
1178return ItemsControl.GetItemsOwner(ui);
1187public static DependencyObject ContainerFromElement(ItemsControl itemsControl, DependencyObject element)
1225private static bool IsContainerForItemsControl(DependencyObject element, ItemsControl itemsControl)
1443ItemsControl ic = ItemsControlFromItemContainer(container);
1597ItemsControl ic;
1616else if ((ic = element as ItemsControl) != null)
1633ItemsControl ic;
1652else if ((ic = element as ItemsControl) != null)
1741internal void PrepareItemsControl(object item, ItemsControl parentItemsControl)
2152ItemsControl itemsControl = null;
2345ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2411ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2477ItemsControl itemsControl = GetEncapsulatingItemsControl(lastElement);
2505ItemsControl itemsControl = fe as ItemsControl;
3196ItemsControl itemsControl = (ItemsControl)sender;
3413private static ItemsControl GetEncapsulatingItemsControl(FrameworkElement element)
3417ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3429ItemsControl itemsControl = null;
3433private static object GetEncapsulatingItem(FrameworkElement element, out FrameworkElement container, out ItemsControl itemsControl)
3440itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3639else if (info.IsRemoved || !ItemsControl.EqualsEx(info.Item,
3682static (state, o, d) => ItemsControl.EqualsEx(o, state.item) && !state.claimedContainers.Contains(d),
3886if (!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)
717return EnsureInstance(d as ItemsControl);
823private 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)
1622ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
1689private void BringContainerIntoView(ItemsControl itemsControl, int itemIndex)
1999ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
2148ItemsControl itemsControl = null;
3304ItemsControl itemsControl = null;
3745DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this);
3785ItemsControl itemsControl;
4022ItemsControl itemsControl;
4023ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4086ItemsControl itemsControl = null;
4087DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4139ItemsControl itemsControl = null;
4142DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(itemsHost, out itemsControl);
4157out ItemsControl itemsControl,
4173ItemsControl parentItemsControl = null;
4174DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4182parentItemsControl = ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsControl)) as ItemsControl;
4200ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsOwner)) as IContainItemStorage;
4233ItemsControl itemsControl,
6522ItemsControl scrollingItemsControl = GetScrollingItemsControl(child);
6557private ItemsControl GetScrollingItemsControl(UIElement container)
6561ItemsControl parent = ItemsControl.ItemsControlFromItemContainer(container);
6570parent = ItemsControl.ItemsControlFromItemContainer(parent);
6579ItemsControl parentItemsControl = parent as ItemsControl;
9027ItemsControl itemsControl)
9043ItemsControl itemsControl,
9215ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
9395ItemsControl itemsControl = null;
9396ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
9441private bool NotifyCleanupItem(int childIndex, UIElementCollection children, ItemsControl itemsControl)
9446private bool NotifyCleanupItem(UIElement child, ItemsControl itemsControl)
11001ItemsControl itemsControl;
11031ItemsControl scrollingItemsControl = ItemsControl.GetItemsOwner(this);
11108ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
12072ItemsControl target = o as ItemsControl;
12141ItemsControl itemsControl)
12312private WeakReference<ItemsControl> _wrIC;
12319private ScrollTracer(ItemsControl itemsControl, VirtualizingStackPanel vsp, TraceList traceList)
12321_wrIC = new WeakReference<ItemsControl>(itemsControl);
12354private void IdentifyTrace(ItemsControl ic, VirtualizingStackPanel vsp)
12406ItemsControl ic;
12424ItemsControl ic;
12503private static List<Tuple<WeakReference<ItemsControl>,TraceList>> s_TargetToTraceListMap
12504= new List<Tuple<WeakReference<ItemsControl>,TraceList>>();
12507static TraceList TraceListForItemsControl(ItemsControl target)
12516WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12517ItemsControl itemsControl;
12535private static TraceList AddToMap(ItemsControl target)
12562new Tuple<WeakReference<ItemsControl>,TraceList>(
12563new WeakReference<ItemsControl>(target),
12587WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12588ItemsControl unused;
13061DependencyObject 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");
1029if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1094if (index >= InternalCount || !System.Windows.Controls.ItemsControl.EqualsEx(item, GetItemAt(index)))
1166if (System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1361if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _editItem))
1913(IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(_newItem, newItem)));
1951System.Windows.Controls.ItemsControl.EqualsEx(ItemFrom(InternalList[localOldIndex]), oldItem))
2004bool simpleMove = System.Windows.Controls.ItemsControl.EqualsEx(oldItem, newItem);
2013System.Windows.Controls.ItemsControl.EqualsEx(InternalList[localOldIndex], oldItem))
2185else if (IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2667System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2694if (!System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))
2793if (System.Windows.Controls.ItemsControl.EqualsEx(ilFull[fullIndex], ilPartial[localIndex]))
2799else if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilPartial[localIndex]))
2986if (!IsAddingNew || !System.Windows.Controls.ItemsControl.EqualsEx(_newItem, item))
3198if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))