O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Providing a Drawing Surface with the InkPresenter Element

InkPresenter provides a primitive drawing surface to collect strokes or Bézier curves within a Canvas control. The InkPresenter is derived from the Canvas class and includes the addition of a single property called Strokes, which is a collection of Stroke objects. A Stroke represents a line segment and is composed of a collection of StylusPoints.

The behavior of the InkPresenter can be likened to that of a pen and paper. When the pen makes contact with the paper, you begin a Stroke. As the pen moves on the paper, the Stroke is constructed using StylusPoints. When the pen leaves the paper, the Stroke is complete.

The appearance of a Stroke can be defined by using its DrawingAttributes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required