concept InkPresenter in category silverlight

This is an excerpt from Manning's book Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services.
Silverlight provides an intuitive way to collect hand-written information through an element known as the InkPresenter. This element empowers you to collect and display a kind of content known as ink, a term that refers to a series of points related to the movement of a device. These points can be collected from a mouse, stylus, or touch screen and are stored as a Stroke. The process of collecting Stroke elements is handled through the InkPresenter.
Over the course of this section, you’ll learn how to gather and display ink with the InkPresenter. This process involves three simple but important steps. The first step involves creating a canvas to collect the ink. After that, you must wire up the canvas to collect ink-related information. Finally, once the ink has been collected, you can decide how to style the content.
The member variable _stroke is reset each time the user depresses the input device. This reset process involves retrieving the styles points that have been collected. This task is handled by the GetStylusPoints method of the StylusDevice object. Because of the reset, you must also reapply the styling settings, which we’ll discuss shortly. With the styled Stroke in hand, you can add it to the InkPresenter, which will be immediately rendered. You can even do this as the move moves around an InkPresenter, as shown in listing 8.5.
To create a place to capture and display the ink, you must define an InkPresenter object. This object can be thought of as a Canvas because the InkPresenter class derives from that type. And like the Canvas, you can create an InkPresenter in XAML, as shown here:
<Grid x:Name="LayoutRoot" Background="White">
<InkPresenter x:Name="myInkPresenter" Background="Silver"/>
</Grid>This example creates a basic InkPresenter within a Grid. If you were to create a Silverlight application using this XAML, it’d look like the InkPresenter doesn’t do anything.
The InkPresenter is designed to dynamically render ink as it’s drawn, so let’s look at how to dynamically collect ink content.