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); }
protected VisualTreeItem(object target, VisualTreeItem parent) { if (target == null) { throw new ArgumentNullException("target"); } Target = target; _parent = parent; if (parent != null) { _depth = parent._depth + 1; } }
protected VisualTreeItem(object target, VisualTreeItem parent) { if (target == null) { throw new ArgumentNullException(nameof(target)); } Target = target; Parent = parent; if (parent != null) { Depth = parent.Depth + 1; } }
public ApplicationTreeItem(Application application, VisualTreeItem parent) : base(application, parent) { _application = application; }
protected void RemoveChild(VisualTreeItem item) { item.IsSelected = false; Children.Remove(item); }
public VisualItem(Visual visual, VisualTreeItem parent) : base(visual, parent) { Visual = visual; }
public ResourceContainerItem(object target, VisualTreeItem parent) : base(target, parent) { }
public ResourceItem(object target, object key, VisualTreeItem parent) : base(target, parent) { _key = key; }
public ResourceDictionaryItem(ResourceDictionary dictionary, VisualTreeItem parent) : base(dictionary, parent) { _dictionary = dictionary; }
public FormsTreeItem(Control control, VisualTreeItem parent) : base(control, parent) { Control = control; }