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 function SetStrokeLanguageId(
strokeId : int,
languageId : int
)
Parameters
strokeId
Type: System.Int32The stroke identifier to which to assign the locale identifier.
languageId
Type: System.Int32The 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.
Examples
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 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
System.Windows.Ink.AnalysisCore Namespace