FlatRedBall.Gui.CollapseItem.RemoveSelfAndChildren C# (CSharp) Méthode

RemoveSelfAndChildren() public méthode

public RemoveSelfAndChildren ( ) : void
Résultat void
        public void RemoveSelfAndChildren()
        {
            for (int i = mItems.Count - 1; i > -1; i--)
                mItems[i].RemoveSelfAndChildren();

            if (parentItem == null)
            {
                if (null != mParentBox as ListBoxBase)
                    ((ListBoxBase)mParentBox).mItems.Remove(this);
            }
            else
            {
                parentItem.mItems.Remove(this);
                parentItem.FixCollapseIcon();

            }
        }

Usage Example

Exemple #1
0
        public CollapseItem RemoveItemAndChildren(CollapseItem itemToRemove)
        {
            if (itemToRemove != null)
            {
                itemToRemove.RemoveSelfAndChildren();
            }
            int numOfCollapsedItems = GetNumCollapsed();

            if (mStartAt + mScaleY - 1 > numOfCollapsedItems)
            {
                mStartAt = numOfCollapsedItems - (int)(mScaleY - 1);
            }
            if (mStartAt < 0)
            {
                mStartAt = 0;
            }
            AdjustScrollSize();
            return(itemToRemove);
        }
All Usage Examples Of FlatRedBall.Gui.CollapseItem::RemoveSelfAndChildren