public DOMNodeViewModel(Object nodeElement, String nodeName = "document", DOMNodeViewModel nodeParent = null)
        {
            element  = nodeElement;
            parent   = nodeParent;
            children = new ObservableCollection <DOMNodeViewModel>();
            name     = nodeName;

            if (nodeElement == null)
            {
                populated = true;
                typeName  = "<null>";
            }
            else if (nodeParent == null)
            {
                CreateChildren();
                IsExpanded = true;
                IsSelected = true;
            }
        }
Example #2
0
        public DOMNodeViewModel(Object nodeElement, String nodeName = "document", DOMNodeViewModel nodeParent = null)
        {
            element = nodeElement;
            parent = nodeParent;
            children = new ObservableCollection<DOMNodeViewModel>();
            name = nodeName;

            if (nodeElement == null)
            {
                populated = true;
                typeName = "<null>";
            }
            else if (nodeParent == null)
            {
                CreateChildren();
                IsExpanded = true;
                IsSelected = true;
            }
        }
Example #3
0
 protected override async Task Use(Uri url, HTMLDocument document, CancellationToken cancel)
 {
     Status = "Constructing the DOM ...";
     Root   = new DOMNodeViewModel(document);
     await Task.Yield();
 }
 protected override async Task Use(Uri url, HTMLDocument document, CancellationToken cancel)
 {
     Status = "Constructing the DOM ...";
     Root = new DOMNodeViewModel(document);
     await Task.Yield();
 }