Ziff Davis EnterpriseDevLife
Advertisement

Thursday, May 10, 2007 11:11 AM/EST

Some Inking in Silverlight experiments

Naturally when I first saw WPF/E late last year, I wondered if it would be possible to use INK in Silverlight and alleviate some of the limitations I have run into with embedding ink-enabled WinForms controls on web pages.

I pestered the tablet team and they told me, with a grin, to hold on to my horses.

With last week's release of Silverlight 1.0 we get an InkPresenter object that allows for drawing on a web page in a way that is cross-browser, cross-platform (well, Win & Mac, like any Silverlight) and cross INPUT tool (stylus, mouse and I should try this on my touch screen) compatible.

The following screen shot is from a Windows XP computer that has NO TabletPC functionality. It does not even have the TabletPC SDK installed. The rendering using a mouse is amazing, even though not as smooth as a stylus can achieve.


Using Gavin Gear and Sam George's work as a starting point, I have been doing some experiments to learn how to interact with this object. Because I wanted to publish my tests, I had to do it all using the Javascript only version of Silverlight since it has a golive license.

I have tested this on my windows machines in XP and Vista using IE and Firefox. A few friends with Macs verified that all is working in FF on their boxes. However, there are problems with Safari and Opera and at the moment I have no way to figure out what those browsers are having hissy fits about. I'm sure this is not as much a Silverlight problem as it is about cross browser scripting.

I ran into a LOT of trouble with javascript and FireFox. After I had wasted many hours trying to do some xml parsing that was cross-browser compatible, Dan Wahlin suggested that I do the parsing in .NET on the server in a web service and use AJAX to deliver the results. Boy did I feel like a dummy. Worked like a charm.

These pages walk through my process of trying something, then adding in more functionality. Let me know what you think!

TrackBack

TrackBack

http://blogs.devsource.com/cgi-bin/mte/mt-tb.cgi/10951

Comments (1)

thomas :

Julia;

Do you think you can post some examples or tips for the later stages of your examples? I am particularly interested in saving and re-loading a stroke collection, but so far I haven't had a chance to play around with it. Many thanks in advance; I love what you've done with silverLight.

Post a Comment

 
 

Advertisement

Syndication

Subscribe: