Condividi tramite


CustomStrokes Class

CustomStrokes Class

Contains a collection of user-defined Strokes collections.

Definition

Visual Basic .NET Public Class CustomStrokes
Inherits Object
Implements ICollection, IEnumerable
C# public class CustomStrokes : Object,
ICollection, IEnumerable
Managed C++ public __gc class CustomStrokes : public Object,
ICollection, IEnumerable

Members Table

The following table lists the members exposed by the object.

Methods

Method Description
Add Adds a Strokes collection to the CustomStrokes collection.
Clear Clears all the Strokes collections from the CustomStrokes collection.
CopyTo Copies all of the elements of the current CustomStrokes collection to the specified one-dimensional array, starting at the specified destination array index.
Equals Leave Site Determines whether two Object Leave Site instances are equal. Inherited from Object Leave Site.
Finalize Leave Site Allows an Object Leave Site to attempt to free resources and perform other cleanup operations before the Object Leave Site is reclaimed by garbage collection. Inherited from Object Leave Site.
get_Item Returns the Strokes object at the known index in a CustomStrokes collection.
GetEnumerator Returns an object that implements the System.Collections.IEnumerator Leave Site interface and that can iterate through the Stroke collections within the CustomStrokes collection.
GetHashCode Leave Site Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. Inherited from Object Leave Site.
GetType Leave Site Gets the Type Leave Site of the current instance. Inherited from Object Leave Site.
IEnumerable.GetEnumerator
MemberwiseClone Leave Site Creates a shallow copy of the current Object Leave Site. Inherited from Object Leave Site.
static (Shared in Visual Basic .NET)ReferenceEquals Leave Site Determines whether the specified Object Leave Site instances are the same instance. Inherited from Object Leave Site.
Remove Removes a Strokes collection from a CustomStrokes collection.
RemoveAt Removes a Strokes collection at the specified index of the CustomStrokes collection.
ToString Leave Site Returns a String Leave Site that represents the current Object Leave Site. Inherited from Object Leave Site.

Properties

Property Description
Count Gets the number of Strokes objects contained in the CustomStrokes collection.
IsFixedSize Gets a value indicating whether the CustomStrokes collection has a fixed size.
IsReadOnly Gets a value indicating whether the CustomStrokes collection is read-only.
IsSynchronized Gets a value that indicates whether or not access to the CustomStrokes collection is synchronized (thread safe).
Item Gets the Strokes collection at the specified index within the CustomStrokes collection.
SyncRoot Returns an object that can be used to synchronize access to the CustomStrokes collection.

Inheritance Hierarchy

Object Leave Site

CustomStrokes

Remarks

The custom strokes are essentially named Strokes collections that are persisted and recalled for later use.

You use a collection of custom strokes to store strokes that have the same meaning or that are related in some way. Examples of strokes that you may want to persist include:

  • All the strokes drawn by the same cursor (pen)
  • The strokes in an Ink object that correspond to a word or paragraph
  • All the strokes that intersect a known region

For example, suppose you want to draw with two different cursors and keep separate the set of strokes that you draw with each cursor. You could recognize the strokes drawn with the first cursor and attach a RecognitionResult object to that collection of strokes. To persist the recognition result, add the strokes to the CustomStrokes collection of the Ink object. You can later access the first collection of strokes by getting the persisted CustomStrokes collection from the Ink object.

Each CustomStrokes collection is referenced by name.

CustomStrokes collections are references to ink data, not the actual data itself.

Class Information

Namespace Microsoft.Ink
Assembly Microsoft.Ink (microsoft.ink.dll)
Strong Name Microsoft.Ink, Version=1.7.4009.0, Culture=neutral, PublicKeyToken=a2870d9cc4d021c8

See Also