<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blog.avanadeadvisor.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bryant's Avanade Blog</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/default.aspx</link><description>My Avanade Blog</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Deep Zoom Image Generation with DeepZoomTools.DLL</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/11/27/12140.aspx</link><pubDate>Thu, 27 Nov 2008 12:49:12 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:12140</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/12140.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=12140</wfw:commentRss><description>&lt;p&gt;Yesterday I saw that the Expression Blend and Design team had &lt;a href="http://blogs.msdn.com/expression/archive/2008/11/26/hello-deepzoomtools-dll-deep-zoom-image-tile-generation-made-easy.aspx"&gt;blogged about the new DeepZoomTool.dll&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;In our most recent release of Deep Zoom Composer, one of the major changes we made was to change how we generated the image tiles both for designing as well as exporting your Deep Zoom Content. In the past, ever since our first release at MIX, our image encoding was done using a combination of SparseImageTool.exe and ImageTool.exe command line tools. Starting with this release, we have retired those tools and have shifted to a preview version of a .NET based DLL that provides image generation capabilities.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Building Deep Zoom Images via code is something that I’ve wanted to do for some time. I’ve tried to figure out how to do this many different ways, but I’ve never gotten it to work. So I was pretty excited to try out this new API for Deep Zoom. I still don’t fully understand it all, but I was able to create a very simple program to generate a deep zoom image based on a bunch of photos. &lt;/p&gt;  &lt;p&gt;First, I read all the image files into a List of strings. I created my code so that it will go into subfolders as well:&lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;span&gt;private&lt;/span&gt; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt; &lt;span&gt;GetImagesInDirectory&lt;/span&gt;(&lt;span&gt;string&lt;/span&gt; &lt;span&gt;path&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;{&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;GetImagesInDirectory&lt;/span&gt;(&lt;span&gt;new&lt;/span&gt; &lt;span&gt;DirectoryInfo&lt;/span&gt;(&lt;span&gt;path&lt;/span&gt;));&lt;/p&gt;    &lt;p&gt;}&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;private&lt;/span&gt; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt; &lt;span&gt;GetImagesInDirectory&lt;/span&gt;(&lt;span&gt;DirectoryInfo&lt;/span&gt; &lt;span&gt;di&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;{&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt; &lt;span&gt;images&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;// get all the images in this directory first&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;var&lt;/span&gt; &lt;span&gt;fi&lt;/span&gt; &lt;span&gt;in&lt;/span&gt; &lt;span&gt;di&lt;/span&gt;.&lt;span&gt;GetFiles&lt;/span&gt;(&lt;span&gt;&amp;quot;*.jpg&amp;quot;&lt;/span&gt;))&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;images&lt;/span&gt;.&lt;span&gt;Add&lt;/span&gt;(&lt;span&gt;fi&lt;/span&gt;.&lt;span&gt;FullName&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;// get all the directories with their images&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;var&lt;/span&gt; &lt;span&gt;sub&lt;/span&gt; &lt;span&gt;in&lt;/span&gt; &lt;span&gt;di&lt;/span&gt;.&lt;span&gt;GetDirectories&lt;/span&gt;())&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;images&lt;/span&gt;.&lt;span&gt;AddRange&lt;/span&gt;(&lt;span&gt;GetImagesInDirectory&lt;/span&gt;(&lt;span&gt;sub&lt;/span&gt;));&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;images&lt;/span&gt;;&lt;/p&gt;    &lt;p&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Next, once you have the list of Images, you need to generate all the Deep Zoom images which are folders containing tiles of the image at different zoom levels. We generate these images using the ImageCreator. For a great overview on Deep Zoom and Tiles, check out &lt;a href="http://blogs.msdn.com/jaimer/archive/2008/03/31/a-deepzoom-primer-explained-and-coded.aspx"&gt;Jaime Rodriguez: A deepzoom primer.&lt;/a&gt; &lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt; &lt;span&gt;images&lt;/span&gt; = &lt;span&gt;GetImagesInDirectory&lt;/span&gt;(&lt;span&gt;source&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt; &lt;span&gt;data&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;List&lt;/span&gt;&amp;lt;&lt;span&gt;string&lt;/span&gt;&amp;gt;();&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;var&lt;/span&gt; &lt;span&gt;image&lt;/span&gt; &lt;span&gt;in&lt;/span&gt; &lt;span&gt;images&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;{&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ImageCreator&lt;/span&gt; &lt;span&gt;ic&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;ImageCreator&lt;/span&gt;();&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ic&lt;/span&gt;.&lt;span&gt;TileSize&lt;/span&gt; = 256;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ic&lt;/span&gt;.&lt;span&gt;TileFormat&lt;/span&gt; = &lt;span&gt;ImageFormat&lt;/span&gt;.&lt;span&gt;Jpg&lt;/span&gt;;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ic&lt;/span&gt;.&lt;span&gt;ImageQuality&lt;/span&gt; = 0.95;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ic&lt;/span&gt;.&lt;span&gt;TileOverlap&lt;/span&gt; = 0;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;string&lt;/span&gt; &lt;span&gt;target&lt;/span&gt; = &lt;span&gt;dest&lt;/span&gt; + &lt;span&gt;&amp;quot;\\output_images\\&amp;quot;&lt;/span&gt; + &lt;span&gt;Path&lt;/span&gt;.&lt;span&gt;GetFileNameWithoutExtension&lt;/span&gt;(&lt;span&gt;image&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;ic&lt;/span&gt;.&lt;span&gt;Create&lt;/span&gt;(&lt;span&gt;image&lt;/span&gt;, &lt;span&gt;target&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;data&lt;/span&gt;.&lt;span&gt;Add&lt;/span&gt;(&lt;span&gt;Path&lt;/span&gt;.&lt;span&gt;ChangeExtension&lt;/span&gt;(&lt;span&gt;target&lt;/span&gt;, &lt;span&gt;&amp;quot;.xml&amp;quot;&lt;/span&gt;));&lt;/p&gt;    &lt;p&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Now we should have a bunch of folders and xml files in our “output_images” folder in our destination. Now that we’ve created all the images and their tiles we need to create the collection using the CollectionCreator. The collection creator takes in the list of xml files that we generated and creates another xml file plus some more image tiles. &lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;span&gt;CollectionCreator&lt;/span&gt; &lt;span&gt;cc&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;CollectionCreator&lt;/span&gt;();&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;cc&lt;/span&gt;.&lt;span&gt;TileSize&lt;/span&gt; = 256;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;cc&lt;/span&gt;.&lt;span&gt;TileFormat&lt;/span&gt; = &lt;span&gt;ImageFormat&lt;/span&gt;.&lt;span&gt;Jpg&lt;/span&gt;;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;cc&lt;/span&gt;.&lt;span&gt;MaxLevel&lt;/span&gt; = 8;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;cc&lt;/span&gt;.&lt;span&gt;ImageQuality&lt;/span&gt; = 0.95;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;span&gt;cc&lt;/span&gt;.&lt;span&gt;Create&lt;/span&gt;(&lt;span&gt;data&lt;/span&gt;, &lt;span&gt;dest&lt;/span&gt; + &lt;span&gt;&amp;quot;\\output&amp;quot;&lt;/span&gt;);&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now we can actually start to use our Deep Zoom image. However, we will need a Silverlight Deep Zoom project in order to display the images. To do this just create a Deep Zoom project, add an image or two, and then export it to a Silverlight Project. In that project delete the contents of the GeneratedImages folder inside of the client bin and then set the dest variable in the above code to the path of the GeneratedImages folder you just cleaned out. Point the source variable to a folder containing the folder you want to load the images from and run it. You should get an output.xml file in the GeneratedImages folder.&lt;/p&gt;  &lt;p&gt;You will need to make a couple of changes to the Silverlight project once you’ve done all that. First, we need to position our images since right now they are just a collection. We do this by setting the ViewportWidth and ViewportOrigin. I’m still trying to fully understand these, but the best explanation I’ve seen so far is also on Jaime Rodriguez’s blog: &lt;a href="http://blogs.msdn.com/jaimer/archive/2008/06/23/working-with-collections-in-deep-zoom.aspx"&gt;Working with Collections in Deep Zoom&lt;/a&gt;.&lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;msi_ImageOpenSucceeded&lt;/span&gt;(&lt;span&gt;object&lt;/span&gt; &lt;span&gt;sender&lt;/span&gt;, &lt;span&gt;RoutedEventArgs&lt;/span&gt; &lt;span&gt;e&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;{&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;//If collection, this gets you a list of all of the MultiScaleSubImages&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;//&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;var&lt;/span&gt; &lt;span&gt;x&lt;/span&gt; = 0.0;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;var&lt;/span&gt; &lt;span&gt;y&lt;/span&gt; = 0.0;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;foreach&lt;/span&gt; (&lt;span&gt;MultiScaleSubImage&lt;/span&gt; &lt;span&gt;subImage&lt;/span&gt; &lt;span&gt;in&lt;/span&gt; &lt;span&gt;msi&lt;/span&gt;.&lt;span&gt;SubImages&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;subImage&lt;/span&gt;.&lt;span&gt;ViewportWidth&lt;/span&gt; = 5.333;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;subImage&lt;/span&gt;.&lt;span&gt;ViewportOrigin&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;Point&lt;/span&gt;(-&lt;span&gt;x&lt;/span&gt;, -&lt;span&gt;y&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;x&lt;/span&gt; += 1;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;if&lt;/span&gt; (&lt;span&gt;x&lt;/span&gt; &amp;gt;= 5)&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;y&lt;/span&gt; += 1.333;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;x&lt;/span&gt; = 0.0;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;msi&lt;/span&gt;.&lt;span&gt;ViewportWidth&lt;/span&gt; = 1;&lt;/p&gt;    &lt;p&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Now we’ve arranged out images on the viewport, but we also need to point the MultiScaleImage to our output.xml instead of what it was before (do that in the page.xaml file). Once we’ve done that we should be able to run and see our generated deep zoom!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/deepzoom_5F00_30C7BEDC.png"&gt;&lt;img title="deepzoom" height="315" alt="deepzoom" src="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/deepzoom_5F00_thumb_5F00_454D0E5A.png" width="425" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There is still a lot of work to do on this, like figuring out the proper ViewPortWidth based on the number of images and image size, but this is a good starting point. I’m hoping to get some more time to play with this this weekend and I’ll post more as I figure it out.&lt;/p&gt;  &lt;p&gt;Happy Thanksgiving!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;Just &lt;a href="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/DeepZoomGen.zip"&gt;uploaded my project&lt;/a&gt; which should make it a lot easier to try out. Just set the source and dest variables, run the console app, and then build and run the website. Have fun!&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=12140" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1103.aspx">WPF/E</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1164.aspx">Silverlight</category></item><item><title>Silverlight IValueConverter vs. TypeConverter</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/11/24/12134.aspx</link><pubDate>Mon, 24 Nov 2008 12:40:31 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:12134</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/12134.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=12134</wfw:commentRss><description>&lt;p&gt;This is something that wasn’t clear to me so I decided to blog about so that I could fully understand it. Both &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter(VS.95).aspx"&gt;IValueConverters&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.typeconverter(VS.95).aspx"&gt;TypeConverters&lt;/a&gt; are used to do conversions (imagine that!), but they are used differently. &lt;/p&gt;  &lt;p&gt;TypeConverters are used by the Xaml parser during parse time to convert values in the Xaml into values in CLR objects. So when you set Height=”100”, height isn’t a string so it has to be converted to a double. This is done using a type converter. Type converters are also one-way since once the value has been converted from Xaml to CLR it doesn’t have to go back. Custom type converters must be placed on the class they will be used on in order for them to work since otherwise the Xaml parser doesn’t know how to convert the value. There is a good &lt;a href="http://msdn.microsoft.com/en-us/library/cc645047(VS.95).aspx"&gt;MSDN article on TypeConverters&lt;/a&gt; which offers much more information.&lt;/p&gt;  &lt;p&gt;IValueConverters are used during &lt;a href="http://msdn.microsoft.com/en-us/library/cc278072(VS.95).aspx"&gt;data binding&lt;/a&gt; via a &lt;a href="http://msdn.microsoft.com/en-us/library/cc645024(VS.95).aspx"&gt;property path&lt;/a&gt;. Typically these get created as a static resource in your Xaml file and then are referenced in the binding. Unlike type converters, value converters can go both ways since bindings can be two way bindings. Since value converters are specified in the binding they are much more dynamic and don’t require any references such as the type converters do. Value converters are also more flexible in that they can be passed a parameter via the ConverterParameter. You can read &lt;a href="http://blogs.msdn.com/synergist/archive/2008/07/30/using-a-converterparameter-in-a-silverlight-2-value-converter.aspx"&gt;this great blog post&lt;/a&gt; on how this works if you’re interested.&lt;/p&gt;  &lt;p&gt;A good example of how value converters make Silverlight more extensible is &lt;a href="http://silverlight.net/forums/t/51864.aspx"&gt;this question in the Silverlight forums&lt;/a&gt;. Odegaard was binding to a Dictionary object and was trying to get one of the keys to show up in his TextBlock.Text property. However, even though &lt;a href="http://www.thejoyofcode.com/Databinding_to_property_bags_and_dictionaries_in_WPF.aspx"&gt;WPF supports this property bag type of binding&lt;/a&gt;, there is no way to do this directly in Silverlight. To get this type of binding to work you can use an IValueConverter. In this case the value converter would get the key in the dictionary and return the proper value. You can see the code for this in the original post (although the questioner didn’t like my implementation because it was too complicated, I thought it was rather simple). &lt;/p&gt;  &lt;p&gt;I tried to come up with a more generic approach instead of requiring the dictionary to be of type Dictionary&amp;lt;string,string&amp;gt;, however the best I was able to do was have the value type be assignable but the key still had to be a string. &lt;/p&gt;  &lt;div&gt;   &lt;p&gt;&lt;span&gt;public&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; &lt;span&gt;DictionaryItemConverter&lt;/span&gt; : &lt;span&gt;IValueConverter&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;{&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;string&lt;/span&gt; &lt;span&gt;ValueType&lt;/span&gt; { &lt;span&gt;get&lt;/span&gt;; &lt;span&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;object&lt;/span&gt; &lt;span&gt;Convert&lt;/span&gt;(&lt;span&gt;object&lt;/span&gt; &lt;span&gt;value&lt;/span&gt;, &lt;span&gt;Type&lt;/span&gt; &lt;span&gt;targetType&lt;/span&gt;, &lt;span&gt;object&lt;/span&gt; &lt;span&gt;parameter&lt;/span&gt;, &lt;span&gt;CultureInfo&lt;/span&gt; &lt;span&gt;culture&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;Type&lt;/span&gt; &lt;span&gt;generic&lt;/span&gt; = &lt;span&gt;typeof&lt;/span&gt;(&lt;span&gt;Dictionary&lt;/span&gt;&amp;lt;,&amp;gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;Type&lt;/span&gt;[] &lt;span&gt;typeArgs&lt;/span&gt; = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;Type&lt;/span&gt;[] { &lt;span&gt;typeof&lt;/span&gt;(&lt;span&gt;string&lt;/span&gt;), &lt;span&gt;Type&lt;/span&gt;.&lt;span&gt;GetType&lt;/span&gt;(&lt;span&gt;ValueType&lt;/span&gt;) };&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;Type&lt;/span&gt; &lt;span&gt;dictType&lt;/span&gt; = &lt;span&gt;generic&lt;/span&gt;.&lt;span&gt;MakeGenericType&lt;/span&gt;(&lt;span&gt;typeArgs&lt;/span&gt;);&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;if&lt;/span&gt; (&lt;span&gt;dictType&lt;/span&gt;.&lt;span&gt;IsInstanceOfType&lt;/span&gt;(&lt;span&gt;value&lt;/span&gt;))&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;dictType&lt;/span&gt;.&lt;span&gt;GetMethod&lt;/span&gt;(&lt;span&gt;&amp;quot;get_Item&amp;quot;&lt;/span&gt;).&lt;span&gt;Invoke&lt;/span&gt;(&lt;span&gt;value&lt;/span&gt;, &lt;span&gt;new&lt;/span&gt; &lt;span&gt;object&lt;/span&gt;[] { &lt;span&gt;parameter&lt;/span&gt; });&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;throw&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; &lt;span&gt;InvalidCastException&lt;/span&gt;(&lt;span&gt;string&lt;/span&gt;.&lt;span&gt;Format&lt;/span&gt;(&lt;span&gt;&amp;quot;Dictionary is not of type Dictionary&amp;lt;stirng,{0}&amp;gt;.&amp;quot;&lt;/span&gt;, &lt;span&gt;ValueType&lt;/span&gt;));&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;public&lt;/span&gt; &lt;span&gt;object&lt;/span&gt; &lt;span&gt;ConvertBack&lt;/span&gt;(&lt;span&gt;object&lt;/span&gt; &lt;span&gt;value&lt;/span&gt;, &lt;span&gt;Type&lt;/span&gt; &lt;span&gt;targetType&lt;/span&gt;, &lt;span&gt;object&lt;/span&gt; &lt;span&gt;parameter&lt;/span&gt;, &lt;span&gt;CultureInfo&lt;/span&gt; &lt;span&gt;culture&lt;/span&gt;)&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span&gt;throw&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; &lt;span&gt;NotImplementedException&lt;/span&gt;();&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;So hopefully this post has been helpful for you in understanding IValueConverters vs. TypeConverters and when to use them. It has cleared it up for me. :)&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:75a4af14-057a-4cfe-8bed-221434b2375e"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/silverlight" rel="tag"&gt;silverlight&lt;/a&gt;&lt;/div&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=12134" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1103.aspx">WPF/E</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1164.aspx">Silverlight</category></item><item><title>Developing User Experiences</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/11/22/12131.aspx</link><pubDate>Sat, 22 Nov 2008 20:42:59 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:12131</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/12131.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=12131</wfw:commentRss><description>&lt;p&gt;About six months ago I decided to take a break from blogging without feeling bad about it. It was a nice break, but really my lack of blogging was mostly due to the type of work I was doing. I was working on an interesting project for a large media and entertainment company that combined Microsoft Excel and Project Server 2007 with lots of .NET 3.5 goodness like WCF and WF. While it was an interesting project, I wasn’t really working with the technology that really interests me: Silverlight. &lt;/p&gt;  &lt;p&gt;But I’m excited to announce that &lt;a href="http://www.avanade.com"&gt;Avanade&lt;/a&gt; has gotten serious about UX and has created a UX practice in the west region (where I work). I’m very fortunate to get to be a part of the leadership team for this practice and I’m excited to see where things are headed. So I’m now a User Experience Developer and I get to work with the technologies that I’m passionate about like Silverlight and WPF. &lt;/p&gt;  &lt;p&gt;So what does it mean to be a User Experience Developer? Well, I feel like that is something that I still have to figure out. I know that putting User Experience in front of Developer doesn’t suddenly make you better at UX. However, I think it is much like when you first start out as a developer, you don’t really know what it means yet, but you’re setting out to become a developer. So hopefully by focusing on becoming better at UX I will in the process become a true UX developer and I’ll be bringing this blog along for the ride. &lt;/p&gt;  &lt;p&gt;I’ve actually been working on a Silverlight project for the last couple of months and have some blog posts in the works already. So keep an eye out from some Silverlight related posts coming soon.&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=12131" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1103.aspx">WPF/E</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1118.aspx">Avanade</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1164.aspx">Silverlight</category></item><item><title>Font Smoothing for Windows Server 2003 RDP</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/07/09/11449.aspx</link><pubDate>Wed, 09 Jul 2008 18:59:33 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11449</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11449.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11449</wfw:commentRss><description>&lt;p&gt;A few days ago &lt;a href="http://www.peterprovost.org/blog/post/Dark-Visual-Studio-Im-hooked.aspx"&gt;Peter Provost blogged&lt;/a&gt; about &lt;a href="http://www.agileprogrammer.com/dotnetguy/archive/2006/09/07/19030.aspx"&gt;Brad Wilson's Dark Visual Studio&lt;/a&gt; color scheme. I decided to try it out (again) since I felt like I needed a little change in my coding environment. For my current project we are using Windows Server 2003 for our virtual machines and I'm using Hyper-V to run them. One of the things I like to do with my Hyper-V machines is RDP into them since that gives me better clipboard support and I can connect my local drives to the machine and access them easily. &lt;/p&gt; &lt;p&gt;The problem is that Brad's color scheme uses the Consolas font which &lt;a href="http://www.codinghorror.com/blog/archives/000356.html"&gt;doesn't render very nicely if you don't have clear type font smoothing&lt;/a&gt;. Well after a little digging around I found out that Microsoft just recently &lt;a href="http://blogs.sepago.de/helge/2008/07/08/finally-font-smoothing-over-rdpica-on-server-2003/"&gt;released a hotfix to enable font-smoothing in RDP on Windows Server 2003&lt;/a&gt;. So I gave the hotfix a try and as long as you check the "enable font-smoothing" checkbox in the RDP connection it works perfectly. &lt;/p&gt; &lt;p&gt;Before the hotfix:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/unsmooth_5F00_2.jpg"&gt;&lt;img border="0" alt="unsmooth" src="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/unsmooth_5F00_thumb.jpg" width="471" height="168"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;After the hotfix:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/smooth_5F00_2.jpg"&gt;&lt;img border="0" alt="smooth" src="http://blogs.sqlxml.org/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bryantlikes/smooth_5F00_thumb.jpg" width="464" height="166"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Much better on the eyes. And I think I like the dark color scheme. I'll give it a few days and see how it goes.&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11449" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1051.aspx">General</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1080.aspx">.NET</category></item><item><title>Upgraded to CS 2008</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/25/11386.aspx</link><pubDate>Wed, 25 Jun 2008 17:38:46 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11386</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11386.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11386</wfw:commentRss><description>&lt;p&gt;Today I upgraded &lt;a href="http://blogs.sqlxml.org"&gt;http://blogs.sqlxml.org&lt;/a&gt; to &lt;a href="http://communityserver.com/"&gt;Community Server 2008&lt;/a&gt;. Previously it was running Community Server 2.1, so since I missed a few versions the upgrade was not quite as simple as it could have been. However, it went pretty well overall I think. Let me know if you find anything that is broken.&lt;/p&gt; &lt;p&gt;Right now I think the only thing that I know is broken is my &lt;a href="http://blogs.sqlxml.org/bryantlikes/archive/2008/01/28/silverlight-and-wpf-e-cs-modules-updated.aspx"&gt;Silverlight add-in&lt;/a&gt;, which I will fix as soon as I have some time to dig into how to upgrade that. I also haven't figure out how to get the Google ads on my personal blog. Not sure where those ads go now and the new documentation is pretty difficult to navigate.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;That was easy. Just fixed my Silverlight add-in by updating the referenced DLLs to the new 2008 DLLs and recompiled. Works!&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11386" width="1" height="1"&gt;</description></item><item><title>How did I break Google Maps?</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/24/11382.aspx</link><pubDate>Tue, 24 Jun 2008 19:48:25 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11382</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11382.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11382</wfw:commentRss><description>&lt;p&gt;On my Windows Server 2008 laptop, if I open &lt;a href="http://maps.google.com"&gt;Google Maps&lt;/a&gt; in the browser this is what I get:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/HowdidIbreakGoogleMaps_D00C/image_2.png"&gt;&lt;img border="0" alt="image" src="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/HowdidIbreakGoogleMaps_D00C/image_thumb.png" width="611" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Everything is totally scrambled.&amp;#160; It used to work just fine in IE8, but now it is completely broken. I've tried turning Emulate IE7 on and off, clearing my browser cache, etc, but nothing seems to fix it. I guess I'll have to go download Firefox to see if that fixes it.&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11382" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1051.aspx">General</category></item><item><title>Speeding Up Windows Server 2008 Boot Time</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/20/11371.aspx</link><pubDate>Fri, 20 Jun 2008 21:47:40 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11371</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11371.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11371</wfw:commentRss><description>&lt;p&gt;Peter Provost just posted on &lt;a href="http://www.peterprovost.org/archive/2008/06/20/24467.aspx"&gt;Speeding Up Vista Boot Time&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;When you have a computer with a recent model CPU, chances are it's a dual-core CPU. Both Intel &amp;amp; AMD have been producing dual core CPU's for a few years now. By default, Windows Vista will only use a single core during boot-up. You can easily change this from the System Configuration utility:&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;He then goes on to show how to do this (not sure if he pulled the instructions from somewhere else since it seems to be quoted, but there is no source linked). Anyhow, you can do the same thing in Windows Server 2008 (just follow his steps).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/SpeedingUpWindowsServer2008BootTime_EC1A/image_2.png"&gt;&lt;img border="0" alt="image" src="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/SpeedingUpWindowsServer2008BootTime_EC1A/image_thumb.png" width="644" height="430" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I just tried it on my laptop and while everything still worked, I can't really say if it was actually faster. &lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11371" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1051.aspx">General</category></item><item><title>Tour De Cure 2008 Complete!</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/15/11356.aspx</link><pubDate>Sun, 15 Jun 2008 16:34:00 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11356</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11356.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11356</wfw:commentRss><description>&lt;P&gt;Yesterday I &lt;A class="" href="http://blogs.sqlxml.org/bryantlikes/archive/2008/04/14/riding-for-a-cause-or-two.aspx"&gt;rode in the 2008 Tour De Cure&lt;/A&gt;&amp;nbsp;which was part of my 2008 goals for the year. I rode the 65 mile route in 4 hours and 20 minutes (which turned into 67 miles after I took on wrong turn). You can see the map below which I uploaded to Google maps by converting the TCX file from my Garmin 205 to KML &lt;A class="" href="http://www.oe-files.de/oefiles/gmaps/tcx_to_kml_html"&gt;using this handy converter&lt;/A&gt;.&lt;/P&gt;&lt;BR&gt;&lt;A href="http://maps.google.com/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=106449778838601037474.00044fb8abc6158c83a06&amp;amp;ll=33.701856,-117.971286&amp;amp;spn=0.237538,0.290845&amp;amp;source=embed"&gt;View Larger Map&lt;/A&gt; 
&lt;P&gt;The ride was a lot of fun and I managed to keep up with a pack of pretty fast riders for the first half of the race (ave. speed was around 19 mph). I lost them on the hills though, but caught up with them at the rest stops. :)&lt;/P&gt;
&lt;P&gt;Up next is the &lt;A href="http://bikemssocal.org/"&gt;&lt;FONT color=#006ff7&gt;Bike MS: Southern California Ride&lt;/FONT&gt;&lt;/A&gt; - Sept. 20-21&amp;nbsp;which is almost three times as long but over two days. I am still raising money for that ride and if you'd like to sponsor me you can &lt;A class="" href="http://main.nationalmssociety.org/goto/bryantlikes"&gt;do so here&lt;/A&gt;.&lt;/P&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11356" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1051.aspx">General</category></item><item><title>Silverlight Beta 2 Releasing Today?</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/06/11327.aspx</link><pubDate>Fri, 06 Jun 2008 22:44:41 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11327</guid><dc:creator>bryantl</dc:creator><slash:comments>1</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11327.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11327</wfw:commentRss><description>&lt;p&gt;A lot of people are waiting expectantly for the release of beta 2 of Silverlight 2.0. Dave, for instance, is &lt;a href="http://geekswithblogs.net/WynApseTechnicalMusings/archive/2008/06/06/122672.aspx"&gt;watching a number of blogs&lt;/a&gt; and twitter. However, I just saw on Barak Cohen's Silverlight News blog that &lt;a href="http://blogs.msdn.com/bardak/archive/2008/06/06/silverligth-2-beta-2-is-available-today.aspx"&gt;it is available today&lt;/a&gt;. He doesn't have a live link though and just says that:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Silverlight 2 will be available on &lt;a href="http://www.microsoft.com/beta/downloads/Default.aspx"&gt;download center&lt;/a&gt; and on &lt;a href="http://microsoft.com/silverlight"&gt;http://microsoft.com/silverlight&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Hmm.. Today is quickly coming to a close so maybe it will be released tonight? Keep an eye out.&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11327" width="1" height="1"&gt;</description></item><item><title>Tech-Ed 2008 Recordings MIA?</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/06/11326.aspx</link><pubDate>Fri, 06 Jun 2008 15:24:00 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11326</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11326.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11326</wfw:commentRss><description>&lt;P&gt;One of the &lt;STRONG&gt;only&lt;/STRONG&gt; annoying things at Tech-Ed was that on the display outside each breakout session it would constantly switch between the list of sessions in the room and then a message stating that all sessions would be available online after 48 hours. So as you were walking by instead of just being able to glance at the monitors to see what sessions you were passing up you would see this message instead (seems like they could have just put the message at the bottom of the list).&lt;/P&gt;
&lt;P&gt;So now I'm home and thought I would go check out some of the sessions I missed on Tuesday, but there don't seem to be online. Hmmm. Anyone know where they are?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11326" width="1" height="1"&gt;</description></item><item><title>Integrating MVC with Silverlight (Part 2)</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/05/11322.aspx</link><pubDate>Fri, 06 Jun 2008 01:41:23 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11322</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11322.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11322</wfw:commentRss><description>&lt;p&gt;Ok, so in my first post on &lt;a href="http://blogs.sqlxml.org/bryantlikes/archive/2008/06/04/integrating-mvc-with-silverlight.aspx"&gt;Integrating MVC with Silverlight&lt;/a&gt; I didn't actually get to the Silverlight part. I only laid out the navigation and set it up so that it would work with Silverlight when I did add it in. So while on the flight from Orlando to Phoenix I re-wrote my menu using Silverlight 1.0 (using some old wpf/e code I had laying around).&amp;#160; Below is a screenshot of my updated sample which now has Silverlight:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/IntegratingMVCwithSilverlightPart2_122E9/image_2.png"&gt;&lt;img border="0" alt="image" src="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/IntegratingMVCwithSilverlightPart2_122E9/image_thumb.png" width="644" height="286" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So I'm still using the partial rendering by switching out the master page, which still isn't the ideal solution. What I'd really like is a way to call ViewPartial and pass in the name of the content area that I want to render. I'm also still not integrated with the MVC url system and have the Urls hardcoded in my javascript. Also, even thought the menu control could have state it doesn't actually show which page is currently selected. &lt;/p&gt;  &lt;p&gt;So this example does integrate Silverlight with MVC, however, it still needs some more work. Since my flight to Burbank just got delayed from 8:25 to 10:15 maybe I'll have some time to work out these other issues. :(&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/files/folders/419427/download.aspx"&gt;Download Updated Sample Code Here&lt;/a&gt;&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11322" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1097.aspx">ASP.Net/Web Services</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1103.aspx">WPF/E</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1164.aspx">Silverlight</category></item><item><title>Integrating MVC with Silverlight</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/06/04/11313.aspx</link><pubDate>Wed, 04 Jun 2008 22:53:20 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11313</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11313.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11313</wfw:commentRss><description>&lt;p&gt;Ok, so before I go any farther I want to spell out a couple of things. First, my sample code doesn't have any Silverlight in it &lt;em&gt;yet&lt;/em&gt;. Since I didn't have a whole lot of time and beta 2 is only a day or so away I didn't think it was worth the effort. This post is more about figuring out where Silverlight would go rather than actually demoing what it would do. Second, I'm an MVC newbie so there is probably a better way to do what I'm trying to do. However, I've been at TechEd 2008 this week attending MVC and Silverlight sessions and talking to the MS folks and so far haven't seen a good answer. &lt;/p&gt;  &lt;p&gt;So with that out of the way, here is what I've been thinking about. I'm trying to understand the best way to integrate Silverlight (or Flash for that matter) into an MVC application. I know that I can just stick the Silverlight html tags into my view and that will work just fine, but if I do that then my Controllers will probably not know about Silverlight and vice-versa. For instance, here is the scenario that I've been thinking about. &lt;/p&gt;  &lt;p&gt;Let's say I have a nice looking Silverlight menu bar. Now I could easily add that control to my master page and put links in to all my MVC pages. However, I probably want to do a couple of things: (1) I would like the control to know about where I am at so I can display some kind of context information and (2) I would like the control to get the correct urls from MVC instead of them being hardcoded. Now maybe there is a nice way to do this that I haven't thought about, but instead here is what I came up with (and what is in the sample code at the end of the article). &lt;/p&gt;  &lt;p&gt;The way that I made this work is pretty simple, but it still feels a little dirty. I created a second master page that I called Partial that contains nothing but the MainContent content area. This goes in the shared views area next to the Site master page. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;%@ Master Language=&amp;quot;C#&amp;quot; ... %&amp;gt;     &lt;br /&gt;&amp;lt;asp:ContentPlaceHolder ID=&amp;quot;MainContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;      &lt;br /&gt;&amp;lt;/asp:ContentPlaceHolder&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Next, I added a mode parameter of type string to all the actions in my Home controller which I pass as the name of the master page in the View method (using preview 3 here). &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;public ActionResult About(string mode)     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ViewData[&amp;quot;Title&amp;quot;] = &amp;quot;About Page&amp;quot;; &lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; return View(&amp;quot;About&amp;quot;, mode);     &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Lastly I wrote a little javascript (which uses the asp.net ajax library) to get the contents of the page passing the Partial as the mode and then I stick the results into the content div. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;function asyncNav(url) { &lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; url = url + '?mode=Partial'; &lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; var request = new Sys.Net.WebRequest();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; request.set_url(url);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; request.set_httpVerb(&amp;quot;GET&amp;quot;);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; request.add_completed(updateMain);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; request.invoke(); &lt;/p&gt;    &lt;p&gt;} &lt;/p&gt;    &lt;p&gt;function updateMain(executor, eventArgs) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (executor.get_responseAvailable()) {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $get(&amp;quot;content&amp;quot;).innerHTML = executor.get_responseData();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; else {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (executor.get_timedOut())      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; alert(&amp;quot;Timeout&amp;quot;);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else if (executor.get_aborted())      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; alert(&amp;quot;Aborted&amp;quot;);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So now my navigation can accomplish both of my goals because it doesn't unload when the user clicks a link so it has context and it is using urls that comply with MVC. I know, I know, I'm not actually using Silverlight yet, but I think that will be pretty easy to implement and I'm planning on giving it a shot as soon as Beta 2 is released. For now, check out my code and let me know what you think. Am I on the right path or am I missing the boat? &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/files/folders/418540/download.aspx"&gt;Download Sample Code Here&lt;/a&gt;&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11313" width="1" height="1"&gt;</description></item><item><title>Visual Studio 2008 and .NET FX 3.5 SP1 Beta 1 Released</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/05/12/11117.aspx</link><pubDate>Mon, 12 May 2008 18:30:02 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11117</guid><dc:creator>bryantl</dc:creator><slash:comments>1</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11117.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11117</wfw:commentRss><description>&lt;p&gt;Ok, I'm not totally sure why all my posts lately have had a slightly negative tone to them, perhaps I'm becoming a slightly disgruntled Microsoft developer. Anyhow, here goes another slightly disgruntled post.&lt;/p&gt;  &lt;p&gt;Today MS released the beta mentioned in the title of this post. You can get the &lt;a href="http://blogs.msdn.com/somasegar/archive/2008/05/12/visual-studio-2008-and-net-fx-3-5-sp1-beta-available-now.aspx"&gt;details at Somasegar's blog&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Traditionally our service packs address a range of issues found both through customer and partner feedback as well as our own internal testing.&amp;#160; While this service pack holds true to that theme and delivers updates for these types of issues, it also builds on the tremendous value that Visual Studio 2008 and .NET Framework 3.5 deliver today and enables an improved developer experience by adding a number of additional components that cover a range of highly requested customer features.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Ok, so this service pack is really not a service pack at all. I think Matt Milner describes it well in his post &lt;a href="http://pluralsight.com/blogs/matt/archive/2008/05/12/50904.aspx"&gt;Not just a service pack (VS 2008 and .NET 3.5 SP 1)&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Microsoft has rolled out the beta of SP1 for .NET Framework version 3.5 and Visual Studio 2008.&amp;#160; Now don't get confused, this is not just a simple set of bug fixes, this thing is big!&amp;#160; &lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Entity Framework and LINQ to entities &lt;/li&gt;      &lt;li&gt;ADO.NET Data Services (formerly project &amp;quot;Astoria&amp;quot;) &lt;/li&gt;      &lt;li&gt;Dynamic data web sites (highly RAD data driven web sites) &lt;/li&gt;      &lt;li&gt;Performance improvements across the board (WCF, WPF, AJAX, debugging, etc.) &lt;/li&gt;      &lt;li&gt;New client profile (not quite the slimmed down CLR of silverlight, but gives you a smaller footprint without server technologies you don't need).&amp;#160; Now, if they could do the opposite and remove the Windows UI stuff so I could run Windows Server 2008 Server Core with IIS and ASP.NET.&amp;#160; &lt;/li&gt;      &lt;li&gt;a bunch of perf and usability improvements in VS 2008&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;Now I'm excited about this service pack because as a Microsoft developer I get a lot of benefits from the above items. I've been using ADO.NET Data Services and think it is great. However, I think Microsoft needs some help with its release cycle and naming releases. Maybe it is because they are trying out this new way of doing more frequent releases, but thinks have just gone completely wacky in my opinion. It used to be fairly straight-forward:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;.NET 1.0 - 1/5/2002&lt;/li&gt;    &lt;li&gt;.NET 1.1 - 4/1/2003&lt;/li&gt;    &lt;li&gt;.NET 2.0 - 11/7/2005&lt;/li&gt;    &lt;li&gt;.NET 3.0 - 11/6/2006&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;.NET 3.0 varied some in that it still used the CLR 2.0 which was somewhat confusing for many people, but also made sense and was a nice feature. However, next up was .NET 3.5 which really seemed more like .NET 4.0 than 3.5 with all the new features. Interestingly, .NET 3.5 still used the CLR 2.0 but included C# 3.0. Confused yet? &lt;/p&gt;  &lt;p&gt;Now we have a service pack on top of 3.5 that adds even more features. So 3.5 SP1 is more of a feature pack, but I guess it does have performance enhancements which makes it kind of a service pack. I personally this to be confusing and think that if you add features you should do some kind of rev on the version number. Really this should be .NET 4.1, but that is only my $.02. &lt;/p&gt;  &lt;p&gt;Anyhow, enough complaining, get back to coding with all these new features, which are really cool features! Have fun!&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11117" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1080.aspx">.NET</category></item><item><title>Build Zune Games Today.. or Maybe Tomorrow</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/05/07/11099.aspx</link><pubDate>Wed, 07 May 2008 18:09:48 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11099</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11099.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11099</wfw:commentRss><description>&lt;p&gt;The XNA Team &lt;a href="http://blogs.msdn.com/xna/archive/2008/05/07/announcing-xna-game-studio-3-0-community-technical-preview-ctp.aspx"&gt;announced the CTP of the XNA Game Studio 3.0 today&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Today, we are delivering the first Community Technical Preview (CTP) of XNA Game Studio 3.0, giving you the ability to build games for the entire family of Zune media devices.&amp;#160; This feature gives you access to the majority of the XNA framework APIs while retaining a seamless sense of integration with the Zune media experience.&amp;#160; In addition, this release now requires either Visual Studio 2008 Standard Edition and higher (C# language support must be installed), or &lt;a href="http://www.microsoft.com/express/vcsharp/Default.aspx"&gt;Visual C# 2008 Express Edition&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I downloaded the CTP today thinking I could whip up a quick sample hello world game during my lunch break just for fun. After installing it on one of my virtual machines I realized there was no way for me to get the game (or even test the game since there doesn't appear to be an emulator) to my Zune since there isn't a way to &amp;quot;plug&amp;quot; my Zune into my virtual and according to the &lt;a href="http://forums.xna.com/ShowThread.aspx?PostID=46553"&gt;FAQ&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;Q: Can I transmit the game to another Zune device wirelessly?&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;A: No, you must deploy the game to your Zune through your device connection on your PC, using XNA Game Studio 3.0 to deploy.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Ok, no problem I thought, I'll just install the VS 2008 C# Express Edition on my host. So after installing that and then installing the CTP it would crash every time I tried to add my Zune to the device center. Then I remembered reading this in the FAQ:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Q: Does the CTP work for 64-bit mode?&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;A: This CTP doesn't work in 64 bit yet.&amp;#160; We plan to support it before RTM.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Hmmmm.. I guess programming Zune games isn't in my near future. If I have time tonight I'll give it a shot on my desktop PC which I haven't moved over to 64-bit yet (mainly because I'm still waiting for a 64-bit client for Home Server). &lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11099" width="1" height="1"&gt;</description></item><item><title>Longest Certification Title Ever</title><link>http://blog.avanadeadvisor.com/blogs/bryantl/archive/2008/05/01/11050.aspx</link><pubDate>Thu, 01 May 2008 19:29:52 GMT</pubDate><guid isPermaLink="false">5e51d585-b788-4f7c-85ba-1877739ce145:11050</guid><dc:creator>bryantl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.avanadeadvisor.com/blogs/bryantl/comments/11050.aspx</comments><wfw:commentRss>http://blog.avanadeadvisor.com/blogs/bryantl/commentrss.aspx?PostID=11050</wfw:commentRss><description>&lt;p&gt;I just recently found out that I passed the WF 3.5 beta exam (well, actually I passed it some time ago but it took Prometric, the world's worst test provider, a while to figure out how to send the score to Microsoft). So here is my new logo:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/LongestCertificationTitleEver_CB43/MCTS(rgb)_1100_2.gif"&gt;&lt;img border="0" alt="MCTS(rgb)_1100" src="http://blogs.sqlxml.org/blogs/bryantlikes/WindowsLiveWriter/LongestCertificationTitleEver_CB43/MCTS(rgb)_1100_thumb.gif" width="488" height="84" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Since they wrap a lot of the words, you really need to spell it out:&lt;/p&gt;  &lt;p&gt;Microsoft Certified Technology Specialist - .NET Framework 3.5, Windows Workflow Foundation Applications&lt;/p&gt;  &lt;p&gt;I think that is my longest certification title to date. The Windows Mobile 5.0 is a close second. &lt;/p&gt;  &lt;p&gt;BTW - I also found out that I didn't pass the WPF or the WCF exams so I'll have to retake the real ones at some point.&lt;/p&gt;
Cross-posted from blogs.sqlxml.org&lt;img src="http://blog.avanadeadvisor.com/aggbug.aspx?PostID=11050" width="1" height="1"&gt;</description><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1051.aspx">General</category><category domain="http://blog.avanadeadvisor.com/blogs/bryantl/archive/category/1096.aspx">Certifications</category></item></channel></rss>