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

Add() public method

Adds the specified element to the collection.
public Add ( UIElement element ) : int
element UIElement The UIElement to add.
return int
        public override int Add(UIElement element)
        {
            if (_isItemsHost)
                return base.Add(element);
            else
            {
                ValidateElement(element);
                VerifyWriteAccess();

                // Add to the external list
                int index = _externalChildren.Count;
                _externalChildren.Add(element);

                // Add to internal logical/visual tree
                SetLogicalParent(element);
                _internalChildren.Add(element);

                // Instruct the visual parent it must measure with the new child element
                _visualParent.InvalidateMeasure();

                // Added event is always generated after the base call
                OnUIElementsAdded(new UIElementsEventArgs(element));

                return index;
            }
        }