<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://dotneteers.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">VBandi&amp;#39;s blog</title><subtitle type="html">VBandi&amp;#39;s musings on WPF, SIlverlight and User Experience</subtitle><id>http://dotneteers.net/blogs/vbandi/atom.aspx</id><link rel="alternate" type="text/html" href="http://dotneteers.net/blogs/vbandi/default.aspx" /><link rel="self" type="application/atom+xml" href="http://dotneteers.net/blogs/vbandi/atom.aspx" /><generator uri="http://communityserver.org" version="4.0.30417.1769">Community Server</generator><updated>2009-08-11T22:58:39Z</updated><entry><title>A Designer-friendly Approach to MVVM</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/03/12/a-designer-friendly-approach-to-mvvm.aspx" /><id>/blogs/vbandi/archive/2010/03/12/a-designer-friendly-approach-to-mvvm.aspx</id><published>2010-03-12T14:54:08Z</published><updated>2010-03-12T14:54:08Z</updated><content type="html">&lt;p&gt;My new article, “&lt;a href="http://www.silverlightshow.net/items/A-Designer-friendly-Approach-to-MVVM-Part-I.aspx" target="_blank"&gt;A Designer-friendly Approach to MVVM&lt;/a&gt;” is up at Silverlight Show. Here is the intro:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“If you work with Silverlight or WPF, you have probably met the phrase “MVVM”. Almost everyone who is anyone in the WPF / Silverlight scene has their own MVVM framework, and their own way of explaining and teaching MVVM. Scary terms like IoC, Dependency Injection, Commanding Frameworks, Event Aggregators, Unit Testing, etc just roll off the tongue of the MVVM experts. This is one of the reasons why MVVM is intimidating for a lot of people. Still, you can create perfectly valid MVVM applications without even knowing what those terms mean. This post will show you my approach to MVVM, which is hopefully simple enough to get you started.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So, head over to Silverlight Show, and let me know what you think!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1971" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>Part 2 of my Blend Screencast Series is Online</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/03/05/part-2-of-my-blend-screencast-series-is-online.aspx" /><id>/blogs/vbandi/archive/2010/03/05/part-2-of-my-blend-screencast-series-is-online.aspx</id><published>2010-03-05T17:07:02Z</published><updated>2010-03-05T17:07:02Z</updated><content type="html">&lt;p&gt;The second part of my screencast series “Transforming an Ugly Duckling into a Graceful Swan With Expression Blend and Silverlight - Part 2 Intro Animation” is now online at SilverlightShow.net. In this part, I am going to add some bling to the app – namely the Intro animation, the ability to skip it, and to replay it. The Intro animation itself is not created with Silverlight, so I will just use it as a video. This part takes heavy use of Visual States, Behaviors and Easings.&lt;/p&gt;  &lt;p&gt;To see the article and the associated screencast, go to &lt;a href="http://www.silverlightshow.net/items/Transforming-an-Ugly-Duckling-into-a-Graceful-Swan-With-Expression-Blend-and-Silverlight-ndash-Part-2-ndash-Intro-Animation.aspx" target="_blank"&gt;SilverlightShow.Net&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1935" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="User Experience" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/User+Experience/default.aspx" /><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /><category term="Expression Blend" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Expression+Blend/default.aspx" /></entry><entry><title>New Expression Blend screencast series</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/02/11/new-expression-blend-screencast-series.aspx" /><id>/blogs/vbandi/archive/2010/02/11/new-expression-blend-screencast-series.aspx</id><published>2010-02-11T22:41:24Z</published><updated>2010-02-11T22:41:24Z</updated><content type="html">&lt;p&gt;I have begun new series of screencasts on SilverlightShow.net. Here is the expert:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;margin:0px 0px 0px 10px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" align="right" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_7C2A26E7.png" width="244" height="103" /&gt; &lt;em&gt;“As I promised earlier on Silverlight Show, this screencast series will show how to create the showcase application shown on &lt;/em&gt;&lt;a href="http://www.response.hu/"&gt;&lt;em&gt;www.response.hu&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (you may want to read the &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/ItemView.aspx?urlTitle=Silverlight-MVP-Andr-s-Velv-rt-tells-the-story-behind-the-creation-of-his-portal-www.response.hu-and-two-of-his-award-winning-projects"&gt;&lt;em&gt;interview&lt;/em&gt;&lt;/a&gt;&lt;em&gt; to get some background information on the project). The screencast series shows a real life example of how designers can add value to a project, and how a developer can support this effort by creating small, reusable behaviors that allow the designer to tweak things to shape the end result to be exactly as he wanted it.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I would very much love to hear your opinion! Please leave feedback at the &lt;a href="http://www.silverlightshow.net/items/Transforming-an-Ugly-Duckling-to-a-Graceful-Swan-with-Expression-Blend-and-Silverlight-Part-I.aspx" target="_blank"&gt;article&lt;/a&gt;, and let me know what you think about the format, the depth and the general direction it is going.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1892" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="User Experience" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/User+Experience/default.aspx" /><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /><category term="Expression Blend" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Expression+Blend/default.aspx" /></entry><entry><title>Extract styles in Expression Blend</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/01/19/extract-styles-in-expression-blend.aspx" /><id>/blogs/vbandi/archive/2010/01/19/extract-styles-in-expression-blend.aspx</id><published>2010-01-19T15:34:21Z</published><updated>2010-01-19T15:34:21Z</updated><content type="html">&lt;p&gt;You may have found yourself in a situation when you want to convert an implicit style in XAML into a resource. Until today, I did it with creating the new style, and adding the setters manually. But I thought “There must be some way in Expression Blend to do this better”. I couldn’t find anything on the net, so I started to look for the solution myself. And yeah, I found it… Here is how it is done:&lt;/p&gt;  &lt;p&gt;Suppose, you have a TextBox that has a lot of settings on it:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_18618F7F.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_77DA4FCC.png" width="135" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;TextBlock Margin=&amp;quot;50,96,0,0&amp;quot; VerticalAlignment=&amp;quot;Top&amp;quot; Text=&amp;quot;TextBlock&amp;quot; TextWrapping=&amp;quot;Wrap&amp;quot; FontSize=&amp;quot;96&amp;quot; FontFamily=&amp;quot;Comic Sans MS&amp;quot; FontWeight=&amp;quot;Bold&amp;quot; HorizontalAlignment=&amp;quot;Left&amp;quot; Width=&amp;quot;248&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;TextBlock.Projection&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;PlaneProjection RotationY=&amp;quot;-57&amp;quot;/&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/TextBlock.Projection&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;TextBlock.Effect&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;DropShadowEffect BlurRadius=&amp;quot;9&amp;quot;/&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/TextBlock.Effect&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;TextBlock.Foreground&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LinearGradientBrush EndPoint=&amp;quot;0.5,1&amp;quot; StartPoint=&amp;quot;0.5,0&amp;quot;&amp;gt;    &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; &amp;lt;GradientStop Color=&amp;quot;Black&amp;quot; Offset=&amp;quot;0&amp;quot;/&amp;gt;    &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; &amp;lt;GradientStop Color=&amp;quot;#FFE82E2E&amp;quot; Offset=&amp;quot;1&amp;quot;/&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/LinearGradientBrush&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/TextBlock.Foreground&amp;gt;    &lt;br /&gt;&amp;lt;/TextBlock&amp;gt;&lt;/p&gt;  &lt;p&gt;Now, you want to take the font settings, the drop shadow and the Black-Blue foreground gradient and reuse it on another TextBlock. Here is where extracting the style comes handy. &lt;/p&gt;  &lt;p&gt;First, select the TextBlock, and choose Object / Style / Create Empty from the menu. There is NO right click option for this command! Then choose a name for your style resource.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_17892995.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_054062D3.png" width="455" height="258" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, we are in Resource editing mode:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_7701E9E2.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_48A86435.png" width="244" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;On the Properties tab, you can see all our settings. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_644CF02B.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_47CFFE4B.png" width="310" height="366" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;But the Property Peg is empty (gray). What happens if we click on it?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_3C3A410C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_3BCE0E17.png" width="309" height="356" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, if we click on “Convert To Local Value”, the Peg turns white, and the Foreground gradient will be moved to the style!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_3B61DB22.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_6C14E2CD.png" width="958" height="833" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can see that the TextBlock does not contain the Foreground property anymore, but the TextBlockStyle1 style does. We can go and “Convert to Local Value” for all properties we want in the style. Even the drop shadow and the Perspective transform can be extracted this way.&lt;/p&gt;  &lt;p&gt;Here is the end result:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_3F8BB2E7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_30E10702.png" width="633" height="873" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Nice and clean XAML for the TextBlock, and the style is ready to be reused. Great!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1817" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="WPF" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/WPF/default.aspx" /><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /><category term="Expression Blend" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Expression+Blend/default.aspx" /></entry><entry><title>Interview with Silverlightshow.net and a sneak preview of my next articles</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/01/16/interview-with-silverlightshow-net-and-a-sneak-preview-of-my-next-articles.aspx" /><id>/blogs/vbandi/archive/2010/01/16/interview-with-silverlightshow-net-and-a-sneak-preview-of-my-next-articles.aspx</id><published>2010-01-16T13:51:11Z</published><updated>2010-01-16T13:51:11Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.silverlightshow.net/" target="_blank"&gt;SilverlightShow&lt;/a&gt; recently published an interview with me. They asked about how the showcase app at &lt;a href="http://www.response.hu"&gt;www.response.hu&lt;/a&gt; came to be, and asked me to talk about two of my &lt;a href="http://www.response.hu" target="_blank"&gt;company’s&lt;/a&gt; award winning projects: The Muvesz WPF application (&lt;a href="http://msdn.microsoft.com/en-us/library/bb985494.aspx" target="_blank"&gt;Architecture Journal article is here&lt;/a&gt;), and &lt;a href="http://www.zoomery.com" target="_blank"&gt;Zoomery&lt;/a&gt;, our Silverlight deep zoom framework. &lt;/p&gt;  &lt;p&gt;In the interview, I also revealed that I will be doing a series of articles / screencasts on how the &lt;a href="http://www.response.hu"&gt;www.response.hu&lt;/a&gt; showcase app was built. The focus will be on using Blend with tips and tricks, and creating custom behaviors to give designers maximum control over the user experience. Essentially, we will go from this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_514F4E04.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_7025C1E2.png" width="563" height="446" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_1D3AAEB1.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_1A4549FE.png" width="776" height="313" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The first article should be up on SilverlightShow within a few weeks. I’ll keep you posted :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1781" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>What Silverlight deed am I proud of in 2009?</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2010/01/12/what-silverlight-deed-am-i-proud-of-in-2009.aspx" /><id>/blogs/vbandi/archive/2010/01/12/what-silverlight-deed-am-i-proud-of-in-2009.aspx</id><published>2010-01-11T23:54:20Z</published><updated>2010-01-11T23:54:20Z</updated><content type="html">&lt;p&gt;&lt;em&gt;John Papa asked me (and other Silverlight MVPs) what was the one BIG thing we did around Silverlight in 2009. Here is what I had to say:&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;As a few of you may know, although I have technical background, I am really in love with Silverlight (and WPF) for the user experience it makes possible. I think my BIG thing was that I spread the love on tons of Silverlight and related topics during 2009. I had a 4 hour talk about UX, sketching and Sketchflow at the Architecture Forum; 4 hour talk about Silverlight, another one on NUI at the same place (and I got the highest ranks for the sketching talk out of 8 presenters). I talked about Silverlight 3 beta, and later about Silverlight 3 the next working day after it was released – in the middle of the summer, still over 90 people came. I participated in the local Silverlight 3 launch event later, in front of 500 people with sessions about SL3 and Blend. I had several other talks about Blend and Sketchflow, including a 5 minute(!) Sketchflow talk in front of Linux and Mac maniacs – and they liked it! I launched the Hungarian Silverlight User Group in December, and we already have 35 members, probably because they know me from the conferences. I wrote the WPF chapter of the book “Visual Studio 2010 and .Net Framework 4 Six-in-one” (&lt;a href="http://www.amazon.com/Visual-Studio-2010-NET-Six/dp/0470499486"&gt;http://www.amazon.com/Visual-Studio-2010-NET-Six/dp/0470499486&lt;/a&gt;), and convinced the editor to turn it around, focus on UX and Silverlight, and only add a little bit of WPF at the end. But the biggest result from all this preaching about UX and the great technologies that make it possible to concentrate on UX, is that I believe the Hungarian audience is starting to get it. They are realizing that getting developers to do UI may not be the best idea. They are realizing, that UX will be the differentiating factor for their products in the middle term. And spreading this word is my passion. Towards the last months of 2009, I started to receive feedback that the transition has started to happen in the minds of Hungarian developers and managers. This is probably what I am most proud of.&lt;/p&gt;  &lt;p&gt;Another big thing for me (but maybe not for Silverlight :) ) is that I became part of this awesome group [Silverlight MVPs], and had the chance to meet many of you online, or even in person. 33 days from now, I will be sitting on a plane to meet even more fellow MVPs at the Summit. Can’t wait!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1755" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="User Experience" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/User+Experience/default.aspx" /><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /></entry><entry><title>No more magic strings with VisualStateManager.GoToState</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/12/29/no-more-magic-strings-with-visualstatemanager-gotostate.aspx" /><id>/blogs/vbandi/archive/2009/12/29/no-more-magic-strings-with-visualstatemanager-gotostate.aspx</id><published>2009-12-29T22:00:00Z</published><updated>2009-12-29T22:00:00Z</updated><content type="html">&lt;p&gt;This may come as no surprise for some, but only today have I discovered a way to get rid of the magic strings when changing states with the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.windows.visualstatemanager.gotostate(VS.95).aspx"&gt;VisualStateManager.GoToState&lt;/a&gt; method. The way Microsoft and many others were explaining the Visual State Manager is via a sample code like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;VisualStateManager.GoToState(control, &lt;span class="str"&gt;&amp;quot;statename&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
&lt;style&gt;&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, this introduces a magic string, namely &amp;ldquo;statename&amp;rdquo;. The problem with the magic string here is that it creates a tight contract between the XAML (where the states are usually defined) and the code behind. It is very easy to mistype the name of the state in either place. Also, if the state is renamed by the designer in Blend, you get no compiler warnings or even runtime exceptions to point out the error.&lt;/p&gt;
&lt;p&gt;Here is a small XAML sample using the Visual States to move an ellipse to the right of a Grid:&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt;  &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LightBlue&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualStateGroup&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SG1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualStateGroup.Transitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualTransition&lt;/span&gt; &lt;span class="attr"&gt;GeneratedDuration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:01&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualTransition.GeneratedEasingFunction&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ElasticEase&lt;/span&gt; &lt;span class="attr"&gt;EasingMode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EaseOut&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualTransition.GeneratedEasingFunction&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualTransition&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualStateGroup.Transitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualState&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SG1Normal&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;VisualState&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SG1EllipseRight&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt; &lt;span class="attr"&gt;BeginTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:00&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:00.0010000&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ellipse&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EasingDoubleKeyFrame&lt;/span&gt; &lt;span class="attr"&gt;KeyTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:00&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;320&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualState&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualStateGroup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Ellipse&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ellipse&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Red&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Stroke&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Black&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                 &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;116&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;50,98,0,0&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                 &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;235&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;RenderTransformOrigin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0.5,0.5&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Ellipse.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TransformGroup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ScaleTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SkewTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RotateTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TranslateTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TransformGroup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Ellipse.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Ellipse&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The key to my &amp;ldquo;discovery&amp;rdquo; is realizing that the VisualState elements have an x:Name attribute, and therefore fields get generated for them in the codebehind. So, instead of &lt;/p&gt;
&lt;pre class="csharpcode"&gt;VisualStateManager.GoToState(control, &lt;span class="str"&gt;&amp;quot;SG1EllipseRight&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;We can write:&lt;/p&gt;
&lt;pre class="csharpcode"&gt; VisualStateManager.GoToState(&lt;span class="kwrd"&gt;this&lt;/span&gt;, SG1EllipseRight.Name, &lt;span class="kwrd"&gt;true&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;Now, if the state gets renamed, at least we get a compiler error, and there is no way that you can mistype the state name. &lt;/p&gt;
&lt;p&gt;Another advantage of accessing the states by name is that now it is easy to find when a state transition animation ends (like the one above). Just use the VisualState.Storyboard.Completed event:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;SG1EllipseRight.Storyboard.Completed += (sender, args) =&amp;gt; 
      MessageBox.Show(&lt;span class="str"&gt;&amp;quot;Ellipse move finished!&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;That is two big problems that I had with Visual States solved. Now if only I could get the current state somehow&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here&amp;nbsp; is a little bonus:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can also create some extension methods on VisualState as it may fit your way of thinking better:&lt;/p&gt;
&lt;pre class="csharpcode"&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; VisualStateHelper
    {
        &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; Activate(&lt;span class="kwrd"&gt;this&lt;/span&gt; VisualState state, Control control, &lt;span class="kwrd"&gt;bool&lt;/span&gt; useTransitions)
        {
            VisualStateManager.GoToState(control, state.Name, useTransitions);
        }

        &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; Activate(&lt;span class="kwrd"&gt;this&lt;/span&gt; VisualState state, Control control)
        {
            state.Activate(control, &lt;span class="kwrd"&gt;true&lt;/span&gt;);
        }
    }&lt;/pre&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
Now, to activate the SG1EllipseRight state above, all you have to write is:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;SG1EllipseRight.Activate(&lt;span class="kwrd"&gt;this&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all, folks!&lt;/p&gt;
&lt;p&gt;
&lt;style&gt;&lt;/style&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1687" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>Make a Silverlight TextBox update its binding on every character with a Behavior</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/12/24/make-a-silverlight-textbox-update-its-binding-on-every-character.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="14798" href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.00.16.54/SLTextBoxUpdateBinder.zip" /><id>/blogs/vbandi/archive/2009/12/24/make-a-silverlight-textbox-update-its-binding-on-every-character.aspx</id><published>2009-12-24T00:06:00Z</published><updated>2009-12-24T00:06:00Z</updated><content type="html">&lt;p&gt;An old problem with Silverlight TextBox is that it only updates its binding when the TextBox loses focus. This can cause a lot of problems, especially for LOB applications. Following a short discussion on Twitter with Rob Eisenberg (@&lt;a target="_blank" href="http://www.twitter.com/EisenbergEffect" class="null"&gt;EisenbergEffect&lt;/a&gt;), I tried to create a proof-of-concept behavior that can help ease this pain, at least until Silverlight gets an UpdateSourceTrigger that can handle the PropertyChanged value. (You can read more about the problem Rob had on &lt;a target="_blank" href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=521954#details"&gt;Connect&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The behavior itself is very simple:&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; TextBoxUpdateBehavior : Behavior&amp;lt;TextBox&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnAttached()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;            &lt;span class="kwrd"&gt;base&lt;/span&gt;.OnAttached();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;            AssociatedObject.TextChanged += AssociatedObjectOnTextChanged;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AssociatedObjectOnTextChanged(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, TextChangedEventArgs args)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;            var bindingExpr = AssociatedObject.GetBindingBLOCKED EXPRESSION;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            AssociatedObject.TextChanged -= AssociatedObjectOnTextChanged;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The key is in the TextChanged event handler. We simply get the Binding expression for the Text property of the TextBox, and call UpdateSource on it.&lt;/p&gt;
&lt;p&gt;I tested the behavior with both UI-2-UI binding and with binding to a ViewModel. Both work flawlessly, and they even work at the same time as this screenshot shows:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_1D0EE1F7.png"&gt;&lt;img height="69" width="582" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_3CBDBBBF.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As you can see, the cursor is still in the TextBox, so I have not moved the focus away after typing.&lt;/p&gt;
&lt;p&gt;Here is the entire XAML: &lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns:d&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:mc&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="attr"&gt;mc:Ignorable&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:i&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:local&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clr-namespace:SLTextBoxUpdateBinder&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SLTextBoxUpdateBinder.MainPage&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;span class="attr"&gt;d:DesignWidth&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;640&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;d:DesignHeight&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;480&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl.DataContext&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;local:TestVM&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl.DataContext&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &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;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Binding using ViewModel: &amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &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;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding TestProperty}&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Black&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &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;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Binding using UI-2-UI binding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &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;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding Text, ElementName=tb}&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &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;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Enter text here to see it shown above. No need to tab away!&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBox&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;tb&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding TestProperty, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;local:TextBoxUpdateBehavior&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;I have attached the solution to this blog post. Marry Christmas everyone!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1654" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>Another video from TechEd 2009</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/12/18/another-video-from-teched-2009.aspx" /><id>/blogs/vbandi/archive/2009/12/18/another-video-from-teched-2009.aspx</id><published>2009-12-18T16:17:18Z</published><updated>2009-12-18T16:17:18Z</updated><content type="html">&lt;p&gt;Karen Young, the EMEA MVP lead has interviewed me last month in Berlin about who I am, what I did there and why I think being a developer is exciting. Here is the video:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=_9zYuFdh0mo" target="_blank"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_02E189E8.png" width="601" height="394" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1620" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="UX Thoughts" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/UX+Thoughts/default.aspx" /></entry><entry><title>Discovering Silverlight 4 – What is new?</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/11/18/discovering-silverlight-4-what-is-new.aspx" /><id>/blogs/vbandi/archive/2009/11/18/discovering-silverlight-4-what-is-new.aspx</id><published>2009-11-18T21:24:00Z</published><updated>2009-11-18T21:24:00Z</updated><content type="html">&lt;p&gt;Today, at the PDC in Los Angeles, Scott Guthrie revealed Silverlight 4 in his keynote. The painful silence enforced by the NDA is now over, and I can talk about all the cool new stuff on Silverlight 4!&lt;/p&gt;
&lt;p&gt;To me, the most amazing thing is how much the Silverlight team has been listening to the community. Just take a look at the Top 10 most requested SL4 features at: &lt;a href="http://silverlight.uservoice.com/pages/4325-feature-suggestions" title="http://silverlight.uservoice.com/pages/4325-feature-suggestions"&gt;http://silverlight.uservoice.com/pages/4325-feature-suggestions&lt;/a&gt;, and compare it with the whatsnew document -&amp;nbsp; 8 out of the top 10 requests are in the Beta, except for the two where iPhone and other device support is discussed. This is an amazing proof that the Silverlight Team is really customer-driven, congrats!&lt;/p&gt;
&lt;p&gt;So, here is the official &amp;ldquo;Summary of Features New in Silverlight 4&amp;rdquo;, with some of my additional explanations:&lt;/p&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;Runtime: Silverlight 4 is based on the CLR4 runtime. This means that we can use all the cool dynamic stuff from C# 4.0 &amp;ndash; much easier to communicate with DOM objects, Javascript, etc.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Out of Browser Apps&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Elevated Privilages Support &lt;em&gt;&amp;ndash; this is really huge, removes most of the security restrictions. A great new way to write more full-featured cross platform applications!&lt;/em&gt;
&lt;ul&gt;
&lt;li&gt;Cross Domain Networking Access &lt;em&gt;&amp;ndash; no more proxies for you Twitter client&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Full file path from Open/SaveFileDialog &lt;/li&gt;
&lt;li&gt;No User-Initiation Requirement for Full Screen, Open/SaveFileDialogs &amp;ndash; &lt;em&gt;however, you can only access files directly within the My Documents folder or the Mac equivalent&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;COM Interop: &lt;em&gt;obviously, this is Windows only. C# 4.0 dynamics helps here a lot&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;HTML Hosting Support &lt;em&gt;&amp;ndash; it would really be useful within the browser as well, but there were too many security considerations to make it happen in this release. Still, I can&amp;rsquo;t wait to see what people will cook up with this one&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Media&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;WMS Multicast Support &amp;ndash; &lt;em&gt;Save your server&amp;rsquo;s bandwidth when streaming videos!&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;MP4 Playback Protected by PlayReady DRM &amp;ndash; &lt;em&gt;Should help ease Hollywood&amp;rsquo;s mind a little bit&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Offline DRM &amp;ndash; &lt;em&gt;Download songs and movies, and play them without a network connection on the plane&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Output Protection &amp;ndash; &lt;em&gt;again, for helping Hollywood accept online media&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;WebCam / Mic Support &amp;ndash; &lt;em&gt;This is raw access only to the webcam or microphone data &amp;ndash; nothing fancy like streaming it to a server, etc. I am sure, the community will come up with that pretty soon&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Printing&lt;/strong&gt; &amp;ndash; &lt;em&gt;The number one requested feature, that was the biggest setback when discussing Silverlight based Line Of Business applications.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;RichTextBox&lt;/li&gt;
&lt;li&gt;Arabic and Hebrew Text Support &amp;ndash; &lt;em&gt;I had a few people specificly asking for this while helping out at the &amp;ldquo;Ask The Experts&amp;rdquo; booth during the TechEd in Berlin. I wish I could tell them what I knew&amp;hellip; NDA sometimes sucks&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;IME Improvements for TextBox&lt;/li&gt;
&lt;li&gt;UIElement.TextInput event &amp;ndash; &lt;em&gt;for when you want to validate or update on text changes in your textbox&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Controls, ControlModel, Layout&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Theming via Implicit Styles &amp;ndash; &lt;em&gt;No more need to specify styles for each and every button in your app&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;ViewBox &amp;ndash; &lt;em&gt;This extremely useful layout control is now mover to the the core runtime from the Toolkit&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;MouseWheel Support on ScrollViewer, TextBox, Combobox, Calendar, DatePicker &amp;ndash; &lt;em&gt;Yeah! I&amp;rsquo;ve missed it a lot&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;RTL Layout via UIElement.FlowDirection property &amp;ndash; &lt;em&gt;this one will also make some countries&amp;rsquo; developers happy&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;VisualStateGroup.CurrentStateGroup property &amp;ndash; &lt;em&gt;no more need to follow / guess states yourself. Altough a well-behaving ViewModel should already know the Visual State of the View&amp;hellip;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;CommandProperty on ButtonBase &amp;amp; hHyperlink &amp;ndash; &lt;em&gt;Commanding is slowly getting there&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;SelectedValue and SelectedValuePath properties on Selector &amp;ndash; &lt;em&gt;very convenient thing for simple dropdowns, etc.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Drop files onto Silverlight from Exporer or Finder (Mac) &lt;em&gt;&amp;ndash; no need to browse, just drop files onto Silverlight!&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Memory Usage Fix During Progressive Downloads &amp;ndash; &lt;em&gt;it is always good to fix memory usage&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Automatically adding Referrer Header &amp;ndash; &lt;em&gt;behaving like a good citizen&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Authentication Support on ClientHttpWebRequest &amp;ndash; &lt;em&gt;this one was really missed&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tools Support&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Dispatcher Support on the Tools Design Surface&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Databinding improvements&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;DataBinding Support for DependencyObjects &amp;ndash; Yeeee&lt;em&gt;y! Now you can bind to behaviors, and so much more. This one opens up quite a few new possibilities&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;IDataErrorInfo Support&lt;/li&gt;
&lt;li&gt;StringFormat, TargetNullValue &amp;amp; FallBackValue properties on Binding &amp;ndash; &lt;em&gt;This can save a lot of error handling code and replace basic converters&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;ObservableCollection&amp;lt;T&amp;gt; constructor that takes INumerable or IList &amp;ndash; Quickly f&lt;em&gt;ill up your ObservableCollection with data. &lt;/em&gt;&lt;/li&gt;
&lt;li&gt;IEditableCollectionView&lt;/li&gt;
&lt;li&gt;Grouping support on CollectionViewSource&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SDK&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Astoria 2.0 Support&lt;/li&gt;
&lt;li&gt;MEF &amp;ndash; &lt;em&gt;I am really interested in how this one works. As Yoda would say: &amp;ldquo;A lot of extensible Silverlight Applications in the future I see&amp;rdquo;.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is a pretty impressive feature set, especially as &lt;strong&gt;it has only been 4 months since the release of Silverlight 3&lt;/strong&gt;. What do you think?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1443" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /><category term="Discovering Silverlight 4" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Discovering+Silverlight+4/default.aspx" /></entry><entry><title>My Teched Online talk: “Why Take User Experience Seriously?” is online</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/11/18/my-teched-online-talk-why-take-user-experience-seriously-is-online.aspx" /><id>/blogs/vbandi/archive/2009/11/18/my-teched-online-talk-why-take-user-experience-seriously-is-online.aspx</id><published>2009-11-18T06:52:38Z</published><updated>2009-11-18T06:52:38Z</updated><content type="html">&lt;p&gt;During TechEd Europe, my friend &lt;a href="http://inovak.dotneteers.net" target="_blank"&gt;István Novák&lt;/a&gt; interviewed me about user experience.&amp;#160; Here is the resulting video:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.msteched.com/online/view.aspx?tid=daa2572e-7f58-4428-ad85-625cac61aa11"&gt;Why Take User Experience Seriously?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The software development industry is changing; the focus is being shifted from technology to the users. Silverlight MVP András Velvárt shares his thoughts on why UX focus is a must for development teams, and what you can do to incorporate UX into the development process.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.msteched.com/online/view.aspx?tid=daa2572e-7f58-4428-ad85-625cac61aa11"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_4B78261D.png" width="244" height="132" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In return, I also interviewed István, and he talked about &lt;a href="http://www.msteched.com/online/view.aspx?tid=daa2572e-7f58-4428-ad85-625cac61aa11"&gt;Deploying Visual Studio 2010 Extensions&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Due to the COM roots of Visual Studio and the lack of the right tool set, deploying Visual Studio extension requires &amp;quot;creativity&amp;quot; from developers. Visual Studio 2010 is a great leap on this field with its brand new tools and technologies, including Extension Manager, Visual Studio Gallery and VSIX. This discussion will provide an overview of these tools and demonstrate how developers can leverage the synergy of these tools to remove the deployment pain.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.msteched.com/online/view.aspx?tid=e1124e24-5b37-498e-8ca6-a1aac565d085"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_5F9142A6.png" width="244" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1439" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author></entry><entry><title>Silverlight is slowly becoming the real WPF/Everywhere</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/09/28/a-silverlight-kit-246-r-233-se-a-desktopr-243-l-az-igazi-wpf-everywhere.aspx" /><id>/blogs/vbandi/archive/2009/09/28/a-silverlight-kit-246-r-233-se-a-desktopr-243-l-az-igazi-wpf-everywhere.aspx</id><published>2009-09-28T14:49:22Z</published><updated>2009-09-28T14:49:22Z</updated><content type="html">&lt;p&gt;Maybe some of you know, that originally Silverlight was called WPF/E, or WPF Everywhere. This meant that it would be a cross-platform, cross-device little brother of WPF. You could see a few videos years ago on Channel9, showing off some working Silverlight Mobile applications (they were pretty slow though). But no questions regarding when this would be available was answered – until now.&lt;/p&gt;  &lt;p&gt;During the Silverlight Firestarter event, we could hear Brad Abrams say that Microsoft’s goal was to get Silverlight on all three screens, and the cloud. The cloud is of course Azure (but would work with other environments, too), and the client side environment would be Silverlight. The three screens are the desktop, the mobile phone and the television. Since then, quite a few articles have appeared, and MS officials have officially stated that “We are 100% dedicated to seeing Silverlight&amp;quot; across all three screens”. (&lt;a href="http://www.rethink-wireless.com/article.asp?article_id=1950"&gt;Microsoft will push Silverlight 3.0 across all three screens&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;Why is this interesting? You can use the same .net programming language, the same rich design tools and graphics capabilities to create great looking, usable and “rich” applications – be it a mobile phone, a TV, the web or the desktop. The goal is to make all these runtimes binary compatible. The applications can be fed with data from the same cloud, or store their data on the cloud. You can start viewing a movie at home on the TV, and finish it on the bus on your phone (or in a worse case, in the office…) We can use .Net RIA Services or WCF… Finally (hopefully) it won’t be a pain in the backside to develop cool and of course useful applications for mobile. Of course, from a UX point of view, a TV and a touchscreen UI needs totally different design.&lt;/p&gt;  &lt;p&gt;Another related news is that Microsoft is going to work with Intel, independently of the Mono effort to create a Silverlight runtime for the Moblin platform. Silverlight for Moblin is going to be highly optimized for the Atom processor. (Moblin is a Linux based OS and app. stack for Mobile Internet Devices, netbooks, nettops, car computers, etc.).&lt;/p&gt;  &lt;p&gt;Finally about the when: it seems like the next step may be Silverlight Mobile (for Nokia S60 and Windows Mobile 7). Unfortunately, it is unknown whether Silverlight will be working on WM6 – but the leaked baseline &lt;a href="http://www.intomobile.com/2009/05/12/microsoft-pink-specs-windows-mobile-7-requirements-leak.html"&gt;hardware requirements for WinMo7&lt;/a&gt; seem to be strong enough to make Silverlight run decently. Maybe we will know more during the PDC in autumn!&lt;/p&gt;  &lt;p&gt;The new Silverlight mantra is: cross-browser, cross-platform, cross-device. It seems we are looking forward a great time to develop rich applications for all devices!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1212" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>UX thoughts – Learning Phase Tools III</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/09/18/ux-thoughts-learning-phase-tools-iii.aspx" /><id>/blogs/vbandi/archive/2009/09/18/ux-thoughts-learning-phase-tools-iii.aspx</id><published>2009-09-18T08:46:40Z</published><updated>2009-09-18T08:46:40Z</updated><content type="html">&lt;p&gt;In my &lt;a href="http://dotneteers.net/blogs/vbandi/archive/2009/07/05/ux-thoughts-learning-phase-tools-ii.aspx"&gt;last post&lt;/a&gt; in the &lt;a href="http://dotneteers.net/blogs/vbandi/archive/tags/UX+Thoughts/default.aspx"&gt;UX thoughts series&lt;/a&gt;, I wrote about how allowing the user to experiment and being consistent with the already existing knowledge of the user can help learning to use your software. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Reusing existing applications&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_273EF928.png" width="244" height="155" /&gt; If we are taking the consistency thing a bit further, the next step is to reuse already existing applications. For example, if you are creating a CRM (Customer Relationship Management) software, you may want to consider putting it inside Outlook. Chances are that your users already have a lot of contact data in Outlook – why not just add your unique features inside Outlook, and reuse their existing data and their knowledge of Office instead of inventing something totally new? Users will love the fact that they don’t have to reenter their data in a different system, and you will not have to build half of Outlook and Exchange Server from scratch.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Physical devices&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_225C456C.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_6A5A5188.png" width="244" height="175" /&gt;&lt;/a&gt;This is the keyboard I am using at home.&amp;#160; It is fairly convenient, silent and feels good to type on. But from the UX point of view, what is most interesting is that it has small text on some of the keys. For example, on the front face of the “S” key, there is “* Save”, and on the front face of the V key there is “* Paste”. What happened here is that the most common shortcut keys of the Windows world have been transferred to the physical world – and computer newbies can learn these shortcuts just by looking at their keyboard! &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Function search&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Even in this series, I have often praised the Ribbon and said that I find it to be a great step forward in terms of UX. However, there is one big drawback of the Ribbon: it is new. Being new means that people have to get used to it. getting used to something takes time, and if you were fairly familiar with the old this can be a frustrating experience. There will be fallback on your productivity, you will hunt for features that you knew where to find in the old menu system by heart. This made quite a lot of people to hate Office 2007 and the Ribbon. &lt;/p&gt;  &lt;p&gt;Microsoft has built into Office 2007 a feature called Office 2003 access key. For example, when you press ALT+I in Word 2007, it will pop up a small window, and tell you to continue your shortcut key sequence. This works OK, but most people were using the menus and toolbars, not the shortcut keys even for trivial tasks, like undo. Also, there is no way in Office 2007 to learn where things have been moved to. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_10BC34D4.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_6981EB9E.png" width="244" height="197" /&gt;&lt;/a&gt; Microsoft has of course realized this, and has launched a tool called “&lt;a href="http://office.microsoft.com/en-us/word/HA100744321033.aspx"&gt;Interactive: Word 2003 to Word 2007 command reference guide&lt;/a&gt;”. A horrible name, but the biggest problem is that it is online, and not built into Office. By the time the user starts to look for help on migration of his knowledge online, he will be very frustrated – and even then, finding this tool is not simple. The tool itself works OK though: it shows you a Flash version of the Office 2003 UI, and tells you where the commands and toolbar buttons, etc can be found in the new Office. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, what is the solution to this problem? Search, of course. But let’s not search in Help (which is also a different application), let’s search in the Ribbon:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_5019E864.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_0F779BF5.png" width="644" height="117" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is the &lt;a href="http://www.officelabs.com/#searchcommands"&gt;Search Commands add-in&lt;/a&gt;. You just type in the search box, and it shows you the matching commands, buttons, etc in the results, allows you to get more help. But the most important part is that you can immediately activate the commands, and also learn where to find it later without search. Another noteworthy aspect of the Search Commands is that searching goes beyond just the name of the command itself. For example, in PowerPoint, if you search for “screen”, it will show how commands to change monitors, window management, etc. This makes the search functionality a lot more than just searching for commands – if you would like to know whether the application supports a given feature at all, you can search for the feature, and receive immediate feedback, with the added bonus of being able to immediately execute the command or learn where you can find it. There is one big problem with the Search Commands Feature: it is not part of the Ribbon, but only an unsupported add-in. That’s a shame as I am sure that a lot of the initial frustrations with the Ribbon and Office 2007 could have been avoided if Search Commands was in Office out of the box. And it is not included in Word 2010 CTP either… hear that, Microsoft? Put it in the product!&lt;/p&gt;  &lt;p&gt;Another example where search helps during the learning phase (and the productivity phase, too) is Window Vista’s Control Panel, which has been further extended in Windows 7. The problem with XP’s Control Panel is that there are so many little applets, you are often hunting among them to find the one you need. And even then, the functionality you need can be buried so deep in tabs and sub-sub dialogs that you never found them. You had to follow the sometimes twisted logic of the original developers, and hope that you can figure out which category THEY thought the setting belonged to. Where do you change the IP address? In Computer Setting? Or Network Settings? Or Network Card settings? Or Communications?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_67D11FCA.png"&gt;&lt;img style="border-right-width:0px;margin:0px 10px 0px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" align="left" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_15523F8E.png" width="244" height="97" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the new Control Panel, you can just type “IP” in the search box, and it immediately takes you to the right applet. There is still a considerable amount of guessing to do after this as&amp;#160; you have to select the right network adapter, and open two dialog boxes to find the proper setting, but still – this is a huge step forward both for learning functionality and then for accessing it quickly. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1191" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="User Experience" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/User+Experience/default.aspx" /><category term="UX Thoughts" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/UX+Thoughts/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>Discovering Silverlight 3 – 5 minutes of RIA Services</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/09/08/discovering-silverlight-3-5-minutes-of-ria-services.aspx" /><id>/blogs/vbandi/archive/2009/09/08/discovering-silverlight-3-5-minutes-of-ria-services.aspx</id><published>2009-09-08T14:58:27Z</published><updated>2009-09-08T14:58:27Z</updated><content type="html">&lt;p&gt;In July, I gave a talk about Silverlight 3, and even though the entire session was 3 hours (and two bottles of mineral water) long, I only had 5 minutes for RIA Services. So, my only goal was to shed some light on the topic, and scratch the surface of the surface… Let me sum that part up here. Disclaimer: this is just a quick blog post answering a &lt;a href="http://silverlight.net/forums/p/126078/283562.aspx#283562"&gt;forum question&lt;/a&gt;, by no way a proper RIA Services intro.&lt;/p&gt;  &lt;p&gt;The official “What is .Net RIA Services” summary from the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce&amp;amp;displaylang=en"&gt;download page&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“Microsoft .NET RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. RIA Services provides a pattern to write application logic that runs on the mid-tier and controls access to data for queries, changes and custom operations. It also provides end-to-end support for common tasks such as data validation, authentication and roles by integrating with Silverlight components on the client and ASP.NET on the mid-tier. “&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The way I like to put it: &lt;/p&gt;  &lt;p&gt;.NET RIA Services simplifies communication between the client and the server, handling object transfer, validation, authentication and basic CRUD (Create, Retrieve, Update, Delete) operations and asynchronous calls almost transparently.&lt;/p&gt;  &lt;p&gt;Data transfer between the client and the server has always been tricky. There is a lot of plumbing code to write: encoding, remote calls, error handling, asynchronous issues, validation (you have to validate stuff on the server for security and on the client for instant feedback and user experience). Let’s see how .NET RIA Services handles some of these!&lt;/p&gt;  &lt;p&gt;Let’s have a single table from our old friend, the Northwind database in a LINQ to SQL dbml file:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_717F31BE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_558DFCC6.png" width="704" height="395" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;(Yeah, that’s me :) – btw, sorry for the quality of the code snippets below, they are just frames from the same presentation video)&lt;/p&gt;  &lt;p&gt;Using the Visual Studio .NET RIA Services wizards (for details, please check the tutorial on the same &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce&amp;amp;displaylang=en"&gt;download page&lt;/a&gt; – this blog post is by no means a step by step introduction), let’s create a NorthWindService.cs class. This is still on the server side:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_2B5E4EDE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_22FA7987.png" width="717" height="245" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You can see that the NorthWindService class is inherited from LinqToSqlDomainService. .NET RIA Services can also connect to Entity Framework or even POCO object stores if you wish.It has functions like “GetCategories”, “InsertCategory”, etc, all generated automatically:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_6832D0B0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_341E315D.png" width="708" height="394" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Also note the EnableClientAccess attribute – that means that members of the NorthWindService class are (more or less) exposed to the client. This means, that after building, the code generator of the .NET RIA Services runs, and we get a lot of code generated on the Silverlight side that allow for using the same classes (Category in this case), with the same properties, and the CRUD functionality on the client side. Even validation logic and other custom code can be copied to the client! As we use the same .Net Framework on both the client and the Server, this source code reuse is possible and trivial.&lt;/p&gt;  &lt;p&gt;To actually show and download the data from the server, this is all I have to do on the Silverlight side:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_3CBE89E9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_6248074A.png" width="706" height="253" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;myDG is just a simple DataGrid, with absolutely no customization, only its name is provided in XAML.&lt;/p&gt;  &lt;p&gt;If we run the application now, this is what we see:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_479B6B31.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_31D182D4.png" width="695" height="206" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is an empty Datagrid, but if you watch closely, you can see that the fields of the Category class are already displayed as columns. So, at this moment, the Datagrid has an ItemsSource – a list of Category objects, but with zero items. If we wait for another second, the list populates:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_37AC266D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_2AD1D04F.png" width="688" height="246" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;What happened here? Well, the server needed a little time to compile everything and get the categories from the database. When it finished, it returned the resulting Category objects to the Silverlight client, which displayed it automatically. A lot of magic is happening behind the scenes: the RIA Services callback happened asynchronously, it filled the collection that was bound to the Datagrid’s Itemssource, and finally the Datagrid displayed the categories. All without any specific code after the load operation started!&lt;/p&gt;  &lt;p&gt;What happened on the SQL Server in the meantime? Let’s fire up an SQL Server Profiler, and see!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_5AAC7210.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_68128516.png" width="685" height="107" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is a perfectly normal SQL Query that you or I would write – maybe a bit more [] and t0 though. :) So, the client side “nwc.GetCategoriesQuery” travelled to the server, and this is the SQL Query that was run on the SQL Server. Let’s make the query a bit more complicated!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_07552BEA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_69276E35.png" width="636" height="278" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You see that through the power of Intellisense, LINQ and .NET RIA Services, we can write a strongly typed query against the Northwind database &lt;strong&gt;within the client application&lt;/strong&gt;!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_2D875F75.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_25238A1E.png" width="592" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So, we only want to get the categories that have “C” as their first character. &lt;/p&gt;  &lt;p&gt;And here is the result with the single such category displayed: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_1FD4A36D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_4A40D48A.png" width="608" height="81" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Yeah, sure, no problem – it must have downloaded all the categories, and filtered on the client side, right? Wrong! Let’s see the SQL Profiler what happened on the server!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_5087AB18.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_364741F4.png" width="534" height="108" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Nope – although the query is now executed via sp_executesql, we have a nice Where clause here even the StartsWith has been properly translated to LIKE. Pretty powerful, isn’t it?&lt;/p&gt;  &lt;p&gt;Remember, this is just the scratching of the surface of 0.1% of the .NET RIA Services Framework. But hopefully, it is enough to get you interested. For more information, read the downloadable intro material, check out &lt;a href="http://www.nikhilk.net/NET-RIA-Services-Vision-Architecture.aspx"&gt;posts&lt;/a&gt; from Nikhil or Brad Abrams’ series on a &lt;a href="http://blogs.msdn.com/brada/archive/2009/08/02/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-summary.aspx"&gt;Business Apps Example&lt;/a&gt;. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1167" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Discovering SL3" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Discovering+SL3/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry><entry><title>Can I jump to Silverlight 3 now? What do the stats say?</title><link rel="alternate" type="text/html" href="/blogs/vbandi/archive/2009/08/11/can-i-jump-to-silverlight-3-now-what-do-the-stats-say.aspx" /><id>/blogs/vbandi/archive/2009/08/11/can-i-jump-to-silverlight-3-now-what-do-the-stats-say.aspx</id><published>2009-08-11T20:58:39Z</published><updated>2009-08-11T20:58:39Z</updated><content type="html">&lt;p&gt;As you probably know, Silverlight 3 was released exactly a month ago. So, is it safe now to work with the new Silverlight 3 features or should you stay with Silverlight 2 for a while to make sure that people with Silverlight installed can view your site without having to upgrade first to SL3?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_6881B4C7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;margin:0px 10px 0px 0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" align="left" src="http://dotneteers.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/vbandi/image_5F00_thumb_5F00_5560881B.png" width="356" height="435" /&gt;&lt;/a&gt;There is one website that I know of that provides independent data on Flash, Java and Silverlight plugin penetration – it is &lt;a href="http://www.riastats.com"&gt;www.riastats.com&lt;/a&gt;. I know it is objective or at least definitely not pro-Microsoft because there has been a heated debate a few months back between the owner of the site and a Microsoft PM on whether riastats.com uses the right methodology… So, I was checking it on a daily basis to see how SL3 is taking off. It took off slowly… then SL3 was put onto Microsoft Update. On pretty much the same day, RiaStats stopped collecting new data, so everybody was in the dark.&lt;/p&gt;  &lt;p&gt;Well, Riastats started working again earlier today, so now we have new data from yesterday, and it blew my mind: Silverlight 3 is up at 23%, while Silverlight 2 is down at 8%. So, in general, every third computer or device (including devices like the IPhone for which there is no Silverlight) attached to the internet has some version of Silverlight installed. 1.5% stuck at SL1, 8.25% is at SL2, and the majority has already upgraded to SL3 (23.25%). The big X you see on the picture shows how SL2 installations were upgraded to SL3 in a matter of weeks.&lt;/p&gt;  &lt;p&gt;So, what is the answer to whether you can target Silverlight 3 in your projects, or if you should wait and keep your things with SL2 instead? I think it is clear – &lt;strong&gt;Go with Silverlight 3!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;A quick note about Microsoft Update: it is not the same as Windows Update, although it uses the same infrastructure – it is the update service for all non-Windows MS applications, like Office. Also, automatic update for Silverlight plugins is opt-in, so we can’t blame Microsoft that it has used its OS monopoly to distribute the Silverlight plugin.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;A quick note about Riastats.com: the site starts with a Pie Chart, showing Silverlight 3 at 1.5%. Please note that this is a 30 day moving average, so don’t expect it to show any meaningful data for at least a month with regards to SL3 penetration. Use the Line Chart instead to see the diagram on the left.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1122" width="1" height="1"&gt;</content><author><name>vbandi</name><uri>http://dotneteers.net/members/vbandi/default.aspx</uri></author><category term="Silverlight" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight/default.aspx" /><category term="Silverlight.net" scheme="http://dotneteers.net/blogs/vbandi/archive/tags/Silverlight.net/default.aspx" /></entry></feed>