共用方式為


Providing Erasers

In various situations, users want to erase ink that they have previously entered. You can provide an eraser tool, similar to the writing tools provided for pens and highlighters. For example, Windows Journal provides four styles of erasers in addition to the writing tools. In a simpler scenario, you might provide only an "erase all and start over" option. You can also support the scratch-out gesture.

An eraser can operate as a tool, or mode, that the user activates by clicking a toolbar button. You can also take advantage of the optional features of certain tablet pens, including the eraser end (for pens that are invertible), a barrel button (which generally provides one type of click), or barrel rocker switch (which provides two types of clicks). For example, a tablet pen that includes a rocker switch can be configured to use the lower switch button as a right-click equivalent and the upper switch button to invert the pen, activating an eraser. Or, on a tablet pen that provides an eraser end, the user can just flip the pen over and erase.

In many cases, erasing is a one-time activity. The user writes something, notices an error, erases the mistake with a single stroke, and then continues to write. One option you might consider is providing an eraser tool that, once activated, allows a single erasing action (one stroke) and then reverts to the previously selected writing tool.

Choosing an erasing method

There are two commonly used ways to erase ink. These options are exposed by the EraserMode property on the InkOverlay and InkPicture objects.

  • By stroke. The entire stroke is erased when the user drags or taps the eraser over any portion of the stroke. In scenarios where the user wants to erase an entire word or drawing segment, the by-stroke option is faster. With this type of eraser, the user can simply tap a stroke to remove it.
  • By point. The part of the stroke that is passed over by the eraser is removed. The user can erase the entire stroke by tracing the eraser over all of its ink. The user can also divide the stroke by erasing a portion of its ink.

Both Windows Journal and Microsoft Office OneNote provide four eraser choices: three sizes of erasers that erase by point, and one eraser that erases by stroke. However, erasing by stroke is a common default choice. Your use scenarios will dictate which method you choose as a default.

The scratch-out gesture

In Tablet PC Input Panel, you can erase a word or letter by scratching it out. Many users try this approach intuitively when they want to erase their writing. Depending on the scenario, it might make sense to erase ink when the user scratches over a previous entry. Consider these guidelines:

  • Consider whether the scratch-out gesture is intended as an erase command or as an additional ink entry. For example, on a to-do list, the user might mark through an entry, to indicate that the task has been completed.
  • Consider whether you want to include a single-line scratch-out gesture for erasing ink or use the three-stroke method supported by the Scratchout member of the ApplicationGesture enumeration. Input Panel uses a different approach, requiring only one stroke drawn over a word or letter to perform the scratch-out gesture. Windows Journal uses the three-stroke method to allow users the option to either draw one or two strokes through an entry while retaining the original ink, or to draw three strokes to remove the original ink.

An erase-all option

Another option you can consider is an "erase all" option that simply removes all ink from the writing surface, which lets the user start over again. This option might work very well for situations like a signature field, where a quick, simple erase option would be easier, and where it's unlikely that the user would want to erase only part of the ink input.

 

 

Send comments about this topic to Microsoft

Build date: 2/8/2011