<?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 : Silverlight Streaming</title><link>http://blogs.msdn.com/swick/archive/tags/Silverlight+Streaming/default.aspx</link><description>Tags: Silverlight Streaming</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Snipping Pictures with Silverlight</title><link>http://blogs.msdn.com/swick/archive/2007/12/18/snipping-pictures-with-silverlight.aspx</link><pubDate>Tue, 18 Dec 2007 20:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6798143</guid><dc:creator>swick</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/swick/comments/6798143.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=6798143</wfw:commentRss><description>&lt;P&gt;One of my favorite tools on the Tablet PC is the 'Snipping Tool'. I have been using it frequently since the early XP days (back then we shipped it seperately&amp;nbsp;as a Power Toy). Now in Vista, it's part of the main OS and I find myself using it quite often event on my desktop PC.&lt;/P&gt;
&lt;P&gt;When I&amp;nbsp;was using the tool recently, I got this idea for a new Silverlight sample app: wouldn't it be cool to snip pieces from various images and put them together as a collage in Silverlight - and then annotate the result with text, drawings and/or handwriting?&lt;/P&gt;
&lt;P&gt;Silverlight's imaging and ink APIs make this fairly easy.&amp;nbsp;Here are&amp;nbsp;my&amp;nbsp;results of&amp;nbsp;this effort using Silverlight v1.0&amp;nbsp;- the sample demonstrates these features:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Select an image from an animated collection of pictures&lt;/LI&gt;
&lt;LI&gt;Snip a piece of the selected image (free-form, rectangle or entire picture) and arrange it on the canvas&lt;/LI&gt;
&lt;LI&gt;Use 'Image Tools' to control zoom, rotation and opacity of individual snippets&lt;/LI&gt;
&lt;LI&gt;Use 'Text Tools' to add/change text annotations&lt;/LI&gt;
&lt;LI&gt;Use 'Ink Tools' to add/change drawings and handwritten annotations&lt;/LI&gt;
&lt;LI&gt;Full screen and embedded mode&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Couple of notes and caveats:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The pictures are currently hardcoded (appropriate for the holiday season :-) ), but you can easily change that in the attached&amp;nbsp;source code&amp;nbsp;to use your own pictures or to pull images from the web.&lt;/LI&gt;
&lt;LI&gt;When you launch the app from this blog, it opens up&amp;nbsp;in full screen mode (since this is the best mode to view and use it). You can press the 'Esc' key&amp;nbsp;or use the&amp;nbsp;'Miscellaneous'&amp;nbsp;menu to go back to embedded mode.&lt;/LI&gt;
&lt;LI&gt;In full screen mode Silverlight disables keyboard input (for security reasons). So if you want to enter some text annotations, please switch to embedded mode.&lt;/LI&gt;
&lt;LI&gt;The 'Create Bitmap' button doesn't do anything in this version. The idea is to invoke some server-side code here to generate a bitmap of your collage. If there is interest in the community, this might be a good topic for a seperate blog post. But then again: if you are on Windows Vista, you can just use the Snipping Tool in the OS, to grab your collage and save it as bitmap :-)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The sample's complete source code is attached to this post.&amp;nbsp;A live version, hosted via Silverlight Streaming, is included below for you try out. Click the button to launch the app: &lt;/P&gt;
&lt;P&gt;&lt;IFRAME src="http://silverlight.services.live.com/invoke/34348/ImageSnipper/iframe.html" frameBorder=0 width=545 scrolling=no height=360 mce_src="http://silverlight.services.live.com/invoke/34348/ImageSnipper/iframe.html"&gt;&lt;/IFRAME&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6798143" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/swick/attachment/6798143.ashx" length="2186015" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/swick/archive/tags/Tablet/default.aspx">Tablet</category><category domain="http://blogs.msdn.com/swick/archive/tags/Ink/default.aspx">Ink</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Streaming/default.aspx">Silverlight Streaming</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/Silverlight+Samples/default.aspx">Silverlight Samples</category></item><item><title>Ink blogging - using Windows Journal and Silverlight Streaming!</title><link>http://blogs.msdn.com/swick/archive/2007/11/04/publish-windows-journal-notes-on-your-blog-using-silverlight-streaming.aspx</link><pubDate>Sun, 04 Nov 2007 21:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5888450</guid><dc:creator>swick</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/swick/comments/5888450.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=5888450</wfw:commentRss><description>&lt;P&gt;Are you using Windows Journal to jot down your thoughts on your Tablet PC? Did you ever wish to publish your handwritten notes to your blog?&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here is&amp;nbsp;one way to do this: The TabletPC SDK provides a &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms700671.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms700671.aspx"&gt;Journal Reader API&lt;/A&gt; that provides access to the content of the .jnt file. Now you can read all content and convert it into a 'blog-friendly' format. Since Silverlight offers great ways to present content in an attractive, interactive way, I decided to write a&amp;nbsp;Journal -&amp;gt; Silverlight converter. The result of this test project&amp;nbsp;is now&amp;nbsp;available as&amp;nbsp;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=be89f4b0-3e83-4363-a1de-eb764ff46b4c&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=be89f4b0-3e83-4363-a1de-eb764ff46b4c&amp;amp;displaylang=en"&gt;SDK sample on microsoft.com/downloads&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;The converter is easy enough to use. Just drop down to a command box and run "&lt;EM&gt;JntToSilverlight.exe&amp;nbsp; MyNotes.jnt&lt;/EM&gt;". This will produce a &lt;EM&gt;'MyNotes'&lt;/EM&gt; folder that contains the&amp;nbsp;resulting Silverlight application. You can test the results now by double-clicking the &lt;EM&gt;'default.htm'&lt;/EM&gt; file to load the app into&amp;nbsp;your browser.&lt;/P&gt;
&lt;P mce_keep="true"&gt;OK, now how do I get all this onto my blog? Using Silverlight Streaming, it's very easy: just zip it up, upload it to the service and then stick an IFrame into your blog's HTML. See my &lt;A class="" href="http://blogs.msdn.com/swick/archive/2007/11/03/silverlight-ink-sdk-sample-hosted-through-silverlight-streaming.aspx" mce_href="http://blogs.msdn.com/swick/archive/2007/11/03/silverlight-ink-sdk-sample-hosted-through-silverlight-streaming.aspx"&gt;previous post on this subject&lt;/A&gt;.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;To summarize the steps:&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=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Create&amp;nbsp;a note in Windows Journal&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Convert note to Silverlight app&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Upload to Silverlight Streaming service&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;4)&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'"&gt;Insert IFrame into blog&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This is still a lot of steps and a bit tedious, but it's a proof of concept. Steps 2-4 all have an API they so are automatable and one could create a tool that does all that in one step.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here is one example of a converted note on my blog (the original .jnt is attached to this post, if you want to compare). Besides flipping through the pages, you can add more ink, move selected content around and erase ink. Also don't miss the full-screen mode and the mouse-wheel zoom feature!&lt;/P&gt;&lt;IFRAME src="http://silverlight.services.live.com/invoke/34348/InkBlog/iframe.html" frameBorder=0 width=545 scrolling=no height=301 mce_src="http://silverlight.services.live.com/invoke/34348/InkBlog/iframe.html"&gt;&lt;/IFRAME&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5888450" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/swick/attachment/5888450.ashx" length="143674" type="application/octet-stream" /><category domain="http://blogs.msdn.com/swick/archive/tags/Ink/default.aspx">Ink</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Streaming/default.aspx">Silverlight Streaming</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/swick/archive/tags/Journal+Reader/default.aspx">Journal Reader</category><category domain="http://blogs.msdn.com/swick/archive/tags/Windows+Journal/default.aspx">Windows Journal</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>Silverlight Ink SDK Sample - hosted through Silverlight Streaming</title><link>http://blogs.msdn.com/swick/archive/2007/11/03/silverlight-ink-sdk-sample-hosted-through-silverlight-streaming.aspx</link><pubDate>Sat, 03 Nov 2007 16:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5859111</guid><dc:creator>swick</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/swick/comments/5859111.aspx</comments><wfw:commentRss>http://blogs.msdn.com/swick/commentrss.aspx?PostID=5859111</wfw:commentRss><description>&lt;P&gt;With the 'Silverlight Streaming' service&amp;nbsp;you can now&amp;nbsp;invoke a hosted Silverlight application using an IFrame - without any JavaScript! This allows you to embed Silverlight content on sites that do not allow adding JavaScript,&amp;nbsp;as long as&amp;nbsp;they support IFrames. For details refer to &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb802533.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb802533.aspx"&gt;this MSDN topic&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To demonstrate this great service, I have taken the &lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?familyid=894980a3-c8d5-4abb-ae62-c3965a27ab14&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=894980a3-c8d5-4abb-ae62-c3965a27ab14&amp;amp;displaylang=en"&gt;Silverlight Ink SDK Sample&lt;/A&gt;, uploaded it to Silverlight Streaming and then embedded it on this blog using an IFrame, like this:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;IFRAME src="http://silverlight.services.live.com/invoke/&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;34348/InkCanvasSample&lt;/SPAN&gt;/iframe.html" frameBorder=1 width=400 scrolling=no height=300&amp;gt;&amp;lt;/IFRAME&amp;gt;&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&gt;The highligthed part is the key: it specifies your Silverlight Streaming&amp;nbsp;application ID and name of your app. For more information about&amp;nbsp;Microsoft Silverlight Streaming, visit &lt;A href="http://silverlight.live.com/"&gt;http://silverlight.live.com/&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here is the sample for you to try out:&lt;/P&gt;&lt;IFRAME src="http://silverlight.services.live.com/invoke/34348/InkCanvasSample/iframe.html" frameBorder=1 width=400 scrolling=no height=300&gt;&lt;/IFRAME&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5859111" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/swick/archive/tags/Ink/default.aspx">Ink</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Streaming/default.aspx">Silverlight Streaming</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/InkPresenter/default.aspx">InkPresenter</category><category domain="http://blogs.msdn.com/swick/archive/tags/Silverlight+Samples/default.aspx">Silverlight Samples</category></item></channel></rss>