IXRCollection<In_T, Out_T> (Windows Embedded CE 6.0)
1/6/2010
This template class provides the base class for a generic collection of items.
Syntax
template <typename In_T, typename Out_T>
class IXRCollection : public IXRDependencyObject
Methods
Method | Description |
---|---|
Adds an item to the end of this collection and retrieves the index of where it was added. |
|
Removes all items from this collection. |
|
Determines whether an item is in this collection. |
|
Retrieves the number of items in this collection. |
|
Retrieves the item at the specified index in this collection. |
|
Searches for the specified item and retrieves the zero-based index of its first occurrence within this collection. |
|
Inserts an item into this collection at the location that has the specified index value. |
|
Removes the first occurrence of a specific item from this collection. |
|
Removes the item at the specified index from this collection. |
Type Parameters
- In_T
Type constraint for type safety of input parameters in the constrained collection implementation.
- Out_T
Type constraint for type safety of output parameters in the constrained collection implementation.
Remarks
This base class is used by Silverlight to provide derived collection classes for all kinds of items, including the following:
- Collections of dependency objects
- Collections of UI elements
- Collections of row definitions and column definitions
- Collections of dynamic transform animations
Each derived collection class provides the same set of inherited methods that are defined in IXRCollection. However, the parameters for input and output are part of a template and can change their type depending on the kind of items contained in each constructed collection. Therefore, while each derived method is essentially the same in each derived class, the defined type for the parameters in each method is flexible and depends on the collection type. This flexible parameter type is expressed in method definitions by using the notation In_T
and Out_T
.
Items in this collection can be accessed by using an integer index. Indexes in this collection are zero-based.
Note
This base class is provided to make it easier for implementers to create a custom collection. Implementers are encouraged to extend this base class instead of creating their own collection class. This is because this base class provides functionality that is tailored to objects that are stored in the visual tree. In addition, you can derive your own collection type from any of the constructed collection types in Silverlight.
Inheritance Hierarchy
IXRCollection
**** IXRDoubleCollection
.NET Framework Equivalent
System.Windows.PresentationFrameworkCollection(T)
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |