Class ItemContainerElement<T>
Represents a container element that manages a collection of items of
type T.
public class ItemContainerElement<T> : HostedFrameworkElement, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, IComponent, IDisposable, ICollectionObserver<object> where T : FrameworkElement
Type Parameters
TThe type of items contained in the collection. Must derive from FrameworkElement.
- Inheritance
-
ItemContainerElement<T>
- Implements
- Derived
Remarks
This class provides functionality to manage a collection of items, including querying, observing, and accessing child elements. It supports operations such as retrieving items by tag and exposing logical and content elements for the hosted framework.
Properties
- ContentElements
Returns a collection of content elements which is used by the UIXML loader to find content items by index.
- HasItems
Gets a value indicating whether the collection contains any items.
- Items
Gets the collection of items in the current instance.
- ItemsAllocated
Gets a value indicating whether items have been allocated.
Methods
- Add(T)
Adds the specified item to the collection of items.
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.
- FindItemWithTag(object?, FindItemFlags)
Searches for an item whose Tag matches the specified value.
- ItemByName(string)
Retrieves an item from the collection by its name.
- OnItemInserted(object?, int, T)
Invoked after an item has been inserted into the collection.
- OnItemRemoved(object?, int, T)
Invoked when an item is removed from the collection.