This documentation is archived and is not being maintained.

InkAnalyzer.SetStrokeType Method

Changes the stroke type of a Stroke.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

public void SetStrokeType(
	Stroke stroke,
	StrokeType strokeType


Type: Microsoft.Ink.Stroke

The stroke to which to assign strokeType.

Type: Microsoft.Ink.StrokeType

The stroke type to assign to the strokes in strokes.

If the stroke's type is the Microsoft.Ink.StrokeType value Unspecified, then the InkAnalyzer classifies the stroke during ink analysis. Otherwise, the InkAnalyzer uses the type set on the stroke.

To get the type currently assigned to a stroke, call InkAnalyzer.GetStrokeType.

This example assigns the StrokeType value, theStrokeType, to all of the strokes in the ContextNode, theContextNode, associated with the InkAnalyzer, theInkAnalyzer.

// Iterate through the strokes within the context node and update 
// the stroke type of those strokes. 
foreach (Microsoft.Ink.Stroke theStroke in theContextNode.Strokes)
    theInkAnalyzer.SetStrokeType(theStroke, theStrokeType);

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.0