Share via


InkAnalyzerBase.SetStrokesType Method

Changes the type of the specified strokes.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public Sub SetStrokesType ( _
    strokeIds As Integer(), _
    strokeType As StrokeType _
)
'Usage
Dim instance As InkAnalyzerBase 
Dim strokeIds As Integer()
Dim strokeType As StrokeType

instance.SetStrokesType(strokeIds, strokeType)
public void SetStrokesType(
    int[] strokeIds,
    StrokeType strokeType
)
public:
void SetStrokesType(
    array<int>^ strokeIds, 
    StrokeType strokeType
)
public function SetStrokesType(
    strokeIds : int[], 
    strokeType : StrokeType
)

Parameters

  • strokeIds
    Type: array<System.Int32[]

    An array containing the stroke identifiers of the strokes to which to assign strokeType.

Remarks

If a stroke's type is the StrokeType value of Unspecified, the ink analyzer classifies the stroke during ink analysis. Otherwise, the analyzer uses the type set on the stroke.

The ink analyzer does not set the stroke type value as part of ink analysis. To get the type currently assigned to a stroke, call GetStrokeType.

If a stroke is associated with a context node that is not an unclassified ink node, this method moves the stroke to an unclassified ink node that contains strokes of the same language. If no such context node exists, this method creates a new unclassified ink node and adds the stroke to it. An unclassified ink node is a ContextNodeBase that has a Type property value of UnclassifiedInk.

If this method moves a stroke, this method also adds the stroke's bounding box to the ink analyzer's DirtyRegion.

This method does not move a stroke if the strokeType parameter matches the stroke's current type.

If a stroke identified in strokeIds is not associated with the ink analyzer, this method ignores the identifier.

If none of the strokes identified in strokeIds identify a stroke associated with the ink analyzer, this method returns without updating the ink analyzer.

This method throws a System.ArgumentNullException when strokeIds is nulla null reference (Nothing in Visual Basic).

Examples

The following example sets the stroke type to the StrokeType value Writing and the stroke locale to French for all the strokes in the specified node. The InkAnalyzerBase, theInkAnalyzerBase, contains the specified ContextNodeBase, theNode.

' For all strokes in the specified node or one of its descendants, 
' set the stroke type to Writing and the stroke locale to French. 
Dim theStrokeIds As Integer() = theNode.GetStrokeIds()
If 0 < theStrokeIds.Length Then
    theInkAnalyzerBase.SetStrokesType( _
        theStrokeIds, System.Windows.Ink.AnalysisCore.StrokeType.Writing)
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, &H40C)
End If
// For all strokes in the specified node or one of its descendants, 
// set the stroke type to Writing and the stroke locale to French. 
int[] theStrokeIds = theNode.GetStrokeIds();
if (0 < theStrokeIds.Length)
{
    theInkAnalyzerBase.SetStrokesType(theStrokeIds,
        System.Windows.Ink.AnalysisCore.StrokeType.Writing);
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, 0x040c);
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzerBase Class

InkAnalyzerBase Members

System.Windows.Ink.AnalysisCore Namespace

InkAnalyzerBase.GetStrokeType

InkAnalyzerBase.SetStrokeType

System.Windows.Ink.AnalysisCore.StrokeType