Пример #1
0
        public virtual void Add(HierarchicalBaseViewModel child)
        {
            if (child.Parent != null)
            {
                child.Parent.Remove(child);
            }

            child.Parent = this;

            if (!Children.Contains(child))
            {
                Children.AddOnDispatcher(child);
            }

            Children.SortBy(c => c);
        }
Пример #2
0
 public virtual void Remove(HierarchicalBaseViewModel child)
 {
     child.Parent = null;
     Children.RemoveOnDispatcher(child);
 }