Example #1
0
        public static VisualTreeItem Construct(object target, VisualTreeItem parent)
        {
            VisualTreeItem visualTreeItem;

            if (target is IReflectionHelperInterfaceWrapper)
            {
                visualTreeItem = new VisualItem(((IReflectionHelperInterfaceWrapper)target).Source, parent);
            }
            else if (target.Wrap <IFrameworkRenderElementContext>() != null)
            {
                visualTreeItem = new VisualItem(target, parent);
            }
            else if (target is Visual)
            {
                visualTreeItem = new VisualItem((Visual)target, parent);
            }
            else if (target is ResourceDictionary)
            {
                visualTreeItem = new ResourceDictionaryItem((ResourceDictionary)target, parent);
            }
            else if (target is Application)
            {
                visualTreeItem = new ApplicationTreeItem((Application)target, parent);
            }
            else
            {
                visualTreeItem = new DumbVisualTreeItem(target, parent);
            }
            //visualTreeItem = new VisualTreeItem(target, parent);

            visualTreeItem.Reload();

            return(visualTreeItem);
        }
Example #2
0
        public static VisualTreeItem Construct(object target, VisualTreeItem parent)
        {
            VisualTreeItem visualTreeItem;

            if (target is Visual)
            {
                visualTreeItem = new VisualItem((Visual)target, parent);
            }
            else if (target is ResourceDictionary)
            {
                visualTreeItem = new ResourceDictionaryItem((ResourceDictionary)target, parent);
            }
            else if (target is Application)
            {
                visualTreeItem = new ApplicationTreeItem((Application)target, parent);
            }
            else
            {
                visualTreeItem = new VisualTreeItem(target, parent);
            }

            visualTreeItem.Reload();

            return(visualTreeItem);
        }
Example #3
0
        public static VisualTreeItem Construct(object target, VisualTreeItem parent)
        {
            VisualTreeItem visualTreeItem;

            if (DXMethods.IsFrameworkRenderElementContext(target))
            {
                visualTreeItem = new VisualItem(target, parent);
            }
            else if (target is Visual)
            {
                visualTreeItem = new VisualItem((Visual)target, parent);
            }
            else if (target is ResourceDictionary)
            {
                visualTreeItem = new ResourceDictionaryItem((ResourceDictionary)target, parent);
            }
            else if (target is Application)
            {
                visualTreeItem = new ApplicationTreeItem((Application)target, parent);
            }
            else
            {
                visualTreeItem = new VisualTreeItem(target, parent);
            }

            visualTreeItem.Reload();

            return(visualTreeItem);
        }
Example #4
0
		public static VisualTreeItem Construct(object target, VisualTreeItem parent)
		{
			VisualTreeItem visualTreeItem;

			if (target is Visual)
				visualTreeItem = new VisualItem((Visual)target, parent);
			else if (target is ResourceDictionary)
				visualTreeItem = new ResourceDictionaryItem((ResourceDictionary)target, parent);
			else if (target is Application)
				visualTreeItem = new ApplicationTreeItem((Application)target, parent);
			else
				visualTreeItem = new VisualTreeItem(target, parent);

			visualTreeItem.Reload();

			return visualTreeItem;
		}