How the Tablet PC Platform Uses Context

How the Tablet PC Platform Uses Context

Description of how the Tablet PC Platform uses context information on controls in applications.

With the release of Microsoft® Windows® XP Tablet PC Edition with Windows XP Service Pack 2 (SP2), developers creating applications for the Tablet PC are able to take advantage of input scope and context information. There are now three possible solutions for setting context information on controls in applications, depending 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 the Tablet PC Input Panel when the application is run on a Tablet PC. The three solutions for enabling context information within controls are:

  • The Context Tagging Tool: A non-programmatic solution that supports applications and controls that are not ink-enabled. The binaries for the application are not impacted and do not need to be redistributed.
  • The SetInputScope APIs: A low-level programmatic solution for applications and controls that are not ink-enabled. 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 in Windows XP Tablet PC Edition with Windows XP SP2 to leverage context information that you provide when using either the Context Tagging tool or the SetInputScope APIs. For more information about the SetInputScope APIs, see SetInputScope API Reference. The following table provides details on which Microsoft recognition engines support which input scopes. An "X" in the column for an input scope indicates the the recognizer on that row supports the inputscope.

Property Name US English UK English German French Japanese Korean Simplified  Chinese Traditional  Chinese
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
IS_EMAIL_USERNAME X X X X
IS_EMAIL_SMTPEMAILADDRESS X X X X
IS_FILE_FULLFILEPATH X X X X
IS_FILE_FILENAME X X X X
IS_LOGINNAME X X X X
IS_DIGITS X X X X
IS_NUMBER X X X X
IS_ONECHAR X X X X
IS_PASSWORD
IS_PERSONALNAME_FULLNAME X X X X
IS_PERSONALNAME_PREFIX X X X X
IS_PERSONALNAME_GIVENNAME X X X X
IS_PERSONALNAME_MIDDLENAME X X X X
IS_PERSONALNAME_SURNAME X X X X
IS_PERSONALNAME_SUFFIX X X
IS_TELEPHONE_FULLTELEPHONENUMBER X X X X
IS_TELEPHONE_COUNTRYCODE X X X X
IS_TELEPHONE_AREACODE X X X
IS_TELEPHONE_LOCALNUMBER X X X
IS_TIME_FULLTIME X X X X
IS_TIME_HOUR X X X X
IS_TIME_MINORSEC X X X X
IS_URL X X X X
IS_NUMBER_FULLWIDTH
IS_ALPHANUMERIC_HALFWIDTH
IS_ALPHANUMERIC_FULLWIDTH
IS_CURRENCY_CHINESE
IS_BOPOMOFO
IS_HIRAGANA
IS_KATAKANA_HALFWIDTH
IS_KATAKANA_FULLWIDTH
IS_HANJA

When using the SetInputScope APIs, the RecognizerContext Factoid property, or the Context Tagging tool to set context, if you attempt to set an input scope for a language that is not supported by that language's recognizer, the Tablet Input Panel will simply 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 avoid this issue, it is recommended that you detect the language of the recognizer in use and set input scopes accordingly. When using the Context Tagging tool, create an appropriate manifest for each language.