Partager via


IXRStylusPointCollection (Compact 2013)

3/28/2014

This class represents a collection of related IXRStylusPoint objects.

Syntax

class IXRStylusPointCollection : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRStylusPointCollection

Methods

Method

Description

IXRStylusPointCollection::Add

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

IXRStylusPointCollection::Clear

Removes all items from this collection.

IXRStylusPointCollection::Contains

Determines whether an item is in this collection.

IXRStylusPointCollection::GetCount

Retrieves the number of items in this collection.

IXRStylusPointCollection::GetItem

Retrieves the item at the specified index in this collection.

IXRStylusPointCollection::IndexOf

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

IXRStylusPointCollection::Insert

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

IXRStylusPointCollection::Remove

Removes a specific item from this collection.

IXRStylusPointCollection::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 IXRStylusPointCollection contains the IXRStylusPoint objects that define the geometry of the IXRStroke object. The IXRStylusPointCollection provides access to the set of x,y coordinates that define the ink stroke drawn on the screen.

You can obtain a pointer to this collection by calling IXRStroke::GetStylusPoints, or by handling a mouse event and extracting its event data from the XRMouseEventArgs structure.

An IXRStylusPointCollection can belong to more than one IXRStroke object. However, the only way to do this is by retrieving an existing value by calling IXRStroke::GetStylusPoints and assigning it to another stroke object by calling IXRStroke::SetStylusPoints.

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

You can also define a stylus-point 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 StylusPointCollection Class on MSDN. However, it is unusual to populate an IXRInkPresenter with strokes and stylus points by using XAML; usually you start with a blank IXRStrokeCollection and capture strokes from user input into the collection with run-time code.

.NET Framework Equivalent

System.Windows.Input.StylusPointCollection

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Collection Management
IXRStroke::HitTest
IXRStroke::SetStylusPoints
IXRStroke::GetStylusPoints
IXRStrokeCollection::HitTest
XRMouseEventArgs