Welcome to MSDN Blogs Sign in | Join | Help
Silverlight 2 Released - Write On!

Now that Silverlight 2 is released, I finally got around to updating my blog after a long time of silence. For those of you interested in handwriting and Tablet related technologies, I want to start out with a canonical example of a Silverlight 2 Inking application. There have been a couple of OM changes since Beta1 around ink and stylus in Silverlight, mostly in order to make the Silverlight API more consistent with the WPF Ink/Stylus APIs.

Just like in Silverlight 1.0, the key element to inking is the InkPresenter which is a Canvas-like element with the ability to render ink strokes. To bring it to live and actually enable ink collection (and eraser) funtionality you will need to write some code-behind that responds to the user's input. In my example I have encapsulated the required code into a re-usable 'InkCollector' class (in InkCollector.cs), so you can just instantiate and assign it to your InkPresenter in order to get started with inking in your own projects.

Here is my example - source code attached - try it out by using your mouse or stylus to write and erase ink:

Posted: Tuesday, October 14, 2008 6:45 AM by swick
Attachment(s): InkSample.zip

Comments

juliel said:

Very slick! I never thought to zoom in on the ink. Hey are there changes since SL Beta2 that I should be watching out for?

# November 3, 2008 5:14 PM

swick said:

No, all breaking changes for Ink/Stylus happened between Beta1 and Beta2.

# November 4, 2008 1:26 AM

bill said:

wow!that's amazing!how do you do that?you are my hero

# December 1, 2008 9:02 PM

swick said:

The complete source code of the sample is in the attached ZIP file.

# December 1, 2008 9:24 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker