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

InkPresenter Sample Code

The sample for this section is a simple sketch page that allows the user to draw a picture, undo and redo sketch lines, and clear the page using an application bar menu item (see Figure 7.4). The code presented in this section elaborates on the previous example and takes a more MVVM-centric approach.

Image

FIGURE 7.4 InkPresenter sample app.

The code for this sample is located in the InkPresenterView page and the InkPresenterViewModel class in the downloadable sample code.

An InkPresenter in the view is bound to the viewmodel’s StrokeCollection. As the user interacts with the view, viewmodel commands populate the StrokeCollection ...

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