Provides custom handling of the UIElement collection for a MetaPanel.
Inheritance: System.Windows.Controls.UIElementCollection
Esempio n. 1
0
        /// <summary>
        /// Create the collection used to hold child elements.
        /// </summary>
        /// <param name="logicalParent">The logical parent element of the collection to be created.</param>
        /// <returns>An ordered collection of elements that have the specified logical parent.</returns>
        protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
        {
            // Use overriden version of the collection that does not remove children from
            // the visual tree until they have finished being removed by optional animation.
            _children = new MetaElementCollection(this, logicalParent);
            _children.InternalIsItemsHost = IsItemsHost;

            // We need to know whenever an element is added or removed, to keep element state in sync
            _children.UIElementsAdded  += new EventHandler <UIElementsEventArgs>(OnUIElementsAdded);
            _children.UIElementsRemove += new EventHandler <UIElementsEventArgs>(OnUIElementsRemove);
            return(_children);
        }
        /// <summary>
        /// Create the collection used to hold child elements.
        /// </summary>
        /// <param name="logicalParent">The logical parent element of the collection to be created.</param>
        /// <returns>An ordered collection of elements that have the specified logical parent.</returns>
        protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
        {
            // Use overriden version of the collection that does not remove children from
            // the visual tree until they have finished being removed by optional animation.
            _children = new MetaElementCollection(this, logicalParent);
            _children.InternalIsItemsHost = IsItemsHost;

            // We need to know whenever an element is added or removed, to keep element state in sync
            _children.UIElementsAdded += new EventHandler<UIElementsEventArgs>(OnUIElementsAdded);
            _children.UIElementsRemove += new EventHandler<UIElementsEventArgs>(OnUIElementsRemove);
            return _children;
        }
 /// <summary>
 /// Initialize a new instance of the CompoundEnumerator class.
 /// </summary>
 /// <param name="collection">Reference to collection.</param>
 public CompoundEnumerator(MetaElementCollection collection)
 {
     _collection = collection;
     _index      = -1;
 }
 /// <summary>
 /// Initialize a new instance of the CompoundMetaElementCollection class.
 /// </summary>
 /// <param name="collection">Reference to collection.</param>
 public CompoundMetaElementCollection(MetaElementCollection collection)
 {
     _collection = collection;
 }
 /// <summary>
 /// Initialize a new instance of the CompoundEnumerator class.
 /// </summary>
 /// <param name="collection">Reference to collection.</param>
 public CompoundEnumerator(MetaElementCollection collection)
 {
     _collection = collection;
     _index = -1;
 }
 /// <summary>
 /// Initialize a new instance of the CompoundMetaElementCollection class.
 /// </summary>
 /// <param name="collection">Reference to collection.</param>
 public CompoundMetaElementCollection(MetaElementCollection collection)
 {
     _collection = collection;
 }