“Scratch”, WriteableBitmap Sample

December 21, 2009

I have a new addition to my samples gallery. This sample was inspired by a question I answered on the silverlight.net community forums. The idea of creating a “scratchable” surface intrigued me, so I decided to make a full-blown sample utilizing WritabeBitmap.

It took me about 8 hours from start to finish to implement the sample. Most of it I spent fussing over the application’s look-and-feel and getting the brushes to work properly. Some of my failed experiments with brushes produced very interesting, almost impressionistic-looking, results.

The ideas I considered for development, but not included in the sample: changing brush shape depending on stroke’s velocity; rotating brush based on the angle of the stroke; and multi-touch support.