IXRPathSegmentCollection (Compact 2013)

3/28/2014

This class represents a collection of IXRPathSegment objects that can be accessed individually by index.

Syntax

class IXRPathSegmentCollection : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRPathSegmentCollection

Methods

Method

Description

IXRPathSegmentCollection::Add

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

IXRPathSegmentCollection::Clear

Removes all items from this collection.

IXRPathSegmentCollection::Contains

Determines whether an item is in this collection.

IXRPathSegmentCollection::GetCount

Retrieves the number of items in this collection.

IXRPathSegmentCollection::GetItem

Retrieves the item at the specified index in this collection.

IXRPathSegmentCollection::IndexOf

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

IXRPathSegmentCollection::Insert

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

IXRPathSegmentCollection::Remove

Removes the first occurrence of a specific item from this collection.

IXRPathSegmentCollection::RemoveAt

Removes the item at the specified index from this collection.

Thread Safety

Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

The IXRPathFigure class uses IXRPathSegmentCollection to store IXRPathSegment information. This collection describes the geometric segments that together define the geometry of an IXRPathFigure object.

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

You can also create a new collection. To do this, use the IXRApplication::CreateObject(IID,Object) method to create an empty IXRPathSegmentCollection object. Then, use CreateObject to create multiple IXRPathSegment objects that each represent the geometric segments that together define the geometry of an IXRPathFigure object. Next, add each IXRPathSegment object to the IXRPathSegmentCollection collection by calling the IXRPathSegmentCollection::Add method. And finally, set the new collection for an IXRPathFigure by calling IXRPathFigure::SetSegments.

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

You can also define a path-segment 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 the PathSegmentCollection Class on MSDN.

.NET Framework Equivalent

System.Windows.Media.PathSegmentCollection

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Collection Management
IXRPathFigure::GetSegments
IXRPathFigure::SetSegments