www.thedatafarm.com
Julia Lerman
Exploring Silverlight's InkPresenter object
Aug 2007: Updated for Silverlight 1.0 Release Candidate
[using Safari? Read this blog post first...]

Previous  Next
 


The next step was to explore persistence. Here I am just working with a single XML file that contains all of the XAML metadata for the ink data (strokes, stylus points, colors etc.) Eventually, I'll transofrm this persistence to a database. Silverlight's CreatefromXAML method is used to re-hydrate the data in the xml file onto the Canvas. You can also add ink to the existing drawing.

There is also a Clear Ink button on this page that sets the InkPresenter's stroke collection to nothing.

Note that I am now using an aspx page. This is only so I can leverage the ASP.NET server xml control as a quick way of loading the XML into the DOM.