VisualUIAVerify.Controls.AutomationElementTreeNode.FindChildNodeForAutomationElement C# (CSharp) Method

FindChildNodeForAutomationElement() public method

this method will find AutomatinElementTreeNode for automationElement in children collection
public FindChildNodeForAutomationElement ( AutomationElement automationElement ) : AutomationElementTreeNode
automationElement System.Windows.Automation.AutomationElement
return AutomationElementTreeNode
        public AutomationElementTreeNode FindChildNodeForAutomationElement(AutomationElement automationElement)
        {
            using (SynchronizationManager.Lock())
            {
                //if children has been polupated then find the element 
                if (this._childrenStatus == ChildrenElementsStatus.Populated)
                {
                    return FindChildNodeForAutomationElementInternal(automationElement);
                }
                //if not then return null
                return null;
            }
        }