TabletPC Development Gotchas Part 7: Detecting the input device in Silverlight 2

When writing an application that supports multiple input devices (mouse, stylus, touch) it is often neccessary to detect which type of device is sending the input events.Silverlight 1.0 offered a DeviceType property on the StylusInfo object that gets reported in every mouse event. In the Silverlight 2 managed API, you will not find an equivelnt object that…

0

TabletPC Development Gotchas Part 6: InkCanvas Element Selection/Move/Resize

WPF’s InkCanvas element provides a lot of built-in functionality for several common, ink-related tasks like stylus gesture recognition, point and stroke erase, as well as the selection, resizing and moving of ink strokes. The key to those features is the ‘EditingMode’ property – which is nicely demonstrated in the InkCanvas EditingModes SDK sample (btw, it also demonstrates an implementation of an Undo/Redo…

4

TabletPC Development Gotchas Part 5: Rendering ink and image to a bitmap using Winforms

Annotating pictures with handwriting or drawings is a fun and useful scenario for digital ink. In many cases the application user wants to create a new image file with the ink annotation “burnt” into the picture, so they can use the result of their work in other contexts and with other applications (e.g. attach the…

4

TabletPC Development Gotchas Part4: Semantics of GetSystemMetrics(SM_TABLETPC)

If your application needs to find out at runtime whether or not it runs on a Tablet PC, it is recommended to call GetSystemMetrics() and pass in the value ‘SM_TABLETPC’. But what does it actually mean for a computer to be a Tablet PC? Is that determined by the installed hardware components? Or the software components? All of…

1

TabletPC Development Gotchas Part3: Coerce to Factoid (XP vs. Vista)

If you are writing (or maintaining) and application that uses handwriting recognition, please be aware of a subtle behavior difference between XP and Vista when coercing the recognition result to a Factoid (or an input scope or a word list). This may easily be missed in your application testing, but it will potentially result in…

2

TabletPC Development Gotchas Part2: Deploying InkPicture applications to Windows XP desktops

If you are developing applications that use an InkPicture control and you plan to deploy your product to customers running Windows XP desktop OS (i.e. not the Windows XP Tablet PC Edition), please read on: The TabletPC controls (InkPicture and InkEdit) have been designed for being used on Windows XP TabletPC Edition. On other pre-Vista operating…

2

TabletPC Development Gotchas Part1: Handling exceptions in Winforms Ink events

Over the past few years of developing apps using the TabletPC platform, I came across a couple of gotchas that are not exactly obvious to solve or workaround (at least they were not obvious to me). I figured I should blog about those and the respective solutions or workarounds to save others some head-scratching. Here is…

4