<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Stefan Wick's Weblog - Development with Silverlight, WPF and Tablet PC : oredev</title><link>http://blogs.msdn.com/swick/archive/tags/oredev/default.aspx</link><description>Tags: oredev</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Annotating Video with Ink using Silverlight</title><link>http://blogs.msdn.com/swick/archive/2007/11/15/annotating-video-with-ink-using-silverlight.aspx</link><pubDate>Thu, 15 Nov 2007 16:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6261263</guid><dc:creator>swick</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/swick/comments/6261263.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=6261263</wfw:commentRss><description>&lt;P&gt;Silverlight makes delivering video content in the browser very easy. Silverlight also has ink support built-in. So why not combine these two features to enable some great new scenarios?&lt;/P&gt;
&lt;P mce_keep="true"&gt;I have put together a little sample using Silverlight v1.0 to record and play back ink annotations, synchronized with the video playback. Below is the key piece of XAML markup for this application. We are using an InkPresenter that hosts the MediaElement with the video and takes care of the ink renderering. Also note the empty storyboard here as this is the magic sauce for the synchronized ink playback.&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;InkPresenter&lt;/SPAN&gt; Name='inkPresenter' Canvas.Left='10' Canvas.Top='10'&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;MouseLeftButtonDown='onInkPresenterDown'&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;MouseMove='onInkPresenterMove'&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;MouseLeftButtonUp='onInkPresenterUp'&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;InkPresenter.Resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;Storyboard&lt;/SPAN&gt; Duration="0:0:0" Completed="onStrokePlaybackTimerTick"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;x:Name="strokePlaybackTimer" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/InkPresenter.Resources&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;MediaElement&lt;/SPAN&gt; Name='mediaElement' Source='bear.wmv'&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Width='720' Height='480'&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;AutoPlay='False' MediaEnded='onMediaEnded'/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/InkPresenter&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;The relevant pieces in the JavaScript code behind the XAML&amp;nbsp;(in file events.js), are the following functions:&lt;/P&gt;
&lt;DIV mce_keep="true"&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;ConvertInkToString(strokes) - a function to serialize the point data for the ink strokes into a string for persistence purposes&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;ConvertStringToInk(serializedStylusPoints) - the reverse function that returns a StrokeCollection for a serialized ink string&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;onStrokePlaybackTimerTick() - during playback this function is called on every frame; when it is time to play back a stroke, we do so point by point&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;The full source code is attached to this post. I have also uploaded the sample to the Silverlight Streaming service, so I can pull it directly into my blog here. To check it out, just click the button below to load the sample. Once the video is loaded, you can click the 'Playback' button to replay my pre-recorded ink annotation - or you can click 'Start Recording' to record your own annotations, and then play them back afterwards.&lt;/P&gt;&lt;IFRAME src="http://silverlight.services.live.com/invoke/34348/InkVideoAnnotation/iframe.html" frameBorder=0 width=545 scrolling=no height=360 mce_src="http://silverlight.services.live.com/invoke/34348/InkVideoAnnotation/iframe.html"&gt;&lt;/IFRAME&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6261263" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/swick/attachment/6261263.ashx" length="4036383" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/swick/archive/tags/Ink/default.aspx">Ink</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Ink/default.aspx">Silverlight Ink</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/swick/archive/tags/oredev/default.aspx">oredev</category><category domain="http://blogs.msdn.com/swick/archive/tags/InkPresenter/default.aspx">InkPresenter</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Samples/default.aspx">Silverlight Samples</category></item><item><title>Slide decks from my Oredev sessions</title><link>http://blogs.msdn.com/swick/archive/2007/11/15/slide-decks-from-my-oredev-sessions.aspx</link><pubDate>Thu, 15 Nov 2007 16:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6261211</guid><dc:creator>swick</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/swick/comments/6261211.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=6261211</wfw:commentRss><description>&lt;P&gt;Thanks to everyone who attended my sessions at the Oredev conference in Malmo, Sweden. Thank you also for all the great questions and feedback after the sessions - much appreciated!&amp;nbsp;I have attached my slide decks to this post for those who are interested.&lt;/P&gt;
&lt;P&gt;Some of the demos that I coded or showed during the sessions are already on this blog. I am working on getting the missing ones up here as well. Stay tuned ...&lt;/P&gt;
&lt;P&gt;Also the video recordings from all Oredev sessions should become available soon on&amp;nbsp;&lt;A href="http://www.oredev.org/" mce_href="http://www.oredev.org/"&gt;http://www.oredev.org&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6261211" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/swick/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/swick/archive/tags/Tablet/default.aspx">Tablet</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/swick/archive/tags/oredev/default.aspx">oredev</category></item><item><title>Off to Oredev</title><link>http://blogs.msdn.com/swick/archive/2007/11/12/off-to-oredev.aspx</link><pubDate>Mon, 12 Nov 2007 18:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6142588</guid><dc:creator>swick</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/swick/comments/6142588.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=6142588</wfw:commentRss><description>&lt;P&gt;Just a quick note: I am on my way to &lt;A class="" href="http://oredev.com/" mce_href="http://oredev.com"&gt;Oredev conference&lt;/A&gt;. I'll be presenting the following two talks there:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=normal&gt;&lt;EM&gt;&lt;A class="" href="http://oredev.com/toppmeny/conference/net/introdevwsilverlight.4.76e8b1c6112f078db498000143883.html" mce_href="http://oredev.com/toppmeny/conference/net/introdevwsilverlight.4.76e8b1c6112f078db498000143883.html"&gt;Introduction to application development with WPF and Silverlight for TabletPCs and UMPCs&lt;/A&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=normal&gt;&lt;SPAN class=normal&gt;&lt;EM&gt;&lt;A class="" href="http://oredev.com/toppmeny/conference/net/advdevwsilverlight.4.76e8b1c6112f078db498000126592.html" mce_href="http://oredev.com/toppmeny/conference/net/advdevwsilverlight.4.76e8b1c6112f078db498000126592.html"&gt;Advanced application development with WPF and Silverlight for TabletPCs and UMPCs&lt;/A&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=normal&gt;&lt;SPAN class=normal&gt;I'll post slide decks&amp;nbsp;and demos here after I those presentations.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6142588" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/swick/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/swick/archive/tags/Tablet/default.aspx">Tablet</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/swick/archive/tags/oredev/default.aspx">oredev</category></item></channel></rss>