public static void Add(this IComponentTree tree, ITvContainer container) { var layoutManager = tree.Layouts() as LayoutManager; layoutManager.Add(container); tree.Add(container.AsComponent()); }
public static bool Remove(this IComponentTree tree, ITvContainer container) { var removed = tree.Remove(container.AsComponent()); if (removed) { var layoutManager = tree.Layouts() as LayoutManager; layoutManager.Remove(container); } return(removed); }