Accessing and Manipulating Stylus Input

The Tablet PC includes technology for interacting with tablet pen data as it is being gathered. The RealTimeStylus class is part of the StylusInput application programming interfaces (API), which provide access to the tablet pen data stream. These APIs allow you to capture, interrupt, and modify the stream independently from rendering and collecting ink.

The StylusInput APIs are designed to:

  • Provide real-time access to the tablet pen data stream.
  • Keep the user interface (UI) thread from blocking dynamic ink rendering by queuing the packet data on the UI thread and making ink collection single threaded.
  • Increase the performance and lower the overall thread usage over using the InkCollector object, InkOverlay object, InkPicture control, or InkEdit control to collect ink.

The StylusInput APIs are not designed to work with the InkCollector object, InkOverlay object, InkPicture control, or InkEdit control.

When you need to interact directly with the tablet pen data stream or when your application may block real-time inking, use the RealTimeStylus object. Use the InkCollector object, InkOverlay object, InkPicture control, or InkEdit control when the default behavior of these objects provides the behavior you need.

In This Section

The following sections describe elements of the StylusInput APIs:

The Cascaded RealTimeStylus Model

RealTimeStylus Plug-in Sample

RealTimeStylus Ink Collection Sample