返回指定 Stroke 的区域设置标识符。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Function GetStrokeLanguageId ( _
stroke As Stroke _
) As Integer
用法
Dim instance As InkAnalyzer
Dim stroke As Stroke
Dim returnValue As Integer
returnValue = instance.GetStrokeLanguageId(stroke)
public int GetStrokeLanguageId(
Stroke stroke
)
public:
int GetStrokeLanguageId(
Stroke^ stroke
)
public int GetStrokeLanguageId(
Stroke stroke
)
public function GetStrokeLanguageId(
stroke : Stroke
) : int
参数
- stroke
类型:System.Windows.Ink.Stroke
与区域设置标识符关联的笔画。
返回值
类型:System.Int32
stroke 的区域设置标识符。
备注
笔画的区域设置是在通过调用 AddStroke 或 AddStrokes 添加笔画时设置的。若要更改笔画的区域设置,请调用 SetStrokeLanguageId()。
示例
此示例定义 GetLanguagesInNode 方法,用于返回 ContextNode 中的笔画的所有区域设置标识符。
' Iterate through the strokes within the context node and add the locale
' identifiers to a collection.
Dim theLanguages As New System.Collections.ArrayList()
Dim theStroke As Stroke
For Each theStroke In theContextNode.Strokes
Dim theStrokeLanguage As Integer = theInkAnalyzer.GetStrokeLanguageId(theStroke)
If Not theLanguages.Contains(theStrokeLanguage) Then
theLanguages.Add(theStrokeLanguage)
End If
Next theStroke
// Iterate through the strokes within the context node and add the locale
// identifiers to a collection.
System.Collections.ArrayList theLanguages =
new System.Collections.ArrayList();
foreach (Stroke theStroke in theContextNode.Strokes)
{
int theStrokeLanguage =
theInkAnalyzer.GetStrokeLanguageId(theStroke);
if (!theLanguages.Contains(theStrokeLanguage))
{
theLanguages.Add(theStrokeLanguage);
}
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0