InkRecognizer.Capabilities Property

Gets the capabilities of the recognizer.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:  https://schemas.microsoft.com/winfx/2006/xaml/presentation

Syntax

'Declaration
Public ReadOnly Property Capabilities As InkRecognizerCapabilities
'Usage
Dim instance As InkRecognizer
Dim value As InkRecognizerCapabilities

value = instance.Capabilities
public InkRecognizerCapabilities Capabilities { get; }
public:
property InkRecognizerCapabilities Capabilities {
    InkRecognizerCapabilities get ();
}
/** @property */
public InkRecognizerCapabilities get_Capabilities ()
public function get Capabilities () : InkRecognizerCapabilities
Not applicable.

Property Value

A bitwise combination of the InkRecognizerCapabilities values.

Remarks

This value is constant for each InkRecognizer.

Example

The following example defines a method that returns a string. The string contains information about a specified InkRecognizer. Not shown in this example is the helper method ListCapabilities, which uses reflection to return information about the capabilities of the InkRecognizer.

' <summary>
' Generates a string containing information about the specified InkRecognizer.
' </summary>
' <param name="theInkRecognizer">
' The InkRecognizer from which to gather the information.
' </param>
' <returns>
' A string containing information about the specified InkRecognizer.
' </returns>
Private Function GetInkRecognizerData(ByVal theInkRecognizer As InkRecognizer) As String
    ' Create a StringBuilder in which to collect the information.
    Dim result As New System.Text.StringBuilder()

    ' Add the name of the recognizer.
    result.AppendLine(String.Format("Name: {0}", theInkRecognizer.Name))

    ' Add the GUID of the recognizer.
    result.AppendLine(String.Format("   Guid: {0}", theInkRecognizer.Guid))

    ' Add the vendor of the recognizer.
    result.AppendLine(String.Format("   Vendor: {0}", theInkRecognizer.Vendor))

    ' Add the languages the recognizer supports.
    result.AppendLine("   Supports the following languages:")
    If 0 = theInkRecognizer.GetLanguages().Length Then
        result.AppendLine("      No languages supported.")
    Else
        Dim lcid As Integer
        For Each lcid In theInkRecognizer.GetLanguages()
            Dim theCultureInfo As New System.Globalization.CultureInfo(lcid)
            result.AppendLine(String.Format("      0x{0:x4}: {1}", lcid, theCultureInfo.EnglishName))
        Next lcid
    End If

    ' Add the capabilities of the recognizer.
    result.AppendLine(String.Format("   Capabilities: 0x{0:x}", theInkRecognizer.Capabilities))

    ' List each capability separately, using a helper method.
    result.Append(Me.ListCapabilities(theInkRecognizer.Capabilities))

    result.AppendLine(String.Format("      {0} properties supported.", _
        theInkRecognizer.GetSupportedProperties().Length.ToString()))

    Return result.ToString()

End Function 'GetInkRecognizerData
/// <summary>
/// Generates a string containing information about the specified InkRecognizer.
/// </summary>
/// <param name="theInkRecognizer">
/// The InkRecognizer from which to gather the information.
/// </param>
/// <returns>
/// A string containing information about the specified InkRecognizer.
/// </returns>
private string GetInkRecognizerData(
    InkRecognizer theInkRecognizer)
{
    // Create a StringBuilder in which to collect the information.
    System.Text.StringBuilder result = new System.Text.StringBuilder();

    // Add the name of the recognizer.
    result.AppendLine(string.Format(
        "Name: {0}", theInkRecognizer.Name));

    // Add the GUID of the recognizer.
    result.AppendLine(string.Format(
        "   Guid: {0}", theInkRecognizer.Guid));

    // Add the vendor of the recognizer.
    result.AppendLine(string.Format(
        "   Vendor: {0}", theInkRecognizer.Vendor));

    // Add the languages the recognizer supports.
    result.AppendLine("   Supports the following languages:");
    if (0 == theInkRecognizer.GetLanguages().Length)
    {
        result.AppendLine("      No languages supported.");
    }
    else
    {
        foreach (int lcid in theInkRecognizer.GetLanguages())
        {
            System.Globalization.CultureInfo theCultureInfo =
                new System.Globalization.CultureInfo(lcid);
            result.AppendLine(string.Format(
                "      0x{0:x4}: {1}", lcid, theCultureInfo.EnglishName));
        }
    }

    // Add the capabilities of the recognizer.
    result.AppendLine(string.Format(
        "   Capabilities: 0x{0:x}", theInkRecognizer.Capabilities));

    // List each capability separately, using a helper method.
    result.Append(this.ListCapabilities(theInkRecognizer.Capabilities));

    result.AppendLine(string.Format("      {0} properties supported.", 
        theInkRecognizer.GetSupportedProperties().Length.ToString()));

    return result.ToString();
}

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

InkRecognizer Class
InkRecognizer Members
System.Windows.Ink Namespace
InkRecognizerCollection.GetPriorityInkRecognizer
System.Windows.Ink.InkRecognizerCapabilities