Share via


InkAnalyzerBase.SetStrokeLanguageId Method

Changes the locale identifier for the specified stroke.

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

Syntax

'Declaration
Public Sub SetStrokeLanguageId ( _
    strokeId As Integer, _
    languageId As Integer _
)
'Usage
Dim instance As InkAnalyzerBase
Dim strokeId As Integer
Dim languageId As Integer

instance.SetStrokeLanguageId(strokeId, languageId)
public void SetStrokeLanguageId (
    int strokeId,
    int languageId
)
public:
void SetStrokeLanguageId (
    int strokeId, 
    int languageId
)
public void SetStrokeLanguageId (
    int strokeId, 
    int languageId
)
public function SetStrokeLanguageId (
    strokeId : int, 
    languageId : int
)
Not applicable.

Parameters

  • strokeId
    The stroke identifier to which to assign the locale identifier.
  • languageId
    The language identifier to assign to specified stroke.

Remarks

A stroke's locale is set when you add the stroke by calling AddStroke or AddStrokes. To get the locale currently assigned to a stroke, call GetStrokeLanguageId.

The specified stroke is moved 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 ContextNodeTypeBase.UnclassifiedInk.

If this method moves a stroke from a context node that is not an unclassified ink node, this method also adds the stroke's bounding box to the ink analyzer's DirtyRegion.

This method does not move a stroke if the languageId parameter matches the stroke's current language identifier.

If the specified stroke is not associated with the ink analyzer, this method returns without updating the ink analyzer.

Example

The following example checks the locale identifier of a specified stroke and sets it to Japanese if it is not already set to Japanese. The InkAnalyzerBase, theInkAnalyzerBase, contains stroke data for the stroke identifier, theStrokeId.

' If the specified stroke is not set to Japanese, 0x0011,
' Set the stroke's locale to Japanese.
Dim languageId As Integer = _
    theInkAnalyzerBase.GetStrokeLanguageId(theStrokeId)
If &H11 <> languageId Then
    theInkAnalyzerBase.SetStrokeLanguageId(theStrokeId, &H11)
End If
// If the specified stroke is not set to Japanese, 0x0011,
// Set the stroke's locale to Japanese.
int languageId = theInkAnalyzerBase.GetStrokeLanguageId(theStrokeId);
if (0x0011 != languageId)
{
    theInkAnalyzerBase.SetStrokeLanguageId(theStrokeId, 0x0011);
}

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzerBase Class
InkAnalyzerBase Members
System.Windows.Ink.AnalysisCore Namespace
System.Windows.Ink.AnalysisCore.InkAnalyzerBase.AddStroke
System.Windows.Ink.AnalysisCore.InkAnalyzerBase.AddStrokes
InkAnalyzerBase.GetStrokeLanguageId
InkAnalyzerBase.SetStrokesLanguageId