Partager via


IXRItemCollection (Windows Embedded CE 6.0)

1/6/2010

This class holds the list of items that together form the content of an IXRItemsControl.

Syntax

class IXRItemCollection : public IXRCollection<IXRDependencyObject*, IXRDependencyObject*>

Methods

IXRItemCollection inherits the methods from the template class IXRCollection<In_T, Out_T>. It uses In_T parameters of type IXRDependencyObject* and uses Out_T parameters of type IXRDependencyObject*.

Remarks

IXRItemCollection provides the collection support for IXRItemsControl::GetItems.

You can obtain a pointer to this collection by calling IXRItemsControl::GetItems. Then, you can use the methods inherited from IXRCollection<In_T, Out_T> to add items, remove items, or retrieve items. You can also clear the complete collection by calling the inherited method IXRCollection<In_T, Out_T>::Clear.

You can support multiple kinds of IXRDependencyObject-derived objects in an IXRItemCollection. For example, if you call the GetItems method from either of the IXRItemsControl-inherited classes IXRListBox or IXRComboBox, the object type stored by this collection can be either an IXRListBoxItem object or an IXRComboBoxItem object. The object type can also be any IXRDependencyObject-derived object that you want to put in a list for the user to scroll and select, including IXRShape derived objects, IXRTextBlock objects, or IXRBitmapImage objects.

You can define an item collection in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this collection in the source XAML for your application, see this Microsoft Web site.

The XAML implicit collection syntax shows how to populate items in the source XAML for the IXRItemCollection returned by IXRItemsControl::GetItems.

Note

ItemsControl.Items is not supported for use as an attached property.

Inheritance Hierarchy

IXRDependencyObject

    IXRCollection<In_T, Out_T>

        IXRItemCollection

.NET Framework Equivalent

System.Windows.Controls.ItemCollection

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for Collection Management