// Token: 0x0600592F RID: 22831 RVA: 0x0018A4C1 File Offset: 0x001886C1
 internal void PrepareItemContainer(object item, ItemsControl parentItemsControl)
 {
     Helper.ClearVirtualizingElement(this);
     TreeViewItem.IsVirtualizingPropagationHelper(parentItemsControl, this);
     if (VirtualizingPanel.GetIsVirtualizing(parentItemsControl))
     {
         Helper.SetItemValuesOnContainer(parentItemsControl, this, item);
     }
 }
        // Token: 0x06005A25 RID: 23077 RVA: 0x0018D700 File Offset: 0x0018B900
        private static void VirtualizationPropertyChangePropagationRecursive(DependencyObject parent, Panel itemsHost)
        {
            UIElementCollection internalChildren = itemsHost.InternalChildren;
            int count = internalChildren.Count;

            for (int i = 0; i < count; i++)
            {
                IHierarchicalVirtualizationAndScrollInfo hierarchicalVirtualizationAndScrollInfo = internalChildren[i] as IHierarchicalVirtualizationAndScrollInfo;
                if (hierarchicalVirtualizationAndScrollInfo != null)
                {
                    TreeViewItem.IsVirtualizingPropagationHelper(parent, (DependencyObject)hierarchicalVirtualizationAndScrollInfo);
                    Panel itemsHost2 = hierarchicalVirtualizationAndScrollInfo.ItemsHost;
                    if (itemsHost2 != null)
                    {
                        VirtualizingPanel.VirtualizationPropertyChangePropagationRecursive((DependencyObject)hierarchicalVirtualizationAndScrollInfo, itemsHost2);
                    }
                }
            }
        }
Exemplo n.º 3
0
        private static void VirtualizationPropertyChangePropagationRecursive(DependencyObject parent, Panel itemsHost)
        {
            UIElementCollection children = itemsHost.InternalChildren;
            int childrenCount            = children.Count;

            for (int i = 0; i < childrenCount; i++)
            {
                IHierarchicalVirtualizationAndScrollInfo virtualizingChild = children[i] as IHierarchicalVirtualizationAndScrollInfo;
                if (virtualizingChild != null)
                {
                    TreeViewItem.IsVirtualizingPropagationHelper(parent, (DependencyObject)virtualizingChild);

                    Panel childItemsHost = virtualizingChild.ItemsHost;
                    if (childItemsHost != null)
                    {
                        VirtualizationPropertyChangePropagationRecursive((DependencyObject)virtualizingChild, childItemsHost);
                    }
                }
            }
        }