다음을 통해 공유


Recognizer.Languages Property

Recognizer.Languages Property

Gets an array of language identifiers for the languages that the Recognizer object supports.

Definition

Visual Basic .NET Public ReadOnly Property Languages As Short()
C# public short[] Languages { get; }
Managed C++ public: __property short* get_Languages();

Property Value

System.Int16[]. The language identifiers for the languages that the Recognizer object supports.

This property is read-only. This property has no default value.

Remarks

This property can be used to search the Recognizers collection for a Recognizer object that supports a specific language.

This property returns the empty array for object and gesture recognizers.

Examples

[C#]

This C# example determines if the Recognizer object, theRecognizer, supports the Japanese language.

using Microsoft.Ink;
// . . .
bool isJapaneseSupported = false;
short[] theLanguages = theRecognizer.Languages;
for (int k = 0; k < theLanguages.Length; k++)
{
    // Hex 411 is the LCID Constant for Japanese
    if (theLanguages[k] == 0x0411)
        isJapaneseSupported = true;
}

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example determines if the Recognizer object, theRecognizer, supports the Japanese language.

Imports Microsoft.Ink
' . . .
Dim isJapaneseSupported As Boolean = False
Dim theLanguages () As Short
theLanguages = theRecognizer.Languages
Dim k As Integer
For k = 0 To theLanguages.Length - 1
    ' Hex 411 is the LCID Constant for Japanese
    If theLanguages(k) = &H411 Then
        IsJapaneseSupported = True
    End If
Next

See Also