Beispiel #1
0
 XamlTreeNode FindCorrespondingNode(XamlTreeNode node, Spencen.Mobile.Markup.XamlElement elem)
 {
     if (node.Element == elem)
     {
         return(node);
     }
     foreach (var c in node.Nodes)
     {
         var n1 = (XamlTreeNode)c;
         var r  = FindCorrespondingNode(n1, elem);
         if (r != null)
         {
             return(r);
         }
     }
     return(null);
 }
Beispiel #2
0
        XamlTreeNode PopulateNodes(Spencen.Mobile.Markup.XamlElement element)
        {
            if (element == null)
            {
                return(null);
            }

            var res = new XamlTreeNode(element.Name, element);

            foreach (var c in element.Children)
            {
                var r1 = PopulateNodes(c);
                res.Nodes.Add(r1);
            }

            return(res);
        }