IXRRowDefinitionCollection (Compact 2013)

3/28/2014

This class provides access to a strongly typed collection of IXRRowDefinition objects.

Syntax

class IXRRowDefinitionCollection : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRRowDefinitionCollection

Methods

Method

Description

IXRRowDefinitionCollection::Add

Adds an item to the end of this collection and retrieves the index of where it was added.

IXRRowDefinitionCollection::Clear

Removes all items from this collection.

IXRRowDefinitionCollection::Contains

Determines whether an item is in this collection.

IXRRowDefinitionCollection::GetCount

Retrieves the number of items in this collection.

IXRRowDefinitionCollection::GetItem

Retrieves the item at the specified index in this collection.

IXRRowDefinitionCollection::IndexOf

Searches for the specified item and retrieves the zero-based index of its last occurrence in this collection.

IXRRowDefinitionCollection::Insert

Inserts an item into this collection at the location that has the specified index value.

IXRRowDefinitionCollection::Remove

Removes a specific item from this collection.

IXRRowDefinitionCollection::RemoveAt

Removes the item at the specified index from this collection.

Thread Safety

For the best performance, use members of this class on a single thread. If you must access objects on multiple threads, you must also protect the objects using synchronization primitives such as lock, mutex, and semaphore.

If necessary, when creating your visual host and prior to using members of this class, you can call IXRApplication::CreateHostFromXaml and supply it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true. This instructs XAML for Windows Embedded to keep the entire application thread safe on your behalf. However, this practice can have undesirable performance side effects because the UI thread might be blocked by work going on in a background thread.

Remarks

If you create a new IXRRowDefinition object in C++ code by using IXRApplication::CreateObject(IID,Object), you must insert it into the visual tree by adding it to an IXRRowDefinitionCollection in the visual tree.

To obtain a pointer to this collection, call IXRGrid::GetRowDefinitions. Then, use the methods of this class to add, remove, or retrieve items. To clear the complete collection, call the IXRRowDefinitionCollection::Clear method.

When you create a class instance, use an IXRRowDefinitionCollectionPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can define a row-definition collection in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this collection in the source XAML for your application, see Grid.RowDefinitions Property on MSDN.

The XAML implicit collection syntax shows how to populate items in the IXRRowDefinitionCollection that the Grid.RowDefinitions property holds.

.NET Framework Equivalent

System.Windows.Controls.RowDefinitionCollection

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Collection Management
IXRGrid::GetRowDefinitions