ComponentFactory.Quicksilver.Layout.MetaElementCollection.RemoveRange C# (CSharp) Method

RemoveRange() public method

Removes a range of elements from the collection.
public RemoveRange ( int index, int count ) : void
index int The index position of the element where removal begins.
count int The number of elements to remove.
return void
        public override void RemoveRange(int index, int count)
        {
            if (_isItemsHost)
                base.RemoveRange(index, count);
            else
            {
                VerifyWriteAccess();

                // Make a copy of all elements to be removed
                UIElement[] elements = new UIElement[count];
                for (int i = 0; i < count; i++)
                    elements[i] = this[index + i];

                // Remove them from the external collection
                _externalChildren.RemoveRange(index, count);

                // Instruct the visual parent it must measure with the change in state
                _visualParent.InvalidateMeasure();

                // Actual elements are removed from internal collection once removed animation completes
                OnUIElementsRemove(new UIElementsEventArgs(elements));
            }
        }