コード例 #1
0
        public static void Add(this IComponentTree componentTree, ITvControl control)
        {
            var metadata = componentTree.Add(control.AsComponent());
            var ctree    = componentTree.RootControls() as ControlsTree;

            ctree.Add(control.Metadata);
        }
コード例 #2
0
        public static void InsertAfter(this IComponentTree componentTree, ITvControl control, int position)
        {
            var metadata = componentTree.Add(control.AsComponent());
            var ctree    = componentTree.RootControls() as ControlsTree;

            ctree.InsertAfter(control.Metadata, position);
        }
コード例 #3
0
        public static bool Remove(this IComponentTree componentTree, ITvControl control)
        {
            var removed = componentTree.Remove(control.AsComponent());

            if (removed)
            {
                var ctree = componentTree.RootControls() as ControlsTree;
                ctree.Remove(control.Metadata);
            }

            return(removed);
        }