src/Misc/EFTools/XmlCore/UI/Views/Explorer/ExplorerTreeViewItem.cs
/// <summary>
///     Get the immediate children of the current ExplorerTreeViewItem, create automation peers for them, and return them for
///     accessibility/automation
/// </summary>
/// <param name="parent"></param>
/// <returns></returns>
Get the immediate children of the current ExplorerTreeViewItem, create automation peers for them, and return them for
accessibility/automation
Get the immediate children of the current ExplorerTreeViewItem create automation peers for them and return them for accessibility / automation
private static List<AutomationPeer> GetAutomationChildren(ExplorerTreeViewItem parent)
        {
            var automationChildren = new List<AutomationPeer>();
            foreach (ExplorerEFElement element in parent.Items)
            {
                var treeViewItem = parent.ItemContainerGenerator.ContainerFromItem(element) as ExplorerTreeViewItem;
                if (treeViewItem != null)
                {
                    var automationChild = CreatePeerForElement(treeViewItem);
                    Debug.Assert(automationChild != null, "Every ExplorerTreeViewItem should have an automation peer");
                    if (automationChild != null)
                    {
                        automationChildren.Add(automationChild);
                    }
                }
            }
            return automationChildren;
        }
private static List < AutomationPeer > GetAutomationChildren ( ExplorerTreeViewItem parent ) { var automationChildren = new List < AutomationPeer > ( ) ; foreach ( ExplorerEFElement element in parent . Items ) { var treeViewItem = parent . ItemContainerGenerator . ContainerFromItem ( element ) as ExplorerTreeViewItem ; if ( treeViewItem != null ) { var automationChild = CreatePeerForElement ( treeViewItem ) ; Debug . Assert ( automationChild != null , " " ) ; if ( automationChild != null ) { automationChildren . Add ( automationChild ) ; } } } return automationChildren ; }
Get the immediate children of the current ExplorerTreeViewItem, create automation peers for them, and return them for
accessibility/automation
Get the immediate children of the current ExplorerTreeViewItem create automation peers for them and return them for accessibility / automation
// get the TreeViewItem from the explorer element. // create an AutomationPeer for this TreeViewItem (will call OnCreateAutomationPeer) and add that to the list to return
None
parent
ExplorerTreeViewItem
None