コード例 #1
0
        internal static NodeView Search(this NodeView nodeView, IViewWrapper view)
        {
            if (nodeView.Wrapper != null && nodeView.Wrapper.NativeObject == view.NativeObject)
            {
                return(nodeView);
            }

            if (nodeView.ChildCount == 0)
            {
                return(null);
            }

            for (int i = 0; i < nodeView.ChildCount; i++)
            {
                var node  = (NodeView)nodeView.GetChild(i);
                var found = Search(node, view);
                if (found != null)
                {
                    return(found);
                }
            }
            return(null);
        }