Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="child"></param>
        public void Remove(UTreeViewItem item)
        {
            UTreeViewItemImp imp = item as UTreeViewItemImp;

            RemoveFromSelectedList(imp);

            if (_children.Contains(imp))
            {
                _children.Remove(imp);
            }
            else
            {
                foreach (UTreeViewItemImp child in _children)
                {
                    if (child.Remove(imp))
                    {
                        break;
                    }
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 /// <param name="parent"></param>
 protected UTreeViewItem(string text, UTreeViewItem parent = null)
 {
     _text   = text;
     _parent = parent;
     _depth  = (_parent == null) ? 0 : _parent._depth + 1;
 }