src\Framework\System\Windows\Controls\ItemContainerGenerator.cs (10)
602delegate(object o, DependencyObject d) { return ItemsControl.EqualsEx(o, item); },
1042if (!ItemsControl.EqualsEx(genItem, actualItem))
1219ItemsControl.ClearAlternationIndex(((RealizedItemBlock)block).ContainerAt(offset));
1862index = (block == _itemMap) ? -1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1884ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
1901index = (block == _itemMap) ? 1 : ItemsControl.GetAlternationIndex(rib.ContainerAt(offset));
1923ItemsControl.SetAlternationIndex(rib.ContainerAt(offset), index);
2239ItemsControl.EqualsEx(rib.ItemAt(0),
2389Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index");
3066if (ItemsControl.EqualsEx(_entry[k].Item, item))
src\Framework\System\Windows\Controls\ItemsControl.cs (77)
65DefaultStyleKeyProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(typeof(ItemsControl)));
66_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ItemsControl));
67EventManager.RegisterClassHandler(typeof(ItemsControl), Keyboard.GotKeyboardFocusEvent, new KeyboardFocusChangedEventHandler(OnGotFocus));
68VirtualizingStackPanel.ScrollUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnScrollingModeChanged), new CoerceValueCallback(CoerceScrollingMode)));
69VirtualizingPanel.CacheLengthProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged)));
70VirtualizingPanel.CacheLengthUnitProperty.OverrideMetadata(typeof(ItemsControl), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCacheSizeChanged), new CoerceValueCallback(CoerceVirtualizationCacheLengthUnit)));
85if (((ItemsControl)d).IsGrouping && baseValueSource == BaseValueSource.Default)
107if ( !((ItemsControl)d).IsGrouping && !(d is TreeView) && baseValueSource == BaseValueSource.Default )
187= DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ItemsControl),
193ItemsControl ic = (ItemsControl) d;
344typeof(ItemsControl),
374typeof(ItemsControl),
396ItemsControl ctrl = (ItemsControl) d;
461typeof(ItemsControl),
483((ItemsControl) d).OnItemTemplateChanged((DataTemplate) e.OldValue, (DataTemplate) e.NewValue);
512typeof(ItemsControl),
539((ItemsControl)d).OnItemTemplateSelectorChanged((DataTemplateSelector) e.OldValue, (DataTemplateSelector) e.NewValue);
567typeof(ItemsControl),
590ItemsControl ctrl = (ItemsControl)d;
616typeof(ItemsControl),
640ItemsControl ctrl = (ItemsControl)d;
688typeof(ItemsControl),
711((ItemsControl) d).OnItemContainerStyleChanged((Style) e.OldValue, (Style) e.NewValue);
740typeof(ItemsControl),
767((ItemsControl) d).OnItemContainerStyleSelectorChanged((StyleSelector) e.OldValue, (StyleSelector) e.NewValue);
792public static ItemsControl GetItemsOwner(DependencyObject element)
794ItemsControl container = null;
810container = panel.TemplatedParent as ItemsControl;
819ItemsControl temp;
830internal static DependencyObject GetItemsOwnerInternal(DependencyObject element, out ItemsControl itemsControl)
851itemsControl = container as ItemsControl;
865= DependencyProperty.Register("ItemsPanel", typeof(ItemsPanelTemplate), typeof(ItemsControl),
895((ItemsControl) d).OnItemsPanelChanged((ItemsPanelTemplate) e.OldValue, (ItemsPanelTemplate) e.NewValue);
910DependencyProperty.RegisterReadOnly("IsGrouping", typeof(bool), typeof(ItemsControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox, new PropertyChangedCallback(OnIsGroupingChanged)));
932((ItemsControl)d).OnIsGroupingChanged(e);
984= DependencyProperty.Register("GroupStyleSelector", typeof(GroupStyleSelector), typeof(ItemsControl),
1007((ItemsControl) d).OnGroupStyleSelectorChanged((GroupStyleSelector) e.OldValue, (GroupStyleSelector) e.NewValue);
1032typeof(ItemsControl),
1063ItemsControl ctrl = (ItemsControl) d;
1085typeof(ItemsControl),
1130typeof(ItemsControl),
1150typeof(ItemsControl),
1169public static ItemsControl ItemsControlFromItemContainer(DependencyObject container)
1176ItemsControl ic = LogicalTreeHelper.GetParent(ui) as ItemsControl;
1190return ItemsControl.GetItemsOwner(ui);
1199public static DependencyObject ContainerFromElement(ItemsControl itemsControl, DependencyObject element)
1238private static bool IsContainerForItemsControl(DependencyObject element, ItemsControl itemsControl)
1455ItemsControl ic = ItemsControlFromItemContainer(container);
1609ItemsControl ic;
1628else if ((ic = element as ItemsControl) != null)
1645ItemsControl ic;
1664else if ((ic = element as ItemsControl) != null)
1753internal void PrepareItemsControl(object item, ItemsControl parentItemsControl)
2164ItemsControl itemsControl = null;
2357ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2423ItemsControl itemsControl = GetEncapsulatingItemsControl(firstElement);
2489ItemsControl itemsControl = GetEncapsulatingItemsControl(lastElement);
2517ItemsControl itemsControl = fe as ItemsControl;
3136ItemsControl itemsControl = (ItemsControl)sender;
3353private static ItemsControl GetEncapsulatingItemsControl(FrameworkElement element)
3357ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3369ItemsControl itemsControl = null;
3373private static object GetEncapsulatingItem(FrameworkElement element, out FrameworkElement container, out ItemsControl itemsControl)
3380itemsControl = ItemsControl.ItemsControlFromItemContainer(element);
3579else if (info.IsRemoved || !ItemsControl.EqualsEx(info.Item,
3623{ return ItemsControl.EqualsEx(o, item) &&
3827if (!ItemsControl.EqualsEx(this.Item, that.Item))
src\Framework\System\Windows\Controls\TextSearch.cs (10)
47private TextSearch(ItemsControl itemsControl)
64internal static TextSearch EnsureInstance(ItemsControl itemsControl)
253_attachedTo.NavigateToItem(matchedItem, matchedItemIndex, new ItemsControl.ItemNavigateArgs(Keyboard.PrimaryDevice, ModifierKeys.None));
393private static int FindMatchingPrefix(ItemsControl itemsControl, string primaryTextPath, string prefix,
522internal static MatchedTextInfo FindMatchingPrefix(ItemsControl itemsControl, string prefix)
578private static string GetPrimaryTextPath(ItemsControl itemsControl)
653internal static string GetPrimaryTextFromItem(ItemsControl itemsControl, object item)
668private static BindingExpression CreateBindingExpression(ItemsControl itemsControl, object item, string primaryTextPath)
743return EnsureInstance(d as ItemsControl);
852private ItemsControl _attachedTo;
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (70)
746ItemsControl itemsControl;
747ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
834ItemsControl itemsControl;
835ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
1166ElementViewportPosition elementPosition = ItemsControl.GetElementViewportPosition(
1206ItemsControl itemsControl = fe as ItemsControl;
1226ItemsControl itemsControl;
1229if ((itemsControl = fe as ItemsControl) != null)
1578ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
1645private void BringContainerIntoView(ItemsControl itemsControl, int itemIndex)
1955ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
2104ItemsControl itemsControl = null;
3248ItemsControl itemsControl = null;
3685DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this);
3724ItemsControl itemsControl;
3945ItemsControl itemsControl;
3946ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4009ItemsControl itemsControl = null;
4010DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4062ItemsControl itemsControl = null;
4065DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(itemsHost, out itemsControl);
4080out ItemsControl itemsControl,
4096ItemsControl parentItemsControl = null;
4097DependencyObject itemsOwner = ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
4105parentItemsControl = ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsControl)) as ItemsControl;
4123ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent(itemsOwner)) as IContainItemStorage;
4156ItemsControl itemsControl,
6389ItemsControl scrollingItemsControl = GetScrollingItemsControl(child);
6424private ItemsControl GetScrollingItemsControl(UIElement container)
6428ItemsControl parent = ItemsControl.ItemsControlFromItemContainer(container);
6437parent = ItemsControl.ItemsControlFromItemContainer(parent);
6446ItemsControl parentItemsControl = parent as ItemsControl;
8874ItemsControl itemsControl)
8890ItemsControl itemsControl,
9062ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
9246ItemsControl itemsControl = null;
9247ItemsControl.GetItemsOwnerInternal(this, out itemsControl);
9292private bool NotifyCleanupItem(int childIndex, UIElementCollection children, ItemsControl itemsControl)
9297private bool NotifyCleanupItem(UIElement child, ItemsControl itemsControl)
10859ItemsControl itemsControl;
10889ItemsControl scrollingItemsControl = ItemsControl.GetItemsOwner(this);
10966ItemsControl.GetItemsOwnerInternal(VisualTreeHelper.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
11921ItemsControl target = o as ItemsControl;
11990ItemsControl itemsControl)
12156private WeakReference<ItemsControl> _wrIC;
12163private ScrollTracer(ItemsControl itemsControl, VirtualizingStackPanel vsp, TraceList traceList)
12165_wrIC = new WeakReference<ItemsControl>(itemsControl);
12198private void IdentifyTrace(ItemsControl ic, VirtualizingStackPanel vsp)
12244ItemsControl ic;
12262ItemsControl ic;
12341private static List<Tuple<WeakReference<ItemsControl>,TraceList>> s_TargetToTraceListMap
12342= new List<Tuple<WeakReference<ItemsControl>,TraceList>>();
12345static TraceList TraceListForItemsControl(ItemsControl target)
12354WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12355ItemsControl itemsControl;
12373private static TraceList AddToMap(ItemsControl target)
12402new Tuple<WeakReference<ItemsControl>,TraceList>(
12403new WeakReference<ItemsControl>(target),
12427WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
12428ItemsControl unused;
12900DependencyObject parentContainer = ItemsControl.ContainerFromElement(null, vsp);
src\Framework\System\Windows\Data\ListCollectionView.cs (17)
773if (!System.Windows.Controls.ItemsControl.EqualsEx(newItem, SourceList[index]))
783Debug.Assert(_newItemIndex != -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events");
1043if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1108if (index >= InternalCount || !System.Windows.Controls.ItemsControl.EqualsEx(item, GetItemAt(index)))
1180if (System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
1375if (!System.Windows.Controls.ItemsControl.EqualsEx(item, _editItem))
1928(IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(_newItem, newItem)));
1966System.Windows.Controls.ItemsControl.EqualsEx(ItemFrom(InternalList[localOldIndex]), oldItem))
2019bool simpleMove = System.Windows.Controls.ItemsControl.EqualsEx(oldItem, newItem);
2028System.Windows.Controls.ItemsControl.EqualsEx(InternalList[localOldIndex], oldItem))
2202else if (IsAddingNew && System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2686System.Windows.Controls.ItemsControl.EqualsEx(item, _newItem))
2713if (!System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))
2812if (System.Windows.Controls.ItemsControl.EqualsEx(ilFull[fullIndex], ilPartial[localIndex]))
2818else if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilPartial[localIndex]))
3005if (!IsAddingNew || !System.Windows.Controls.ItemsControl.EqualsEx(_newItem, item))
3217if (System.Windows.Controls.ItemsControl.EqualsEx(item, ilFull[index]))