Edit

How the Tablet PC Platform Uses Context

Developers creating applications for the Tablet PC are able to take advantage of input scope and context information. The best possible solutions for setting context information on controls in applications depend on whether the control is ink enabled and whether the application has been released to market. An ink-enabled control is one that has been specifically designed for ink input and in which the ink data is primarily collected and persisted as ink. Examples of ink-enabled applications are Microsoft Windows Journal or a sketching program. In a control that is not ink enabled, input data is collected and persisted as text, typically by using Tablet PC Input Panel when the application is run on a Tablet PC. The solutions for enabling context information within controls are:

  • The SetInputScope APIs: A low-level programmatic solution for non ink-enabled applications and controls. The binaries for the application are impacted and must be redistributed.
  • The RecognizerContext object's Factoid and WordList properties: A programmatic solution for applications with controls that are ink enabled. The binaries for the application are impacted and must be redistributed.

The Tablet PC Input Panel has been updated starting with Windows Vista to take advantage of context information that you provide when using the SetInputScope APIs. The following table provides details on which Microsoft recognition engines support which input scopes. An "X" in the row for an input scope indicates the recognizer in that column supports the input scope.

Property Name English (United States) English (United Kingdom) German French Japanese Korean Chinese (Simplified) Chinese (Traditional)
IS_ADDRESS_FULLPOSTALADDRESS
X
X
X
X
-
-
-
-
IS_ADDRESS_POSTALCODE
X
X
X
X
-
-
-
-
IS_ADDRESS_STREET
X
X
X
X
-
-
-
-
IS_ADDRESS_STATEORPROVINCE
X
-
-
-
-
-
-
-
IS_ADDRESS_CITY
X
X
X
X
-
-
-
-
IS_ADDRESS_COUNTRYNAME
X
X
X
X
-
-
-
-
IS_ADDRESS_COUNTRYSHORTNAME
X
X
X
X
-
-
-
-
IS_CURRENCY_AMOUNTANDSYMBOL
X
X
X
X
-
-
-
-
IS_CURRENCY_AMOUNT
X
X
X
X
-
-
-
-
IS_DATE_FULLDATE
X
X
X
X
-
-
-
-
IS_DATE_MONTH
X
X
X
X
-
-
-
-
IS_DATE_DAY
X
X
X
X
-
-
-
-
IS_DATE_YEAR
X
X
X
X
-
-
-
-
IS_DATE_MONTHNAME
X
X
X
X
-
-
-
-
IS_DATE_DAYNAME
X
X
X
X
-
-
-
-
IS_DEFAULT
X
X
X
X
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-
-
-
-

When using the SetInputScope APIs or the RecognizerContext object's Factoid property to set context, attempting to set an input scope for a language that is not supported by that language's recognizer causes Tablet PC Input Panel to use the default language model as the context for the control. For example, the IS_ADDRESS_STATEORPROVINCE input scope is not supported by the French recognizer. If you set context on a field as

(!IS_ADDRESS_STATEORPROVINCE)|(!IS_ADDRESS_POSTALCODE)

when using the French recognizer, the resulting context is the default language model. To prevent this problem, detect the language of the recognizer in use and set input scopes accordingly.

InputScope Enumeration