Esempio n. 1
0
        public IDomElement <TDependencyObject, TDependencyProperty> GetDomElement(TDependencyObject obj)
        {
            if (obj == null)
            {
                return(null);
            }

            if (TryGetDomElement(obj, out var domElement))
            {
                return(domElement);
            }

            domElement = CreateTreeNode(obj);

            dependencyPropertyService.SetDomElement(obj, domElement);

            return(domElement);
        }
Esempio n. 2
0
        public IDomElement <TDependencyObject, TDependencyProperty> GetDomElement(TDependencyObject obj)
        {
            if (obj == null)
            {
                return(null);
            }

            var cached = GetFromDependencyObject(obj);

            if (cached != null)
            {
                return(cached);
            }

            cached = CreateTreeNode(obj);
            dependencyPropertyService.SetDomElement(obj, cached);

            return(cached);
        }