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.
The code for this sample is located in the
InkPresenterView page and the
InkPresenterViewModel class in the downloadable sample code.
InkPresenter in the view is bound to the viewmodel’s
StrokeCollection. As the user interacts with the view, viewmodel commands populate the