Поделиться через


Text Services Framework

Text Services Framework

Overview of text services framework for theTablet PC.

When the Text Services Framework (TSF) is enabled on a control with a PenInputPanel object attached, it allows the PenInputPanel object to insert text directly. If the control does not support Text Services Framework (TSF), the PenInputPanel object must resort to using the SendInput Function Leave Site function to insert text.

The ability to insert text directly becomes very important on East Asian systems, where using the SendInput Function Leave Site function can produce incorrect characters.

TSF provides an interface for correcting recognition errors enabling the end user to correct, rewrite, or even dictate the proper text.

TSF is enabled by calling the EnableTsf method with the enable parameter set to true.

PenInputPanel thePenInputPanel = new PenInputPanel(theControl);
//...
thePenInputPanel.EnableTsf(true);

A PenInputPanel object attached to an InkEdit control provides a robust user experience because the InkEdit supports TSF. However, be sure to set the InkMode property to InkMode.Disabled on the InkEdit control as mentioned in the Best Practices topic.

The PenInputPanel Sample provides an example of enabling TSF.