<?xml-stylesheet type="text/xsl" href="/rss.xsl" media="screen"?><rss version="2.0"><channel><title>softlogger Latest Articles ::Silverlight</title><link>http://softlogger.com</link><description>softlogger Latest Articles ::Silverlight</description><ttl>180</ttl><item><title>Silverlight Rectangles, Paths and Line Comparison</title><link>http://softlogger.com/17505/Silverlight/silverlight-rectangles-paths-and-line-comparison.aspx</link><description>&lt;p&gt;More than half a year ago &lt;a href="http://www.wynapse.com/"&gt;Dave Campbell&lt;/a&gt;, &lt;a href="http://msmvps.com/blogs/luisabreu/"&gt;Luis Abreu&lt;/a&gt; and I had a &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1509952&amp;amp;SiteID=1"&gt;discussion&lt;/a&gt; about the &lt;a href="http://www.wynapse.com/Silverlight/Tutor/Silverlight_Rectangles_Paths_And_Lines_Comparison.aspx#Part2"&gt;1px line width problem in Silverlight and WPF&lt;/a&gt;. A short summary of the problem when drawing lines with 1px and using an anti-alias effect:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="413" alt="1px problem in Silverlight" src="http://www.ajaxpro.info/images/blog/SilverlightRectanglesPathsandLineCompari_769D/image.png" width="443" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;The example above is built with rectangles in the first line of boxes. The second line is done with the Path XAML element. The first row has a stroke thickness of 1px, the second 2px, 3px,... What you will see is that using a path or line and a odd pixel number for the stroke thickness the anti-alias effect will render a 1px wider stroke with a little transparent border. The other correct difference is that the line for the path is always centered where the border for the rectangle will always grow to the middle - and that is the real problem. If you have a stroke thickness of 1px and you want to render it at the center of a line you will have to render 0.5px to the left and 0.5px to the right. The result is the transparent look of odd pixels.&lt;/p&gt;  &lt;p&gt;If you are thinking about creating an &lt;a href="http://www.silverlight.net/"&gt;Silverlight&lt;/a&gt; application that will look like a real Windows application you have to render a lot of lines and boxes. I had an email discussion with &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/mharsh/"&gt;Mike Harsh&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/ashrafm/default.aspx"&gt;Ashraf Michail&lt;/a&gt; and don't want to deprive you this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Mike writes: &amp;quot;[...] &lt;em&gt;Next is the missive on why vertical and horizontal lines are hard in a vector engine.&amp;#160; As you were part of the discussion in the forums, I'm sure you've seen this post on the subject: &lt;/em&gt;&lt;a href="http://www.wynapse.com/Silverlight/Tutor/Silverlight_Rectangles_Paths_And_Lines_Comparison.aspx"&gt;&lt;em&gt;http://www.wynapse.com/Silverlight/Tutor/Silverlight_Rectangles_Paths_And_Lines_Comparison.aspx&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;There are two things to keeping mind here, pixel boundaries and compatibility.&amp;#160; The way strokes work is by using a geometry expansion algorithm to calculate the area to fill with the brush specified by the Stroke property.&amp;#160; For a 1px stroke, the expansion is 0.5px inside the shape and 0.5 outside.&amp;#160; This means that your pixel boundary aligned shape is no longer aligned.&amp;#160; The fix for this is to shift your shape by 0.5px using Canvas.Left and Canvas.Top to make it align again. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;As you've noticed Rectangles tend to do the right thing more often.&amp;#160; Rectangles are special because we always know the lines will be horizontal and vertical (unless a skew, rotate or arbitrary matrix transform is applied) and we know the exact height and width so the expansion algorithm will not make the shape larger than the rectangle's height and width. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;It is still possible to get a rectangle to behave oddly by positioning it on a non-pixel boundary or scaling it to be less than 1px. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The question is why don't we add some special case logic to know when a line element is horizontal or vertical or when a segment in a path is horizontal or vertical?&amp;#160; We could do this, but then the Silverlight rasterization engine would behave differently than the WPF engine and this would introduce an incompatibility in the way XAML is rendered. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Finally you should only use a line element if you need an &amp;lt;HR&amp;gt; type effect.&amp;#160; Using a Line to make a rectangle won't always give you the correct results since the rendering engine doesn't know that these 4 elements are associated.&amp;#160; This means you can get inconsistent seams at the corners.&amp;#160; If you've got connected line segments use a rectangle, polygon or path. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Here are the recommendations for drawing single pixel straight lines: &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;1. Always use a rectangle if you can     &lt;br /&gt;2. Only use a line element if you need an &amp;lt;HR&amp;gt; type effect.      &lt;br /&gt;3. Make sure everything is aligned on a pixel boundary      &lt;br /&gt;4. Only apply integral scale and translate transforms &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Here is a version of the XAML from the blog post above with proper pixel aligned boundaries: &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;Canvas xmlns=&amp;quot;&lt;/em&gt;&lt;em&gt;http://schemas.microsoft.com/client/2007&amp;quot;&lt;/em&gt;&lt;em&gt; Height=&amp;quot;100&amp;quot; Width=&amp;quot;150&amp;quot; Background=&amp;quot;white&amp;quot; Canvas.Top=&amp;quot;.5&amp;quot;&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;Rectangle Canvas.Left=&amp;quot;50&amp;quot; Canvas.Top=&amp;quot;5&amp;quot; Width=&amp;quot;50&amp;quot; Height=&amp;quot;50&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;lt;Path Canvas.Left=&amp;quot;0.5&amp;quot; Canvas.Top=&amp;quot;0.5&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; Data=&amp;quot;M20,20 L70,20 L70,70 L20,70z&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;lt;Line Canvas.Left=&amp;quot;0.5&amp;quot; Canvas.Top=&amp;quot;0.5&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;80&amp;quot; Y1=&amp;quot;20&amp;quot; X2=&amp;quot;130&amp;quot; Y2=&amp;quot;20&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Canvas.Left=&amp;quot;0.5&amp;quot; Canvas.Top=&amp;quot;0.5&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;130&amp;quot; Y1=&amp;quot;20&amp;quot; X2=&amp;quot;130&amp;quot; Y2=&amp;quot;70&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Canvas.Left=&amp;quot;0.5&amp;quot; Canvas.Top=&amp;quot;0.5&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;130&amp;quot; Y1=&amp;quot;70&amp;quot; X2=&amp;quot;80&amp;quot; Y2=&amp;quot;70&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Canvas.Left=&amp;quot;0.5&amp;quot; Canvas.Top=&amp;quot;0.5&amp;quot; Stroke=&amp;quot;Black&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;80&amp;quot; Y1=&amp;quot;70&amp;quot; X2=&amp;quot;80&amp;quot; Y2=&amp;quot;20&amp;quot; /&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;Path Stroke=&amp;quot;Red&amp;quot; StrokeThickness=&amp;quot;2&amp;quot; Data=&amp;quot;M35,40 L115,40 L115,85 L35,85z&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;lt;Path Stroke=&amp;quot;Blue&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; Data=&amp;quot;M5.5,45.5 L60.5,45.5 L60.5,95.5 L5.5,95.5z&amp;quot;/&amp;gt;&amp;#160; &lt;br /&gt;&amp;lt;Line Stroke=&amp;quot;Blue&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;90.5&amp;quot; Y1=&amp;quot;45.5&amp;quot; X2=&amp;quot;145.5&amp;quot; Y2=&amp;quot;45.5&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Stroke=&amp;quot;Blue&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;145.5&amp;quot; Y1=&amp;quot;45.5&amp;quot; X2=&amp;quot;145.5&amp;quot; Y2=&amp;quot;95.5&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Stroke=&amp;quot;Blue&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;145.5&amp;quot; Y1=&amp;quot;95.5&amp;quot; X2=&amp;quot;90.5&amp;quot; Y2=&amp;quot;95.5&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;Line Stroke=&amp;quot;Blue&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; X1=&amp;quot;90.5&amp;quot; Y1=&amp;quot;95.5&amp;quot; X2=&amp;quot;90.5&amp;quot; Y2=&amp;quot;45.5&amp;quot; /&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;/Canvas&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I hope this helps,&lt;/em&gt;&amp;quot;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Generally, the way to determine how something will appear when rasterized involves remembering the following rules: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Integer pixel coordinates are located at the top left corner of a pixel&lt;/li&gt;    &lt;li&gt;Anti-aliasing is accomplished using a box filter located at the center of the pixel&lt;/li&gt;    &lt;li&gt;Strokes expand in by half the strokethickness and out by half a strokethickness then follow the fill rules defined by 1+2.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Rule #1 is desirable for allowing rectangular fills to map 1-1 onto pixels by default and rule #2 ensures symmetry of rounded shapes like rounded rectangles. &lt;/p&gt;  &lt;p&gt;Strokes on rectangles are special cased to use the inset pen (goes inwards by the full strokethickness) instead of going half way in either direction.&amp;#160; The inset pen option is not exposed on other geometries currently.&amp;#160; The reason rectangle stroke was special cased was for a UI design convenience.&amp;#160; Generally, UI requires borders on rectangles to be inset. &lt;/p&gt;  &lt;p&gt;If you want to draw several separator lines in your UI that you would like to be aligned to pixel boundaries, my recommendation would be to use a thin filled rectangle element to draw your line.&lt;/p&gt; Thanks to Ashraf for those rules!&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5545204" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=17505"&gt;</description><author>Michael (AJAX.NET) Schwarz                                                                          </author><pubDate>2008-01-04T00:00:00</pubDate><category>Silverlight</category></item><item><title>SILVERLIGHT and ASP.NET 3.5 extensions UPDATE</title><link>http://softlogger.com/13446/Silverlight/silverlight-and-asp-net-3-5-extensions-update.aspx</link><description>&lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;In addition to adding support for .NET, Microsoft is taking the next version of Silverlight farther by adding a comprehensive control model, powerful skinning/theming, data binding, and over 20 controls in the box. To better capture the scope of the feature set for the next version of Silverlight Microsoft has decided to rename Silverlight 1.1 to Silverlight 2.0.&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;Microsoft also committed to delivering a Silverlight 2.0 Beta with a Go-Live license in Q1 2008.&lt;/font&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;Also on some progress since the launch of Silverlight 1.0, the customer and partner ecosystem continues to grow, most recently UVNTV.com and NAB.com have committed to going live on Silverlight.&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;The NBA began engaging with Microsoft to deliver key interactive applications on NBA.com deploying Silverlight.&lt;span style="mso-spacerun:yes;"&gt;&amp;#160; &lt;/span&gt;By utilizing Silverlight, the NBA will be able to further broaden the scope of its online experience across video and photos.&lt;/font&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;From a broader Web development perspective, Microsoft will release a preview of the ASP.NET 3.5 Extensions in early December. Key features of the preview include MVC, Dynamic Data Controls and REST Services.&lt;/font&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;Silverlight and ASP.NET are core technologies enabling better user experiences on the desktop, Web and beyond. Microsoft&amp;#39;s user experience approach is part of the broader Microsoft Application Platform strategy, formed with the goal of helping customers realize the benefits from more dynamic applications.&lt;/font&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;For more information, please check out Scott Guthrie&amp;#39;s blog; &lt;/font&gt;&lt;u&gt;&lt;font face="Calibri" color="#000000" size="3"&gt;&lt;a href="http://weblogs.asp.net/scottgu/"&gt;http://weblogs.asp.net/scottgu/&lt;/a&gt; &lt;/font&gt;&lt;/u&gt;&lt;font face="Calibri" size="3"&gt; the Silverlight homepage; &lt;/font&gt;&lt;u&gt;&lt;font face="Calibri" color="#000000" size="3"&gt;&lt;a href="http://www.microsoft.com/silverlight/"&gt;http://www.microsoft.com/silverlight/&lt;/a&gt; &lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri" size="3"&gt;&amp;#160;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;Also, please visit the new Microsoft Download Center Beta, powered by Microsoft Silverlight: &lt;/font&gt;&lt;u&gt;&lt;font face="Consolas" color="#000000" size="3"&gt;&lt;a href="http://preview.microsoft.com/downloads/"&gt;http://preview.microsoft.com/downloads/&lt;/a&gt; &lt;/font&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;font face="Consolas" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4d8168ee-dabf-4a3c-a61b-a40e02e45e15" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Silverlight" rel="tag"&gt;Silverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Web%20Programming" rel="tag"&gt;Web Programming&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Microsoft" rel="tag"&gt;Microsoft&lt;/a&gt;&lt;/div&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas" color="#000000" size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoPlainText" style="margin:0in 0in 0pt;"&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas" color="#000000" size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://samgentile.com/aggbug.aspx?PostID=2607" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=JGfLGhC"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=JGfLGhC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=UXK7xfC"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=UXK7xfC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=b0sfWOc"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=b0sfWOc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=RdjhmcC"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=RdjhmcC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=gOwwoic"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=gOwwoic" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=0BQwOzc"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=0BQwOzc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=rZcp8pc"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=rZcp8pc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/SamGentile?a=l0t5CWC"&gt;&lt;img src="http://feeds.feedburner.com/~f/SamGentile?i=l0t5CWC" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=13446"&gt;</description><author>Sam Gentile</author><pubDate>2007-12-02T00:00:00</pubDate><category>Silverlight</category></item><item><title>Expression Encoder, Silverlight, Windows Live Writer</title><link>http://softlogger.com/13070/Silverlight/expression-encoder-silverlight-windows-live-writer.aspx</link><description>&lt;p&gt;I've just tried for the first time the killer combination of;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://www.microsoft.com/expression/products/overview.aspx?key=encoder"&gt;Expression Encoder&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=382a3306-b212-4df3-af86-5d48be550b94&amp;amp;displaylang=en"&gt;The plug-in for Expression Encoder&lt;/a&gt; that lets you encode a video and publish it directly to Silverlight Streaming  &lt;li&gt;&lt;a href="http://gallery.live.com/liveitemdetail.aspx?li=9f952b71-9883-4937-9f28-1e58002bb2ce&amp;amp;pl=8&amp;amp;bt=9"&gt;The plug-in for Windows Live Writer&lt;/a&gt; that lets you automatically publish a Silverlight Streaming application into a blog post.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Together, these 3 produce one of the coolest things I've seen in quite a while - I can just take any old video and get it onto my website in the quickest, easiest manner with a full Silverlight application.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;This is very, very slick. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;It's so slick that I thought I'd use Camtasia to record a quick screencast of me uploading this particular blog-post so you can see exactly how slick it is. Not 100% sure how well this will come out because I was a bit "hasty" in the transcoding...&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:{7D7E1B1B-BB15-44b5-AC22-DF49F6B00FD3}:c4c815e8-b6a3-4631-ba7b-27eba3440a19"&gt;   &lt;iframe src="http://silverlight.services.live.com/invoke/659/MyFirstPost/iframe.html" scrolling="no" frameborder="0" style="width:351px;height:267px" width="351" height="267"&gt;&lt;/iframe&gt; &lt;/div&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=9976" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=13070"&gt;</description><author>Mike Taultys Blog</author><pubDate>2007-11-29T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight 2.0 and ASP.NET 3.5 Extensions - MVC Framework : Scaffolding Framework : ADO.NET Entity Framework : Astoria</title><link>http://softlogger.com/12997/Silverlight/silverlight-2-0-and-asp-net-3-5-extensions--mvc-framework--scaffolding-framework--ado-net-entity-framework--astoria.aspx</link><description>&lt;H1&gt;&lt;FONT face=Verdana&gt;Silverlight 2.0 and ASP.NET 3.5 Extensions - MVC Framework : Scaffolding Framework : ADO.NET Entity Framework : Astoria&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;by &lt;A href="http://www.davidhayden.com/"&gt;David Hayden&lt;/A&gt;, &lt;A href="http://www.davidhayden.com/"&gt;Florida .NET Developer&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Wow! The ASP.NET 3.5 Extensions Preview&amp;nbsp;will be released next week:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;ASP.NET MVC Framework&lt;/STRONG&gt;: The model view controller (MVC) framework for ASP.NET provides a structured model that enables a clear separation of concerns within web applications, and makes it easier to unit test your code and support a TDD workflow.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;ASP.NET AJAX Improvements&lt;/STRONG&gt;: Better browser history support (back/forward button integration, and server-side history management support via a new &amp;lt;asp:history&amp;gt; server control), improved AJAX content linking support with permalinks, and additional JavaScript library improvements.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;ASP.NET Dynamic Data Support&lt;/STRONG&gt;: Faster creation of data driven web sites - Rich scaffolding framework!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;ASP.NET Silverlight Support&lt;/STRONG&gt;: New controls that make it easy to integrate Silverlight video/media and interactive content within your sites.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;ADO.NET Data Services&lt;/STRONG&gt;: ADO.NET Entity Framework.&amp;nbsp; This provides a new modeling framework that enables developers to define a conceptual model of a database schema that closely aligns to a real world view of the information.&amp;nbsp; We will also be shipping a new set of data services (codename "Astoria") that make it easy to expose REST based API endpoints from within your ASP.NET applications.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;He also mentions that Silverlight 1.1 will be released as Silverlight 2.0 because it is more than just a point release.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This is huge! Learn &lt;A href="http://weblogs.asp.net/scottgu/archive/2007/11/29/net-web-product-roadmap-asp-net-silverlight-iis7.aspx" target=_blank&gt;more&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3397.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=12997"&gt;</description><author>David Hayden - Florida .NET Developer - C# and SQL Server</author><pubDate>2007-11-29T00:00:00</pubDate><category>Silverlight</category></item><item><title>Serializing business objects to Silverlight/AJAX?</title><link>http://softlogger.com/12557/Silverlight/serializing-business-objects-to-silverlight-ajax.aspx</link><description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
I was recently asked how to get the JSON serializer used for AJAX programming to serialize
a CSLA .NET business object. 
&lt;p&gt;
From an architectural perspective, it is better to view an AJAX (or Silverlight) client
as a totally separate application. That code is running in an untrusted and terribly
hackable location (the user’s browser – where they could have created a custom browser
to do anything to your client-side code – my guess is that there’s a whole class of
hacks coming that most people haven’t even thought about yet…) 
&lt;p&gt;
So you can make a strong argument that objects from the business layer should never
be directly serialized to/from an untrusted client (code in the browser). Instead,
you should treat this as a service boundary – a semantic trust boundary between your
application on the server, and the untrusted application running in the browser. 
&lt;p&gt;
What that means in terms of coding, is that you don’t want to do some sort of field-level
serialization of your objects from the server. That would be terrible in an untrusted
setting. To put it another way - the BinaryFormatter, NetDataContractSerializer or
any other field-level serializer shouldn't be used for this purpose. 
&lt;p&gt;
If anything, you want to do property-level serialization (like the XmlSerializer or
DataContractSerializer or JSON serializer). But really you don’t want to do this either,
because you don’t want to couple your service interface to your internal implementation
that tightly. This is, fundamentally, the same issue I discuss in Chapter 11 of &lt;em&gt;Expert
2005 Business Objects&lt;/em&gt; as I talk about SOA. 
&lt;p&gt;
Instead, what you really want to do (from an architectural purity perspective anyway)
is define a service contract for use by your AJAX/Silverlight client. A service contract
has two parts: operations and data. The data part is typically defined using formal
data transfer objects (DTOs). You can then design your client app to work against
this service contract. 
&lt;p&gt;
In your server app’s UI layer (the aspx pages and webmethods) you translate between
the external contract representation of data and your internal usage of that data
in business objects. In other words, you map from the business objects in/out of the
DTOs that flow to/from the client app.&amp;nbsp;The JSON serializer (or other property-level
serializers) can then be used to do the serialization of these DTOs - which is what
those serializers are designed to do. 
&lt;p&gt;
This is a long-winded way of saying that you really don’t want to do JSON serialization
directly against your objects. You want to JSON serialize some DTOs, and copy data
in/out of those DTOs from your business objects – much the way the SOA stuff works
in Chapter 11.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lhotka.net/weblog/aggbug.ashx?id=0c50b8ff-5751-46b8-bc42-bff3a9c2eccd" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
For more information go to &lt;a href="http://www.lhotka.net"&gt;www.lhotka.net&lt;/a&gt;. &lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=12557"&gt;</description><author>Rockford Lhotka</author><pubDate>2007-11-06T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight security MSDN magazine article</title><link>http://softlogger.com/7619/Silverlight/silverlight-security-msdn-magazine-article.aspx</link><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;I have submitted an article proposal to MSDN to write about Silverlight security with my buddy in Silverlight team.&amp;nbsp; If&amp;nbsp;this proposal&amp;nbsp;gets accepted, you will see the article on MSDN magazine soon.&amp;nbsp;  &lt;p&gt;&lt;b&gt;Abstract:&lt;/b&gt; &lt;p&gt;Silverlight is the latest cross-browser and cross-platform web application development technology offered by Microsoft.&amp;nbsp; It enables authoring of more dynamic and graphic web content rendered consistently on all popular Web browsers, including Microsoft Internet Explorer, Mozilla Firefox, Apple Safari, and Opera, and on Microsoft Windows and Apple Mac OS X. &amp;nbsp;In order to leverage Silverlight securely, we need to review Silverlight from the perspective of development and deployment.&amp;nbsp;&amp;nbsp; Similar to other web applications, Silverlight applications are susceptible to web-based attacks, such as cross-site scripting and SQL injection.&amp;nbsp; Code must be securely written to withstand those attacks.&amp;nbsp; The functionalities that Silverlight offer can also be misunderstood and used improperly, leading to vulnerabilities both in the server and in the client. In addition, standard deployment security issues apply to Silverlight applications, but the seamless deployment model allows administrators to secure their servers without specialized Silverlight knowledge. &lt;p&gt;&lt;b&gt;Outline&lt;/b&gt; &lt;ol&gt; &lt;li&gt;Introduction &lt;li&gt;SL Development Environment Introduction &lt;li&gt;Secure Development Best Practices &lt;li&gt;Commonly misunderstood programming patterns &lt;li&gt;Secure Deployment Best Practices&lt;/li&gt;&lt;/ol&gt;
From Eugene Siu's blog (http://blogs.msdn.com/esiu)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5043144" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7619"&gt;</description><author>ACE Team - Security, Performance &amp;amp; Privacy</author><pubDate>2007-09-22T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight 1.0 Released - Browser Plug-In For Richer Web Applications and Media Experience</title><link>http://softlogger.com/7440/Silverlight/silverlight-1-0-released--browser-plug-in-for-richer-web-applications-and-media-experience.aspx</link><description>&lt;H1&gt;&lt;FONT face=Verdana&gt;Silverlight 1.0 Released - Browser Plug-In For Richer Web Applications and Media Experience&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;by &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;David Hayden&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; ( &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;Microsoft MVP C#&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/scottgu/archive/2007/09/04/silverlight-1-0-released-and-silverlight-for-linux-announced.aspx" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Scott Guthrie announces&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; the release of Silverlight 1.0. Some of the features include:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.&amp;nbsp; The VC-1 codec is a big step forward for incorporating media within a web experience - since it supports very efficiently playing high-quality, high definition video in the browser.&amp;nbsp; It is a standards-based media format that is implemented in all HD-DVD and Blueray DVD players, and is supported by hundreds of millions of mobile devices, XBOX 360s, PlayStation 3s, and Windows Media Centers (enabling you to encode content once and run it on all of these devices + Silverlight unmodified).&amp;nbsp; It enables you to use a huge library of existing video content and provides access to the broad ecosystem of existing Windows Media tools, components, vendors and hardware.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Silverlight supports the ability to progressively download and play media content from any web-server.&amp;nbsp; You can point Silverlight at any URL containing video/audio media content, and it will download it and enable you to play it within the browser.&amp;nbsp; No special server software is required, and Silverlight can work with any web-server (including Apache on Linux).&amp;nbsp; We'll also be releasing an IIS 7.0 media pack that enables rich bandwidth throttling features that you can enable on your web-server for free.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Silverlight also optionally supports built-in media streaming.&amp;nbsp; This enables you to use a streaming server like Windows Media Server on the backend to efficiently stream video/audio (note: Windows Media Server is a free product that runs on Windows Server).&amp;nbsp; Streaming brings some significant benefits in that: 1) it can improve the end-user's experience when they seek around in a large video stream, and 2) it can dramatically lower your bandwidth costs.&amp;nbsp; &lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.&amp;nbsp; It supports a Javascript programming model to develop these.&amp;nbsp; One benefit of this is that it makes it really easy to integrate these experiences within AJAX web-pages (since you can write Javascript code to update both the HTML and XAML elements together).&amp;nbsp; &lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Silverlight makes it easy to build rich video player interactive experiences.&amp;nbsp; You can blend together its media capabilities with the vector graphic support to create any type of media playing experience you want.&amp;nbsp; Silverlight includes the ability to "go full screen" to create a completely immersive experience, as well as to overlay menus/content/controls/text directly on top of running video content (allowing you to enable DVD like experiences).&amp;nbsp; Silverlight also provides the ability to resize running video on the fly without requiring the video stream to be stopped or restarted.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Download it &lt;/FONT&gt;&lt;A href="http://silverlight.net/GetStarted/" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Source: &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;David Hayden&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; ( &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;Microsoft MVP C#&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3321.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7440"&gt;</description><author>David Hayden - Florida .NET Developer - C# and SQL Server</author><pubDate>2007-09-05T00:00:00</pubDate><category>Silverlight</category></item><item><title>Dojo adds Silverlight support</title><link>http://softlogger.com/7314/Silverlight/dojo-adds-silverlight-support.aspx</link><description>&lt;p&gt;My second favorite Ajax library just added support for Silverlight.&amp;nbsp; From &lt;a href="http://ajaxian.com/archives/dojo-09-final-version-released"&gt;this recent announcement&lt;/a&gt; it looks like Dojo is adding support for &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; in its 2D vector APIs.&amp;nbsp; That is very cool to see!&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://ajaxian.com/archives/dojo-09-final-version-released"&gt;Dojo 0.9 Final Version Released&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;b&gt;DojoX&lt;/b&gt; &lt;ul&gt; &lt;li&gt;high quality implementations of previously experimental features: gfx (portable 2D drawing), data wires, offline, storage, cometd, etc.  &lt;li&gt;dojox.gfx now includes Sliverlight support  &lt;li&gt;many more features and improvements than there’s room for here. &lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4488065" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7314"&gt;</description><author>Brad Abrams</author><pubDate>2007-08-21T00:00:00</pubDate><category>Silverlight</category></item><item><title>Expression Design, Expression Blend &amp;amp;amp; Silverlight V1.1</title><link>http://softlogger.com/7305/Silverlight/expression-design-expression-blend-silverlight-v1-1.aspx</link><description>&lt;p&gt;I've been doing a bit of "work" in Silverlight V1.1 as you might have spotted from the posts that I've been making here and I've found myself using Expression Design a lot more than I ever thought I would given that I'm a developer and not a designer (I guess some might argue that I'm not a &lt;em&gt;developer&lt;/em&gt; either any more but perhaps I'd like to be sometime again in the future so I still try to think of myself that way :-)).&lt;/p&gt; &lt;p&gt;Expression Design is really cool once you get a little used to it and has a lot of power that's not so obvious when you first run it up. I've been finding that, generally, what I've been doing is;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Knock up some graphics in Design.&lt;/li&gt; &lt;li&gt;Either save them as .PNG if that's going to work for me or export them as XAML.&lt;/li&gt; &lt;li&gt;Maybe bring them into Blend if I want to add animation but, otherwise, not.&lt;/li&gt; &lt;li&gt;Take the XAML/PNG from Design (and/or Blend) and copy-paste it into VS in the XML editor.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I've found that works reasonably well with a bit of manual fixing-up afterward (e.g. perhaps naming something that you didn't know originally needed naming and so on).&lt;/p&gt; &lt;p&gt;To encourage you to give &lt;a href="http://www.microsoft.com/expression/products/overview.aspx?key=blend"&gt;Expression Design&lt;/a&gt;&amp;nbsp;a try I thought I'd write up my top 10 favourite things in it right now.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) Import a Bitmap, Convert it to Vectors&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Use File-&amp;gt;Import to bring in a .PNG file (e.g.) as on the left image below.&lt;/p&gt; &lt;p&gt;Then, use Object-&amp;gt;Image-&amp;gt;Auto Trace to produce paths representing your image (you'll need to play with the colours I reckon).&lt;/p&gt; &lt;p&gt;You end up with vectors, as on the right image below. Very cool - you might be needing to simplify those paths though at a later point because those paths get complex very quickly.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_3.png"&gt;&lt;img height="214" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb.png" width="240" border="0"&gt;&lt;/a&gt;&lt;img height="214" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_3.png" width="240" border="0"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image.png"&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2) Draw in vectors,&amp;nbsp;select lots of fancy brushes to hide your dodgy art-work. &lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Grab a pen or a brush using the brush/pen icons on the bottom left, here.&lt;/p&gt; &lt;p&gt;Switch over to the properties panel to select a nice colour, width&amp;nbsp;and one of the stroke effects (including images), as shown in the middle below here.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Now, go for it either using the rather fancy bezier drawing mechanisms that Design offers you with control points for your curve or just going&amp;nbsp;a bit free-form with a brush. Either way you'll get vectors as below right.&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_4.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_5.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_4.png"&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_4.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_4.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_5.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_4.png"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_6.png"&gt;&lt;img alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_4.png" border="0"&gt;&lt;/a&gt;&lt;/a&gt;&lt;/a&gt;&lt;img height="240" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_5.png" width="134" border="0"&gt;&lt;img height="175" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_6.png" width="240" border="0"&gt;&lt;/a&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3) Vectors mean endless opportunity for tweaking.&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Taking a marvellous work such as the one that I just produced below;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_7.png"&gt;&lt;img height="136" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_7.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The fact that I just took a brush and scribbled with it doesn't matter. It's a Path object and I can manipulate it endlessly using the various pen and selection tools. I can use the direct selection tool to manipulate points;&amp;nbsp; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_8.png"&gt;&lt;img alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_8.png" border="0"&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_9.png"&gt;&lt;img height="165" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_9.png" width="240" border="0"&gt;&lt;/a&gt;&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;and I can go back to my pen&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;img height="240" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_10.png" width="201" border="0"&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;and add more and more anchor points (or remove them) until I've got what I want.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;4) Playing with Text&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The fancy strokes and fills that I can apply to paths and polygons also apply to text.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_10.png"&gt;&lt;img alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_11.png" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Adding a piece of text to my image and sizing it;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_11.png"&gt;&lt;img height="180" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_12.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I can then play with the stroke for the font and the fill of the text to make it a little fancier.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_12.png"&gt;&lt;img height="176" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_13.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;So, sure, I didn't spend a lot of time on it - I just applied a radial gradient fill from red-&amp;gt;orange-&amp;gt;yellow and then picked a 12px stroke done in black with a reasonably fancy brush but the fact that I can do this at all is good to me :-)&lt;/p&gt; &lt;p&gt;I can then take my text and convert it into a vector path;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_13.png"&gt;&lt;img height="240" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_14.png" width="173" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;So, now if I want to really play around with this thing then I can alter the vectors that make it up;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_14.png"&gt;&lt;img height="177" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_15.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;(that was meant to be a sort of melting effect).&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;5) Uniting and Dividing Vectors&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I love this stuff. We have the ellipse and the circle and we can &lt;em&gt;unite them, subtract them (in different ways), intersect them &lt;/em&gt;and &lt;em&gt;divide them&lt;/em&gt; in order to produce new paths quickly. This might seem trivial but if you're looking for odd shapes to place over other visuals in your scene (such as videos) then it's fantastic.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_15.png"&gt;&lt;img height="169" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_16.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_16.png"&gt;&lt;img height="177" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_17.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_17.png"&gt;&lt;img height="125" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_18.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_18.png"&gt;&lt;img height="178" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_19.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_19.png"&gt;&lt;img height="136" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_20.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_20.png"&gt;&lt;img height="177" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_21.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;6) Copying as XAML&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Fantastic for working with Silverlight. Draw what you want, hit Copy and XAML and head over to VS! :-)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_21.png"&gt;&lt;img height="240" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_22.png" width="159" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;7) Clipping Paths&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Insert a piece of text into the scene such as the word Trees below;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_22.png"&gt;&lt;img height="179" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_23.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Convert this into a Path;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_23.png"&gt;&lt;img height="99" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_24.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I &lt;em&gt;think&lt;/em&gt; this gives you a group so ungroup it (right mouse menu) and then convert to a compound path&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_24.png"&gt;&lt;img height="168" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_25.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Now insert an image into the scene;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_25.png"&gt;&lt;img height="184" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_26.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;and now use the Trees path to clip the image behind it;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_26.png"&gt;&lt;img height="156" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_27.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_27.png"&gt;&lt;img height="184" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_28.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Bingo! You can use any path to pretty much clip anything and, yes, you can make this work quite nicely with video whether you start with text or some other odd shape that you happened to draw. (Note - I added a nicer stroke to the text and thickened it up a little as well).&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;8) Effects&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Effects live over over in the effects "palette" (no idea what the right terminology is here but it looks like this);&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_28.png"&gt;&lt;img height="91" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_29.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;and you click that little Fx button to apply them and you can get some really nice variations (I guess there's about 50 different options over there and once you've applied an effect you can then tweak its various parameters). Some examples of that forest image with some effects applied;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_29.png"&gt;&lt;img height="180" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_30.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_30.png"&gt;&lt;img height="181" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_31.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_31.png"&gt;&lt;img height="185" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_32.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_32.png"&gt;&lt;img height="180" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_33.png" width="240" border="0"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_33.png"&gt;&lt;img height="182" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_34.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;You can have hours of fun with these - I really like the paint effects that you can get here.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;9) More Text - Text on a Path&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Draw a path. Draw some text. Put the text onto the path (yes, there's a menu option that does just that).&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_34.png"&gt;&lt;img height="186" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_35.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;10) The Help File&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Who wrote this? Can they be paid to write MSDN developer documentation? It's clear. It's concise. I can use it to get stuff done really quickly. It (and Blend) have two of the best help files I've seen in a long time. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_35.png"&gt;&lt;img height="94" alt="image" src="http://mtaulty.com/blog/images/ExpressionDesignExpressionBlendSilverl.1_14C4C/image_thumb_36.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;That's my list of 10 things that I think are good with Expression Design. Hey, I like Blend too but (for Silverlight rather than WPF) I've found that I've spent more time in Design than in Blend.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=9584" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7305"&gt;</description><author>Mike Taultys Blog</author><pubDate>2007-08-14T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight V1.1: Talking to a Workflow</title><link>http://softlogger.com/7306/Silverlight/silverlight-v1-1-talking-to-a-workflow.aspx</link><description>&lt;p&gt;I was thinking about how you'd get Silverlight to drive interaction with a Windows Workflow and thought I'd make a stab at that here.&lt;/p&gt; &lt;p&gt;Keeping it very simple, imagine that I have 5 images on my web server image1 to image5 and I want a Silverlight client to display them in order, one after another and&amp;nbsp;I want to control this with my Workflow.&lt;/p&gt; &lt;p&gt;The Workflow instance will be activated by Silverlight and it'll return the first image name and&amp;nbsp;then Silverlight will call back into the Workflow instance and the instance will move the client through image 2,3,4,5 and then the&amp;nbsp;instance will end.&lt;/p&gt; &lt;p&gt;Whilst this isn't a very complicated scenario, it does model the idea that we have a web client that we cannot contact (i.e. it's pull only from the client end) and so the client is going to have to poll and we want to make sure that the client is directed back into the same Workflow instance that it started originally.&lt;/p&gt; &lt;p&gt;First off, I built a WCF interface to model this. This looks like;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; ImageWorkflowLibrary
{
  [ServiceContract(Namespace=&lt;span class="str"&gt;" "&lt;/span&gt;)]
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; ISelectPicture
  {
    [OperationContract]
    [WebInvoke(
      Method = &lt;span class="str"&gt;"POST"&lt;/span&gt;, &lt;span class="rem"&gt;// For the moment - not sure if I can make "GET" work&lt;/span&gt;
      BodyStyle = WebMessageBodyStyle.Bare, 
      RequestFormat = WebMessageFormat.Json,
      ResponseFormat = WebMessageFormat.Json)]
    &lt;span class="kwrd"&gt;string&lt;/span&gt; GetNextPicture();
  }
}&lt;/pre&gt;
&lt;p&gt;And then I can go and build a simple Workflow around that which looks like this;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/SilverlightV1.1TalkingtoaWorkflow_E80A/image.png"&gt;&lt;img height="480" alt="image" src="http://mtaulty.com/blog/images/SilverlightV1.1TalkingtoaWorkflow_E80A/image_thumb.png" width="307" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now, let me explain some things about this Workflow. It's just a loop. So, that first activity is a &lt;strong&gt;Receive&lt;/strong&gt; activity. It receives a &lt;strong&gt;GetNextPicture&lt;/strong&gt; message and it responds with a string (I have bound this to a property called &lt;strong&gt;ReturnImageName&lt;/strong&gt; of type string in the Workflow). In the workflow, this&amp;nbsp;is just an array;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] images = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] 
      &lt;span class="str"&gt;"image1.jpg"&lt;/span&gt;,
      &lt;span class="str"&gt;"image2.jpg"&lt;/span&gt;,
      &lt;span class="str"&gt;"image3.jpg"&lt;/span&gt;,
      &lt;span class="str"&gt;"image4.jpg"&lt;/span&gt;,
      &lt;span class="str"&gt;"image5.jpg"&lt;/span&gt;
    };&lt;/pre&gt;
&lt;p&gt;and the Workflow has a member of type &lt;strong&gt;int&lt;/strong&gt; called &lt;strong&gt;currentIndex&lt;/strong&gt; and all it's doing is returning the items from that array one by one as it gets called. That loop on the right hand side will loop up to 4 times to index into that array and the parallel delay on the left hand side will kill the Workflow after 2 minutes elapse.&lt;/p&gt;
&lt;p&gt;So, that's all fine and dandy.&lt;/p&gt;
&lt;p&gt;I now want to deploy this Workflow inside of IIS so I add a new&amp;nbsp;WCF web service&amp;nbsp;project to my solution (remembering to run VS as administrator) and I add a reference to my Workflow library from there and I edit the file Service.svc to point at my Workflow and the &lt;strong&gt;WorkflowServiceHostFactory&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;%@ ServiceHost Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" Language="C#" Debug="true" Service="ImageWorkflowLibrary.Workflow" %&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I start to hit a few "problems". I want to use the &lt;strong&gt;context&lt;/strong&gt; stuff inside of Workflow which will automatically route WCF messages to the correct Workflow instance based on either a SOAP header or an HTTP cookie. In trying to put this together with the &lt;strong&gt;webHttpBinding&lt;/strong&gt; that I'm using which makes WCF speak "JSON" I find that, whilst there is a &lt;strong&gt;netTcpContextBinding&lt;/strong&gt; and a &lt;strong&gt;wsHttpContextBinding,&lt;/strong&gt; there isn't a &lt;strong&gt;webHttpContextBinding &lt;/strong&gt;so there's nothing that puts together the "HTTP-ness" along with the "contextual-ness" :-)&lt;/p&gt;
&lt;p&gt;I figure that I'll try and make&amp;nbsp;my own custom binding which does this&amp;nbsp;and I do ultimately come up with a configuration that seems to work;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.serviceModel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;services&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;service&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="ImageWorkflowLibrary.Workflow"&lt;/span&gt; &lt;span class="attr"&gt;behaviorConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;="ServiceBehavior"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;endpoint&lt;/span&gt; &lt;span class="attr"&gt;address&lt;/span&gt;&lt;span class="kwrd"&gt;=" "&lt;/span&gt; 
                  &lt;span class="attr"&gt;binding&lt;/span&gt;&lt;span class="kwrd"&gt;="customBinding"&lt;/span&gt; 
                  &lt;span class="attr"&gt;contract&lt;/span&gt;&lt;span class="kwrd"&gt;="ImageWorkflowLibrary.ISelectPicture"&lt;/span&gt;
                  &lt;span class="attr"&gt;bindingConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;="myBinding"&lt;/span&gt;
                  &lt;span class="attr"&gt;behaviorConfiguration&lt;/span&gt;&lt;span class="kwrd"&gt;="myBehaviour"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;service&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;services&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;bindings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;customBinding&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;binding&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="myBinding"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;context&lt;/span&gt; &lt;span class="attr"&gt;contextExchangeMechanism&lt;/span&gt;&lt;span class="kwrd"&gt;="HttpCookie"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;webMessageEncoding&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;httpTransport&lt;/span&gt; &lt;span class="attr"&gt;manualAddressing&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;binding&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;customBinding&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;bindings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;serviceBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="ServiceBehavior"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

                    &lt;span class="rem"&gt;&amp;lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;serviceMetadata&lt;/span&gt; &lt;span class="attr"&gt;httpGetEnabled&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="rem"&gt;&amp;lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;serviceDebug&lt;/span&gt; &lt;span class="attr"&gt;includeExceptionDetailInFaults&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          
                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;serviceBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;endpointBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="myBehaviour"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;webHttp&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;behavior&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;endpointBehaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;system.serviceModel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;So, you can see that I've tried to make a custom binding which does &lt;strong&gt;http + webMessageEncoding + context&lt;/strong&gt; and that context is trying to use an &lt;strong&gt;HttpCookie&lt;/strong&gt; to exchange the context token (i.e. identifying the workflow instance and the particular receive activity) and I've also added the &lt;strong&gt;webHttp&lt;/strong&gt; behaviour.&lt;/p&gt;
&lt;p&gt;With that in place, I managed to get a WSDL out of the service so I go and build a Silverlight client for it.&lt;/p&gt;
&lt;p&gt;I add a new Silverlight project, make a link from the web site to the Silverlight project and move the &lt;strong&gt;.html&lt;/strong&gt; and &lt;strong&gt;.js&lt;/strong&gt; files from the Silverlight project to the web one to ensure that I'm always running the web site rather than the Silverlight project (to avoid all those "cross-site" hiccups).&lt;/p&gt;
&lt;p&gt;I then go and do an &lt;strong&gt;Add Web Reference&lt;/strong&gt; from my Silverlight project to my web service and........."it works". I was kind of amazed by that but there you go. Especially because VS raised a lot of scary dialogs doing it.&lt;/p&gt;
&lt;p&gt;However, with that web reference in place I realise I have two problems with the proxy I've got;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It's derived from &lt;strong&gt;SoapHttpClientProtocol&lt;/strong&gt; and it seems to use HTTP POST and there doesn't appear to be a "don't do that" setting. So, I reconfigure my service interface to accept post. That is, the &lt;strong&gt;ISelectPicture&lt;/strong&gt; interface you see above was originally marked up with &lt;strong&gt;WebGet&lt;/strong&gt; and that didn't work and I moved to &lt;strong&gt;WebInvoke(Method="POST")&lt;/strong&gt;. You'll see in a moment that I could move it back to "GET" because, ultimately, I end up avoiding &lt;strong&gt;SoapHttpClientProtocol.&lt;/strong&gt;
&lt;li&gt;It's derived from &lt;strong&gt;SoapHttpClientProtocol&lt;/strong&gt; and it seems that there's no &lt;strong&gt;CookieContainer&lt;/strong&gt; so, no matter what the Worfklow service sends back to me, I'm not going to be able to use it :-(&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;At this point, I decide to ditch "Add Web Reference" and go for my own version using &lt;strong&gt;BrowserHttpWebRequest.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Having moved to &lt;strong&gt;BrowserHttpWebRequest&lt;/strong&gt;, it doesn't look like it deals with Cookies either. There's a &lt;strong&gt;CookieContainer&lt;/strong&gt; property on &lt;strong&gt;BrowserHttpWebRequest&lt;/strong&gt; but that looks to be of type &lt;strong&gt;object&lt;/strong&gt; so I'm not sure what to do with it - turns out that this is not implemented at this point. &lt;/p&gt;
&lt;p&gt;The response that you get back from a &lt;strong&gt;BrowserHttpWebRequest&lt;/strong&gt;, the &lt;strong&gt;HttpWebResponse,&lt;/strong&gt; does not seem to have a cookies collection at all so it's not clear how to use that either.&lt;/p&gt;
&lt;p&gt;In the end I spent quite a bit of time on cookie handling here. As far as I know;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You will not have success in using &lt;strong&gt;BrowserHttpWebRequest&lt;/strong&gt; at the moment to set cookies for 2 reasons;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;If you go down the route of &lt;strong&gt;BrowserHttpWebRequest.Headers[HttpRequestHeader.Cookie]&lt;/strong&gt; you'll find that you get an &lt;strong&gt;Expect&lt;/strong&gt; header that you weren't expecting (sorry, I couldn't resist :-)). It seems that there's something a bit broken in the mapping of that enumeration to headers right now.&lt;/li&gt;
&lt;li&gt;Whether you do (1) or simply start to do &lt;strong&gt;BrowserHttpWebRequest.Headers["Cookie"]&lt;/strong&gt; you'll still struggle and I got some very good advice that it might be because of this bug &lt;a title="http://support.microsoft.com/?id=234486" href="http://support.microsoft.com/?id=234486"&gt;(http://support.microsoft.com/?id=234486&lt;/a&gt;). Essentially, to get around this bug you would need to set the &lt;strong&gt;Cookie&lt;/strong&gt; value twice. That's impossible to do from Silverlight because the underlying code builds up its own collection of headers which it will set on the real IE object &lt;em&gt;just before it makes the request &lt;/em&gt;(i.e. once and at a point where it's gone from my control). This means that you can't set the property twice and so you'll always hit the bug :-(&lt;/li&gt;&lt;/ol&gt;
&lt;li&gt;You can grab the cookie from &lt;strong&gt;HttpWebResponse.Headers["Cookie"]&lt;/strong&gt; - I wrote some hacky code to parse out only what I needed and it seemed to hold together just enough to work.&lt;/li&gt;
&lt;li&gt;You can set cookies via &lt;strong&gt;HtmlPage.Cookies["Cookie"] = "myCookie=value"&lt;/strong&gt;.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;For working with Workflow this proved a bit problematic because the workflow is controlling its lifetime. So, there comes a point at which I call the workflow from the Silverlight client and the workflow bits respond with "Sorry, the workflow that your cookie represents has gone". At this point I simply clear the cookie on the client such that when the client calls again the workflow bits will create a new instance of the workflow for the client.&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;
&lt;p&gt;So, in the end it works out ok with a&amp;nbsp;bit&amp;nbsp;of stress-and-strain along the way. The client bits ended up looking like this;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/SilverlightV1.1TalkingtoaWorkflow_E80A/image_3.png"&gt;&lt;img height="179" alt="image" src="http://mtaulty.com/blog/images/SilverlightV1.1TalkingtoaWorkflow_E80A/image_thumb_3.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;And I've dropped the &lt;a href="http://mtaulty.com/downloads/slworkflow.zip"&gt;projects that I use onto the website here for download&lt;/a&gt;. Bear in mind, this is nearer to hacking than it is to "best practise" but there are perhaps some Alpha things that needed to be worked around. There are 3 projects - Workflow, Silverlight and the Web Site itself which I was using from IIS.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=9583" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7306"&gt;</description><author>Mike Taultys Blog</author><pubDate>2007-08-13T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight V1.1: The Downloader and Images</title><link>http://softlogger.com/7308/Silverlight/silverlight-v1-1-the-downloader-and-images.aspx</link><description>&lt;p&gt;If I've got some images in my Silverlight app then I probably don't want to display certain parts of the app before those images are fully loaded from the web.&lt;/p&gt; &lt;p&gt;The &lt;strong&gt;Downloader&lt;/strong&gt; provides a way to do this except that it manages (as far as I know) a single file at a time whereas what I want is to be able to wait until &lt;em&gt;all&lt;/em&gt; my images are ready in order to progress (it might be that I have multiple zip files that I need to download).&lt;/p&gt; &lt;p&gt;Additionally, I'd like to be able to specify on an &lt;strong&gt;Image&lt;/strong&gt; where it is getting its image from in XAML even if I'm actually going to get that image from a downloader at a later point. That is, I really want something like;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;lt;Image Source="{Downloader images1.zip image1.png}"/&amp;gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Now, as far as I'm aware, trying to build something like this isn't going to work because if I use the &lt;strong&gt;Source&lt;/strong&gt; property like that then Silverlight will throw an error when it encounters the bad value and even if I handle the &lt;strong&gt;ImageFailed&lt;/strong&gt; event it doesn't seem like there's a way to get rid of that error.&lt;/p&gt; &lt;p&gt;Also, I don't think you can derive from &lt;strong&gt;Image&lt;/strong&gt; in order to produce a "different image" because the &lt;strong&gt;Image&lt;/strong&gt; class is sealed.&lt;/p&gt; &lt;p&gt;Also, there's no way (AFAIK) to hook into the XAML parsing process to say something like;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;"Hey, when you see something that looks like {XXX} then just call this component over here and it'll sort it out for you"&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And, similarly, I don't think I can add some kind of dependency property such as &lt;strong&gt;Downloader.ImageSource&lt;/strong&gt; which would then call off into my code to say "Hey, someone just set your property on this image over here".&lt;/p&gt; &lt;p&gt;So...what can you do? You could certainly do something like produce a &lt;strong&gt;DownloaderImage&lt;/strong&gt; control which "looked just like an image" and aggregated an &lt;strong&gt;Image&lt;/strong&gt; to do its work. This would work out ok but it means building a control that looks &lt;em&gt;just like Image&lt;/em&gt; and delegates all the properties down to properties on Image with the exception of the &lt;strong&gt;Source&lt;/strong&gt; property which it handles differently. It seems a little painful to have to go down that route but I can't really see another way of making it work so I had a try.&lt;/p&gt; &lt;p&gt;I built a simple control called &lt;strong&gt;DownloaderImage&lt;/strong&gt;. I haven't copied all the properties of &lt;strong&gt;Image&lt;/strong&gt;, just enough to get started (if i wanted to really use this, I'd have to end up copying all the properties of Image across to it which is a bit painful as previously mentioned :-)).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;The DownloaderImage Control - XAML&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/client/2007"&lt;/span&gt; 
        &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Image&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="wrappedImage"&lt;/span&gt; &lt;span class="attr"&gt;Stretch&lt;/span&gt;&lt;span class="kwrd"&gt;="Fill"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span class="kwrd"&gt;&lt;strong&gt;&lt;u&gt;The DownloadImage Control - Source&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Controls;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SilverlightProject15
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; DownloaderImage : Control
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; DownloaderImage()
    {
      System.IO.Stream s = &lt;span class="kwrd"&gt;this&lt;/span&gt;.GetType().Assembly.GetManifestResourceStream(
        &lt;span class="str"&gt;"SilverlightProject15.DownloaderImage.xaml"&lt;/span&gt;);

      canvas = (Canvas)&lt;span class="kwrd"&gt;this&lt;/span&gt;.InitializeFromXaml(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; System.IO.StreamReader(s).ReadToEnd());

      wrappedImage = (Image)canvas.FindName(&lt;span class="str"&gt;"wrappedImage"&lt;/span&gt;);
      
      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Loaded += OnLoaded;
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnLoaded(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, System.EventArgs e)
    {
      SizeControls();
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt; Width
    {
      get
      {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (&lt;span class="kwrd"&gt;base&lt;/span&gt;.Width);
      }
      set
      {
        &lt;span class="kwrd"&gt;base&lt;/span&gt;.Width = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
        SizeControls();
      }
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt; Height
    {
      get
      {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (&lt;span class="kwrd"&gt;base&lt;/span&gt;.Width);
      }
      set
      {
        &lt;span class="kwrd"&gt;base&lt;/span&gt;.Height = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
        SizeControls();
      }
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ImageSource
    {
      get
      {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (imageSource);
      }
      set
      {
        imageSource = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
        
        &lt;span class="rem"&gt;// Simplistic parsing to say the least :-)&lt;/span&gt;
        &lt;span class="kwrd"&gt;string&lt;/span&gt;[] pieces = imageSource.Split(&lt;span class="str"&gt;' '&lt;/span&gt;);

        DownloadHelper.RegisterForDownload(wrappedImage, pieces[0], pieces[1]);
      }
    }
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SizeControls()
    {
      canvas.Width = wrappedImage.Width = &lt;span class="kwrd"&gt;base&lt;/span&gt;.Width;
      canvas.Height = wrappedImage.Height = &lt;span class="kwrd"&gt;base&lt;/span&gt;.Height;
    }
    &lt;span class="kwrd"&gt;private&lt;/span&gt; Canvas canvas;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; Image wrappedImage;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; imageSource;
  }
}&lt;/pre&gt;
&lt;p&gt;This makes use of a helper static class &amp;nbsp;that I added to manage downloaders for the various zip files that I might want to download across my app. This is a bit simplistic and probably riddled with bugs as I just sort of threw it together but here it is;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;The DownloadHelper Class&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The idea of this class is that an image can call &lt;strong&gt;DownloaderHelper.RegisterForDownload&lt;/strong&gt; and pass across the &lt;strong&gt;zipFile&lt;/strong&gt; they're waiting for, and the image they want from it. If the helper already has that &lt;strong&gt;Downloader&lt;/strong&gt; then it can straight away call &lt;strong&gt;SetSource&lt;/strong&gt; on the &lt;strong&gt;Image&lt;/strong&gt; with it but, otherwise, it'll have to go and get a &lt;strong&gt;Downloader&lt;/strong&gt; for that particular zipFile, download it and remember to call &lt;strong&gt;SetSource&lt;/strong&gt; when it's done. This is why this class ends up with a few lists of things kicking around (as I say, it might well be a bit buggy :-));&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Controls;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SilverlightProject15
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;enum&lt;/span&gt; DownloaderStatus
  {
    InProgress,
    Completed,
    Errored
  };

  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; DownloadNotificationEventArgs : EventArgs
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; DownloaderStatus Status { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ZipFile { get; set; }
  }

  &lt;span class="rem"&gt;// AFAIK, we're single threaded otherwise this lot won't work well.&lt;/span&gt;
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; DownloadHelper
  {
    &lt;span class="kwrd"&gt;class&lt;/span&gt; ImageInfo
    {
      &lt;span class="kwrd"&gt;public&lt;/span&gt; Image Image { get; set; }
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ImageName { get; set; }

      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SetSource(Downloader downloader)
      {
        Image.SetSource(downloader, ImageName);
      }

    }
    &lt;span class="kwrd"&gt;class&lt;/span&gt; DownloaderInfo
    {
      &lt;span class="kwrd"&gt;public&lt;/span&gt; DownloaderStatus Status { get; set; }
      &lt;span class="kwrd"&gt;public&lt;/span&gt; Downloader Downloader { get; set; }
      &lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;ImageInfo&amp;gt; WaitList { get; set; }
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; DownloadHelper()
    {
      downloaders = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, DownloaderInfo&amp;gt;();
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterForDownload(Image i,
      &lt;span class="kwrd"&gt;string&lt;/span&gt; zipFile, &lt;span class="kwrd"&gt;string&lt;/span&gt; imageName)
    {
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (downloaders.ContainsKey(zipFile))
      {
        DownloaderInfo info = downloaders[zipFile];

        &lt;span class="kwrd"&gt;switch&lt;/span&gt; (info.Status)
        {
          &lt;span class="kwrd"&gt;case&lt;/span&gt; DownloaderStatus.InProgress:
            info.WaitList.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ImageInfo() { Image = i, ImageName = imageName });
            &lt;span class="kwrd"&gt;break&lt;/span&gt;;
          &lt;span class="kwrd"&gt;case&lt;/span&gt; DownloaderStatus.Completed:
            i.SetSource(downloaders[zipFile].Downloader, imageName);
            &lt;span class="kwrd"&gt;break&lt;/span&gt;;
          &lt;span class="kwrd"&gt;case&lt;/span&gt; DownloaderStatus.Errored:
            &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"Zip file download has failed"&lt;/span&gt;);
            &lt;span class="kwrd"&gt;break&lt;/span&gt;;
          &lt;span class="kwrd"&gt;default&lt;/span&gt;:
            &lt;span class="kwrd"&gt;break&lt;/span&gt;;
        }
      }
      &lt;span class="kwrd"&gt;else&lt;/span&gt;
      {
        CreateDownloader(i, zipFile, imageName);
      }
    }
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; CreateDownloader(Image i, &lt;span class="kwrd"&gt;string&lt;/span&gt; zipFile, &lt;span class="kwrd"&gt;string&lt;/span&gt; imageName)
    {
      DownloaderInfo info = &lt;span class="kwrd"&gt;new&lt;/span&gt; DownloaderInfo()
      {
        Status = DownloaderStatus.InProgress,
        WaitList = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;ImageInfo&amp;gt;(),
        Downloader = &lt;span class="kwrd"&gt;new&lt;/span&gt; Downloader()
      };
      info.Downloader.Open(&lt;span class="str"&gt;"GET"&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(zipFile, UriKind.RelativeOrAbsolute));
      info.Downloader.DownloadFailed += OnDownloadFailed;
      info.Downloader.Completed += OnDownloadCompleted;
      info.Downloader.Send();
      info.WaitList.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ImageInfo() { Image = i, ImageName = imageName });
      downloaders.Add(zipFile, info);
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnDownloadFailed(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, ErrorEventArgs e)
    {
      Downloader d = (Downloader)sender;
      DownloaderInfo info = downloaders[d.Uri.ToString()];
      info.Status = DownloaderStatus.Errored;
      info.WaitList = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
      FireDownloadNotification(&lt;span class="kwrd"&gt;new&lt;/span&gt; DownloadNotificationEventArgs()
      {
        Status = DownloaderStatus.Errored,
        ZipFile = d.Uri.ToString()
      });
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnDownloadCompleted(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {
      Downloader d = (Downloader)sender;
      DownloaderInfo info = downloaders[d.Uri.ToString()];
      info.Status = DownloaderStatus.Completed;
      ClearWaitList(info);

      FireDownloadNotification(&lt;span class="kwrd"&gt;new&lt;/span&gt; DownloadNotificationEventArgs()
      {
        Status = DownloaderStatus.Completed,
        ZipFile = d.Uri.ToString()
      });
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ClearWaitList(DownloaderInfo downloaderInfo)
    {
      &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ImageInfo imageInfo &lt;span class="kwrd"&gt;in&lt;/span&gt; downloaderInfo.WaitList)
      {
        imageInfo.SetSource(downloaderInfo.Downloader);
      }
      downloaderInfo.WaitList = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FireDownloadNotification(DownloadNotificationEventArgs args)
    {
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (DownloadNotification != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
      {
        DownloadNotification(&lt;span class="kwrd"&gt;null&lt;/span&gt;, args);
      }
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;event&lt;/span&gt; EventHandler&amp;lt;DownloadNotificationEventArgs&amp;gt; DownloadNotification;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, DownloaderInfo&amp;gt; downloaders;
  }
}&lt;/pre&gt;
&lt;p&gt;So, with that in place I can now go and use this in a XAML file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Usage: The Page.XAML file&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I ended up writing a little XAML file;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="parentCanvas"&lt;/span&gt;
        &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/client/2007"&lt;/span&gt; 
        &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt; 
        &lt;span class="attr"&gt;Loaded&lt;/span&gt;&lt;span class="kwrd"&gt;="Page_Loaded"&lt;/span&gt; 
        &lt;span class="attr"&gt;xmlns:ctl&lt;/span&gt;&lt;span class="kwrd"&gt;="clr-namespace:SilverlightProject15;assembly=ClientBin/SilverlightProject15.dll"&lt;/span&gt;
        &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="SilverlightProject15.Page;assembly=ClientBin/SilverlightProject15.dll"&lt;/span&gt;
        &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="640"&lt;/span&gt;
        &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="480"&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="loadedCanvas"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="640"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="480"&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="Black"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ctl:DownloaderImage&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="image1"&lt;/span&gt; &lt;span class="attr"&gt;ImageSource&lt;/span&gt;&lt;span class="kwrd"&gt;="images1.zip kermit.png"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ctl:DownloaderImage&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="image2"&lt;/span&gt; &lt;span class="attr"&gt;ImageSource&lt;/span&gt;&lt;span class="kwrd"&gt;="images2.zip piggy.png"&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;="120"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="loadingCanvas"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="640"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="480"&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="Gray"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Top&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="attr"&gt;FontSize&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Loading...&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What we've got here are 2 canvases. One is just a "Loading...." screen and the other is hosting 2 of my &lt;strong&gt;DownloaderImage&lt;/strong&gt; controls. Each of these is reaching into a different zip file (images1.zip and images2.zip) in order to load up an image from there. I've also got a clunky bit of code for switching between the 2 when the Downloader has done downloading all of its zip files;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SilverlightProject15
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Page : Canvas
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Page_Loaded(&lt;span class="kwrd"&gt;object&lt;/span&gt; o, EventArgs e)
    {
      InitializeComponent();

      DownloadHelper.DownloadNotification += OnDownloadDone;
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnDownloadDone(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, DownloadNotificationEventArgs e)
    {
      &lt;span class="rem"&gt;// We assume success here and don't check much...&lt;/span&gt;
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (--downloadCount &amp;lt;= 0)
      {
        loadingCanvas.Visibility = Visibility.Collapsed;
      }
    }
    &lt;span class="kwrd"&gt;int&lt;/span&gt; downloadCount = 2;
  }
}&lt;/pre&gt;
&lt;p&gt;And that's it. I've dropped the &lt;a href="http://mtaulty.com/downloads/SLDownloaderImage.zip"&gt;project file here&lt;/a&gt; (it's a web project and a Silverlight project).&lt;/p&gt;
&lt;p&gt;As always with anything on my blog - it's just some thoughts and it probably turns out that there's perhaps a really simple way of doing this in Silverlight V1.1 already but I'm not aware of it and hence the post :-) &lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=9578" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7308"&gt;</description><author>Mike Taultys Blog</author><pubDate>2007-08-10T00:00:00</pubDate><category>Silverlight</category></item><item><title>Silverlight V1.1: Launching the CardSpace Identity Selector</title><link>http://softlogger.com/7312/Silverlight/silverlight-v1-1-launching-the-cardspace-identity-selector.aspx</link><description>&lt;p&gt;Mostly for "fun", I wanted to have a go at launching the CardSpace Identity Selector from managed code inside of a Silverlight application rather than from HTML.&lt;/p&gt; &lt;p&gt;I ended up with something like this;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/Sil.1LaunchingtheCardSpaceIdentitySelect_B605/image.png"&gt;&lt;img height="223" alt="image" src="http://mtaulty.com/blog/images/Sil.1LaunchingtheCardSpaceIdentitySelect_B605/image_thumb.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;That rectangle at the top left is my "CardSpaceButtonControl" which simply takes an &lt;strong&gt;ImageSource&lt;/strong&gt; to display and a set of &lt;strong&gt;RequiredClaims&lt;/strong&gt; and will then fire an event when someone clicks on it and that event contains the token that we got back from CardSpace.&lt;/p&gt; &lt;p&gt;So, usage is something like;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="parentCanvas"&lt;/span&gt;
        &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/client/2007"&lt;/span&gt; 
        &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt; 
        &lt;span class="attr"&gt;Loaded&lt;/span&gt;&lt;span class="kwrd"&gt;="Page_Loaded"&lt;/span&gt; 
        &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="SilverlightProject14.Page;assembly=ClientBin/SilverlightProject14.dll"&lt;/span&gt;
        &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="640"&lt;/span&gt;
        &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="480"&lt;/span&gt;
        &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="Silver"&lt;/span&gt;
        &lt;span class="attr"&gt;xmlns:ctl&lt;/span&gt;&lt;span class="kwrd"&gt;="clr-namespace:SilverlightProject14;assembly=ClientBin/SilverlightProject14.dll"&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ctl:CardSpaceButtonControl&lt;/span&gt;
    &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="csControl"&lt;/span&gt;
    &lt;span class="attr"&gt;ContainingHtmlElement&lt;/span&gt;&lt;span class="kwrd"&gt;="PlaceHolder"&lt;/span&gt; 
    &lt;span class="attr"&gt;ImageSource&lt;/span&gt;&lt;span class="kwrd"&gt;="icard.png"&lt;/span&gt; 
    &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; 
    &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Top&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; 
    &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="150"&lt;/span&gt; 
    &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="100"&lt;/span&gt;
    &lt;span class="attr"&gt;RequiredClaims&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"&lt;/span&gt;    
    &lt;span class="attr"&gt;CardSpaceTokenAvailable&lt;/span&gt;&lt;span class="kwrd"&gt;="OnCardSpaceTokenAvailable"&lt;/span&gt;
    &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;

  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Top&lt;/span&gt;&lt;span class="kwrd"&gt;="130"&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="600"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="340"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas.Clip&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RectangleGeometry&lt;/span&gt; &lt;span class="attr"&gt;Rect&lt;/span&gt;&lt;span class="kwrd"&gt;="0, 0, 600, 340"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas.Clip&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="tokenTxt"&lt;/span&gt; &lt;span class="attr"&gt;TextWrapping&lt;/span&gt;&lt;span class="kwrd"&gt;="WrapWithOverflow"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="600"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="340"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span class="kwrd"&gt;and then&amp;nbsp;when that event &lt;strong&gt;OnCardSpaceTokenAvailable&lt;/strong&gt; fires, I just do;&lt;/span&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnCardSpaceTokenAvailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, CardSpaceTokenEventArgs args)
    {
      tokenTxt.Text = args.CardSpaceToken;
    }&lt;/pre&gt;
&lt;p&gt;So, after going through the identity selector dialog we end up with something like;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/Sil.1LaunchingtheCardSpaceIdentitySelect_B605/image_3.png"&gt;&lt;img height="178" alt="image" src="http://mtaulty.com/blog/images/Sil.1LaunchingtheCardSpaceIdentitySelect_B605/image_thumb_3.png" width="240" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;with the token which I could then perhaps send somewhere. I'm not sure that this is a particularly useful thing to be able to do :-) but it was something that I was playing with from the point of view of manipulating the HTML DOM from some managed code.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/downloads/SLCardSpace.zip"&gt;The code project is here&lt;/a&gt; - it's a bit hacky and lacks exception handling but you might do something with it if you wanted to. You'd need to host it over HTTPS and provide it with an image that it can use for display purposes.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=9571" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7312"&gt;</description><author>Mike Taultys Blog</author><pubDate>2007-08-09T00:00:00</pubDate><category>Silverlight</category></item><item><title>Visual Basic, Silverlight and SecondLife TODAY!</title><link>http://softlogger.com/7322/Silverlight/visual-basic-silverlight-and-secondlife-today.aspx</link><description>&lt;p&gt;What better combination could you ask for?&amp;nbsp; Earlier I posted about &lt;a href="http://blogs.msdn.com/brada/archive/2007/06/28/visual-studio-in-second-life.aspx"&gt;Visual Studio in SecondLife&lt;/a&gt;.. I thought I'd remind you about the event today!&amp;nbsp;&amp;nbsp;If I make it to a WiFi hotspot in time, you may see "Darb" there.. if you do, please&amp;nbsp;come&amp;nbsp;up and say hi. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Join Amanda Silver, Lead Program Manager in the Dev Div, tomorrow at the Visual Studio Island Theater in Second Life to speak about Visual Basic on Silverlight.&lt;/p&gt; &lt;p&gt;Amanda's work involves the language design of Visual Basic as well as managing a talented team of Program Managers that design and ship everything in Visual Studio that is Visual Basic specific. We are entering a new dimension in programming and now, Visual Basic, the programming language that brought Windows programming to the masses is now available cross-platform (yep, VB on a MAC)! &lt;p&gt;&lt;b&gt;&lt;u&gt;Event Details:&lt;/u&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;Guest Speaker: &lt;/b&gt;Amanda Silver, Lead Program Manager&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;When&lt;/b&gt;: Tuesday, July 31&lt;sup&gt;st&lt;/sup&gt;, 4 PM PST&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;Where&lt;/b&gt;: Visual Studio Island Auditorium in Second Life &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;How to join the event: &lt;/b&gt; &lt;p&gt;If you’re already a member of Second Life, you can teleport directly to the Visual Studio Island via this link; &lt;a href="http://slurl.com/secondlife/Microsoft/101/123/30/"&gt;http://slurl.com/secondlife/Microsoft/101/123/30/&lt;/a&gt; &lt;p&gt;If you’re new to Second Life, you’ll be guided through the Second Life registration process and will need to set up an Avatar; &lt;a href="https://www.visualstudioisland.com/registrations"&gt;https://www.visualstudioisland.com/registrations&lt;/a&gt; &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;About Second Life:&lt;/b&gt; &lt;p&gt;Second Life is a 3D online world with a rapidly growing population of over 3 million registered residents from 100 countries around the globe, in which the residents themselves create and build the world which includes homes, vehicles, nightclubs, stores, landscapes, clothing, and games.&amp;nbsp; As of May 10&lt;sup&gt;th&lt;/sup&gt; Visual Studio established an area in Second Life where developers can hang out, attend events, and test their wits to win prizes.&amp;nbsp; We’ve already given away 60 plots of land adjacent to the Island on “Coders Cove” where many developers have built houses and other interesting things.  &lt;p&gt;&lt;u&gt;&lt;/u&gt; &lt;p&gt;&lt;b&gt;Pass it on…&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4139447" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=7322"&gt;</description><author>Brad Abrams</author><pubDate>2007-07-31T00:00:00</pubDate><category>Silverlight</category></item></channel></rss>