O'Reilly logo

Microsoft Silverlight 4 Business Application Development Beginner's Guide by Frank LaVigne, Cameron Albert

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

Time for action - adding persistence

Let's make sure that no sketches are lost when the user reloads the page. The best way to approach this is to save the stroke data as they draw. When the user reloads our application, we should add code that checks to see if there is already ink data in the local store.

Note

We could also write files to isolated storage.

We will now save the Strokes collection to isolated storage every time a stroke is added to the inkPresenter control. We will do this by completing the following steps:

  1. Firstly, open the SilverInk application in Launch Visual Studio.
  2. In the MainPage.xaml.cs file, add the following using statements:
    using System.IO.IsolatedStorage; using System.Text; using System.Xml; using System.Windows.Markup; ...

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