// Token: 0x06005934 RID: 22836 RVA: 0x0018A638 File Offset: 0x00188838
        private static void ExpandRecursive(TreeViewItem item)
        {
            if (item == null)
            {
                return;
            }
            if (!item.IsExpanded)
            {
                item.SetCurrentValueInternal(TreeViewItem.IsExpandedProperty, BooleanBoxes.TrueBox);
            }
            item.ApplyTemplate();
            ItemsPresenter itemsPresenter = (ItemsPresenter)item.Template.FindName("ItemsHost", item);

            if (itemsPresenter != null)
            {
                itemsPresenter.ApplyTemplate();
            }
            else
            {
                item.UpdateLayout();
            }
            VirtualizingPanel virtualizingPanel = item.ItemsHost as VirtualizingPanel;

            item.ItemsHost.EnsureGenerator();
            int i     = 0;
            int count = item.Items.Count;

            while (i < count)
            {
                TreeViewItem treeViewItem;
                if (virtualizingPanel != null)
                {
                    virtualizingPanel.BringIndexIntoView(i);
                    treeViewItem = (TreeViewItem)item.ItemContainerGenerator.ContainerFromIndex(i);
                }
                else
                {
                    treeViewItem = (TreeViewItem)item.ItemContainerGenerator.ContainerFromIndex(i);
                    treeViewItem.BringIntoView();
                }
                if (treeViewItem != null)
                {
                    TreeViewItem.ExpandRecursive(treeViewItem);
                }
                i++;
            }
        }
 /// <summary>Expands the <see cref="T:System.Windows.Controls.TreeViewItem" /> control and all its child <see cref="T:System.Windows.Controls.TreeViewItem" /> elements.</summary>
 // Token: 0x06005908 RID: 22792 RVA: 0x00189E59 File Offset: 0x00188059
 public void ExpandSubtree()
 {
     TreeViewItem.ExpandRecursive(this);
 }