<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.wintellect.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rik Robinson's Blog</title><link>http://www.wintellect.com/CS/blogs/rrobinson/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Windows 8 Start Menu Toggle</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/09/20/windows-8-start-menu-toggle.aspx</link><pubDate>Tue, 20 Sep 2011 16:16:18 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20237</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/20237.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=20237</wfw:commentRss><description>&lt;p&gt;Since getting my hands on Windows 8 this past week, I (like many others) have really grappled with the constant accidental returning to the metro tiles every time I try to search for something in the new neutered Start Menu that appears in the Developer’s Preview of Windows 8.&amp;#160; To say I hate that would be an understatement.&amp;#160; &lt;/p&gt;  &lt;p&gt;Today, a colleague forwarded me a &lt;a href="http://pureinfotech.com/2011/09/20/windows-8-how-to-bring-back-the-classic-start-menu-trick/"&gt;link to a blog entry&lt;/a&gt; that showed the magic registry key to get my beloved Start Menu mostly back the way it was.&amp;#160; Apparently, there is a &lt;a href="http://windows8startmenu.codeplex.com/"&gt;small GUI app on CodePlex&lt;/a&gt; that will take care of this as well.&amp;#160; &lt;/p&gt;  &lt;p&gt;I decided I didn’t want to see anything, I just want to toggle.&amp;#160; So, I threw together a quick Console App to take care of this.&amp;#160; I can place this app on my desktop in Windows 8 classic mode and just toggle back and forth without having to see anything but a quick flash of the console.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here’s the code:&lt;/p&gt;  &lt;pre&gt; &lt;br /&gt;&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:40f81473-29c4-4d96-9843-00eed82ca7cd" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background:#fff;overflow:auto;"&gt;
&lt;ol style="background:#141414;margin:0;padding:0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#a36f03;"&gt;using&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;Microsoft&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;Win32&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#a36f03;"&gt;namespace&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;ToggleStartMenu&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;class&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Program&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;    {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;        &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;static&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;void&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;Main&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#a36f03;"&gt;string&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;[] &lt;/span&gt;&lt;span style="color:#88934a;"&gt;args&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;        {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;            &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;rootKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; = &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Registry&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;CurrentUser&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;            &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;subKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; = &lt;/span&gt;&lt;span style="color:#88934a;"&gt;rootKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;OpenSubKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#a31515;"&gt;@&amp;quot;Software&amp;#92;Microsoft&amp;#92;Windows&amp;#92;CurrentVersion&amp;#92;Explorer&amp;quot;&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;                &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;RegistryKeyPermissionCheck&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;ReadWriteSubTree&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;span style="color:#88934a;"&gt;System&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;Security&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;AccessControl&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#2b91af;"&gt;RegistryRights&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;FullControl&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;);&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;            &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;if&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; (&lt;/span&gt;&lt;span style="color:#88934a;"&gt;subKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; != &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;null&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;            {&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;                &lt;/span&gt;&lt;span style="color:#a36f03;"&gt;var&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; &lt;/span&gt;&lt;span style="color:#88934a;"&gt;value&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; = (&lt;/span&gt;&lt;span style="color:#a36f03;"&gt;int&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;) &lt;/span&gt;&lt;span style="color:#88934a;"&gt;subKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;GetValue&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#008080;"&gt;&amp;quot;RPEnabled&amp;quot;&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;);&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;                &lt;/span&gt;&lt;span style="color:#88934a;"&gt;subKey&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;SetValue&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;(&lt;/span&gt;&lt;span style="color:#008080;"&gt;&amp;quot;RPEnabled&amp;quot;&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;span style="color:#88934a;"&gt;value&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; == &lt;/span&gt;&lt;span style="color:#00ffff;"&gt;0&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; ? &lt;/span&gt;&lt;span style="color:#00ffff;"&gt;1&lt;/span&gt;&lt;span style="color:#ffffff;"&gt; : &lt;/span&gt;&lt;span style="color:#00ffff;"&gt;0&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;, &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;RegistryValueKind&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;.&lt;/span&gt;&lt;span style="color:#88934a;"&gt;DWord&lt;/span&gt;&lt;span style="color:#ffffff;"&gt;);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;            }&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;        }&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#ffffff;"&gt;    }&lt;/span&gt;&lt;/li&gt;
&lt;li style="background:#080808;"&gt;&lt;span style="color:#ffffff;"&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here’s the &lt;a href="http://r2musings.com/downloads/ToggleStartMenu.zip"&gt;source&lt;/a&gt;.&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20237" width="1" height="1"&gt;</description></item><item><title>How to Scale a jQuery Mobile Site for iOS</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/07/25/how-to-scale-a-jquery-mobile-site-for-ios.aspx</link><pubDate>Mon, 25 Jul 2011 15:45:55 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20067</guid><dc:creator>rrobinson</dc:creator><slash:comments>1</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/20067.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=20067</wfw:commentRss><description>&lt;p&gt;I was recently working on a &lt;a href="http://jquerymobile.com/"&gt;jQuery Mobile&lt;/a&gt; application and everything looked great on my 21” touch monitor on several browsers, but when I deployed to the server and then hit the page on my &lt;a href="http://www.apple.com/iphone/"&gt;iPhone&lt;/a&gt;, I ran into a few issues that I needed to work through in order to make the site what I’d call usable. &lt;/p&gt;  &lt;p&gt;The first issue was that the site wasn’t scaling properly when it first loaded and everything was so small that I could barely click on it with my finger.&amp;#160; Certainly, this is not what I’d call optimal for a mobile site.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_17611282.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_41CD439F.png" width="241" height="360" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I originally played around with increasing font-size for the body and a few other quick CSS tricks, but nothing really did the trick.&amp;#160; I finally came across a meta tag which seemed to fix this issue.&amp;#160; &lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e1f32888-e533-4c30-9906-61af83ebc440" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;white-space:nowrap;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;meta&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;content&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;width=device-width, initial-scale=1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;viewport&amp;quot;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;   &lt;br /&gt;This is what it looked like after adding this meta tag.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_161C79A3.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_557A2D33.png" width="262" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;However, this created a new issue.&amp;#160; This second issue was that when I rotated from Portrait to Landscape mode, the web page did not scale properly and my toolbar buttons were now cutoff on the right-hand side like this: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_5FCB5193.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_062D34DF.png" width="405" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;I found numerous references to this known issue with iOS scaling and even found a few javascript fixes available around the web.&amp;#160; However, after a bit of experimenting, I found that I could fix the issue with just a few tweaks to the meta tag above and using no javascript.&amp;#160; The final meta tag looks like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7c6d37b1-a50c-482e-a42c-7a336729cdbb" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background-color:#ffffff;max-height:100px;overflow:auto;padding:2px 5px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;meta&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;content&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;width=device-width, minimum-scale=1, maximum-scale=1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;viewport&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is what the site looks like now when it’s rotated.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_0554CEF5.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_729FD53D.png" width="405" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20067" width="1" height="1"&gt;</description></item><item><title>How to Include and Deploy Data using a Visual Studio Database Project</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/07/24/how-to-include-and-deploy-data-using-a-visual-studio-database-project.aspx</link><pubDate>Sun, 24 Jul 2011 18:42:58 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20061</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/20061.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=20061</wfw:commentRss><description>&lt;p&gt;I’m a big fan of &lt;a href="http://msdn.microsoft.com/en-us/library/ff678491.aspx"&gt;Visual Studio’s Database Project&lt;/a&gt; and I’ve used them successfully in several client projects.&amp;#160; If you are not familiar with using the &lt;a href="http://msdn.microsoft.com/en-us/library/ff678491.aspx"&gt;Database Project&lt;/a&gt;, I encourage you to give it a look.&amp;#160; It gives me a nice warm feeling to see that the database schema and even necessary seed data is maintained in source control in the solution right along with the other projects.&amp;#160; For developers that need to get up and running locally, the joy of simply right-clicking and choosing “Deploy” is hard to beat.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Most any reasonably-sized application will have lookup lists and other data that need to be there for the application to function properly. To my knowledge, there’s not really an automated way in Visual Studio to tell the Database Project that you want to bring the data into the project and have it be part of your deployment. However, there is a way to tap into the scripts that Visual Studio creates when it creates a new Database Project. &lt;/p&gt;  &lt;p&gt;This post specifically addresses including and deploying data and is not intended as a general overview of Database projects.&amp;#160; There is plenty of decent material available on doing that.&amp;#160; To follow along with this post, you can simply add a new project in Visual Studio and choose the &lt;strong&gt;Database | SQL Server project&lt;/strong&gt; type and select the &lt;strong&gt;SQL Server 2008 Database Project&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTMLb6665b0_05786BAF.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTMLb6665b0" border="0" alt="SNAGHTMLb6665b0" src="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTMLb6665b0_thumb_51CFFF50.png" width="515" height="357" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;If you take a look in the Database project, you’ll see a folder called &lt;strong&gt;Scripts&lt;/strong&gt; and under &lt;strong&gt;Scripts&lt;/strong&gt; there are folders for both &lt;strong&gt;Pre-Deployment&lt;/strong&gt; and &lt;strong&gt;Post-Deployment&lt;/strong&gt;.&amp;#160; As we are interested in inserting data into tables, we obviously need to insert code in the &lt;strong&gt;Post-Deployment&lt;/strong&gt; step when the tables actually exist. If you open the &lt;strong&gt;Post-Deployment&lt;/strong&gt; folder, you’ll note a file called &lt;strong&gt;Script.PostDeployment.sql&lt;/strong&gt;.&amp;#160; This script is run automatically after the database is deployed by the Database project.&amp;#160; The scripts that are created here can contain any valid SQL.&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_378F962C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_501F337C.png" width="244" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You could place all of your post deployment INSERT statements into this &lt;strong&gt;Script.PostDeployment.sql &lt;/strong&gt;file directly, but that can get ugly quickly. Instead, I like to create separate files for each table for which I want to INSERT data.&amp;#160; I generally name the files &lt;strong&gt;Data.[TableName].sql&lt;/strong&gt;.&amp;#160; You can simply right-click on the &lt;strong&gt;Post-Deployment&lt;/strong&gt; folder and choose &lt;strong&gt;Add | Script&lt;/strong&gt;.&amp;#160;&amp;#160; For instance, here I have added a &lt;strong&gt;Data.State.sql&lt;/strong&gt; file that will insert all of the States into my State table after the database is deployed.&amp;#160;&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_41748797.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_5A0424E7.png" width="244" height="153" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Rather than hand-type my INSERT statements, I use &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt; (hereafter, &lt;strong&gt;SSMS&lt;/strong&gt;) and let it do the lifting for me.&amp;#160; In &lt;strong&gt;SSMS&lt;/strong&gt;, right-click on the database name and choose &lt;strong&gt;Tasks | Generate Scripts&lt;/strong&gt;.&amp;#160; This will launch the &lt;strong&gt;Generate and Publish Scripts Dialog&lt;/strong&gt;,&amp;#160; Under &lt;strong&gt;Choose Objects&lt;/strong&gt;, you can make the choice of which tables you want to export.&amp;#160; Below, I selected the State table and clicked Next which shows the &lt;strong&gt;Set Scripting Options&lt;/strong&gt; page.&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML79edafa_2E535AEB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML79edafa" border="0" alt="SNAGHTML79edafa" src="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML79edafa_thumb_2D7AF501.png" width="432" height="402" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the &lt;strong&gt;Set Scripting Options&lt;/strong&gt; page, you’ll want to select where you want to export the INSERT statements.&amp;#160; I usually just select Clipboard and then paste that into the appropriate file in Visual Studio.&amp;#160; The most important part of this page is the &lt;strong&gt;Advanced&lt;/strong&gt; button.&amp;#160; You’ll need to click this and go into the &lt;strong&gt;Advanced Scripting Options&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML7a0dc42_13A6BED2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML7a0dc42" border="0" alt="SNAGHTML7a0dc42" src="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML7a0dc42_thumb_7DDCD674.png" width="433" height="403" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The default behavior of the &lt;strong&gt;Generate and Publish Scripts Dialog &lt;/strong&gt;is to only script the schema generation and no data.&amp;#160; To change this to data only, you change the &lt;strong&gt;Types of data to script setting&lt;/strong&gt; to “&lt;strong&gt;Data only&lt;/strong&gt;”.&amp;#160;&amp;#160; You can then click OK and run the export.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML7a3f416_71DAE640.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML7a3f416" border="0" alt="SNAGHTML7a3f416" src="http://www.wintellect.com/CS/blogs/rrobinson/SNAGHTML7a3f416_thumb_1527DAE6.png" width="436" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the &lt;strong&gt;Generate and Publish Scripts Dialog &lt;/strong&gt;has completed the generation of your INSERT statements, you can paste these INSERT statements back into the sql file you created earlier in Visual Studio.&amp;#160; Here you see I’ve pasted these into the &lt;strong&gt;Data.States.sql&lt;/strong&gt; file that I created above.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_13E34207.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_48176B4D.png" width="523" height="147" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that you have the INSERT statements in your sql file, you need to tell Visual Studio to run your sql file after the deployment.&amp;#160; Recall that the &lt;strong&gt;Script.PostDeployment.sql&lt;/strong&gt; file created by Visual Studio is automatically run after deployment.&amp;#160; However, custom sql files that you create are not.&amp;#160; If you open the default &lt;strong&gt;Script.PostDeployment.sql file&lt;/strong&gt;, you’ll see comments that tell you that you can use SQLCMD syntax to include a file and even gives you an example.&amp;#160; Here is my &lt;strong&gt;Script.PostDeployment.sql file&lt;/strong&gt; with my custom &lt;strong&gt;Data.State.sql&lt;/strong&gt; file included.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_2DD70229.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_115A1049.png" width="530" height="199" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You’ll likely notice that there are squiggle lines and you’ll likely get a build error on the Script.PostDeployment.sql file.&amp;#160; To fix this, you’ll need to change the mode to SQLCMD.&amp;#160; You can do this by clicking the SQLCMD button in the T-SQL toolbar.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_25732CD2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_0C0B2998.png" width="244" height="39" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You should now be able to click the Execute SQL button to test run your &lt;strong&gt;Script.PostDeployment.sql&lt;/strong&gt; file.&amp;#160; When you are ready to deploy your schema and seed data to a new database, you can now simply right-click on your Database project and select Deploy.&amp;#160; Remember to update your Connection Strings as needed and you should be off and running.&amp;#160; &lt;/p&gt;  &lt;p&gt;Admittedly, this is a bit more manual than I’d like but the initial creation of the scripts goes pretty fast and the fact that the seed data and data schema are part of source control makes up for it in my book.&amp;#160; &lt;/p&gt;  &lt;p&gt;If anyone has a way that works better for them, I’d love to hear about it.&amp;#160;&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20061" width="1" height="1"&gt;</description></item><item><title>Portable and Efficient Generic Parser for CSV</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/07/10/portable-and-efficient-generic-parser-for-csv.aspx</link><pubDate>Mon, 11 Jul 2011 00:13:57 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20027</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/20027.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=20027</wfw:commentRss><description>&lt;p&gt;I recently had some pretty ugly CSV files to parse and decided to have a quick look around to see if there were any libraries around that would handle the specifics of these particular CSV files without me having to write yet another CSV parsing class.&amp;#160; I found a couple that seemed to fit the bill on &lt;a href="http://www.codeproject.com"&gt;Code Project&lt;/a&gt; and I downloaded them both.&amp;#160; The two specific ones that I looked at were Sebastien Lorien’s &lt;a href="http://www.codeproject.com/KB/database/CsvReader.aspx"&gt;Fast CSV Reader&lt;/a&gt; and Andrew Rissing’s &lt;a href="http://www.codeproject.com/KB/database/GenericParser.aspx"&gt;Generic Parser&lt;/a&gt;.&amp;#160; The first one I tried was the &lt;a href="http://www.codeproject.com/KB/database/CsvReader.aspx"&gt;Fast CSV Reader&lt;/a&gt; since it had some nice looking performance metrics on the Code Project page.&amp;#160; Unfortunately, it blew up on the first file and I decided to give the other parser a try rather than trying to debug why &lt;a href="http://www.codeproject.com/KB/database/CsvReader.aspx"&gt;Fast CSV Reader&lt;/a&gt; choked.&amp;#160; &lt;/p&gt;  &lt;p&gt;I next tried the &lt;a href="http://www.codeproject.com/KB/database/GenericParser.aspx"&gt;Generic Parser&lt;/a&gt; and it handled the file and even managed to return me just my specific data and skipped all the miscellaneous comments and headers in the CSV files using just the default settings.&amp;#160; On a couple of the CSV files, I made a few tweaks to the default settings of &lt;a href="http://www.codeproject.com/KB/database/GenericParser.aspx"&gt;Generic Parser&lt;/a&gt; to get the exact data values I needed.&amp;#160; So far, it has performed like a champ.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;There are many CSV parsers out there that are part of larger libraries of utilities and such, but for a quick solution to CSV parsing, I would definitely recommend having a look at Andrew Rissing’s &lt;a href="http://www.codeproject.com/KB/database/GenericParser.aspx"&gt;Generic Parser&lt;/a&gt;.&amp;#160; I’d love to hear other’s experiences and recommendations for CSV parsing libraries.&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20027" width="1" height="1"&gt;</description></item><item><title>Atlanta Code Camp Demos</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/07/07/atlanta-code-camp-demos.aspx</link><pubDate>Thu, 07 Jul 2011 12:37:31 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:20019</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/20019.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=20019</wfw:commentRss><description>&lt;p&gt;Another fantastic &lt;a href="http://www.atlantacodecamp.org/default.aspx"&gt;Atlanta Code Camp&lt;/a&gt;!&amp;#160;&amp;#160; Big kudos go out to the crew that threw this together this year in record time and did a fantastic job.&amp;#160; I heard nothing but positive comments from everyone that I talked with.&amp;#160; Big thank you to the sponsors, volunteers, organizers, speakers, and attendees!&lt;/p&gt;  &lt;p&gt;I gave two presentations this year: &lt;a href="http://codestock.org/Sessions/introduction-to-mef-for-silverlight.aspx"&gt;Intro to MEF for Silverlight&lt;/a&gt; and &lt;a href="http://codestock.org/Sessions/introduction-to-jounce-for-silverlight.aspx"&gt;Intro to Jounce MVVM Framework for Silverlight&lt;/a&gt;. Thanks to the folks that made it out to the talks and especially those of you that stuck with me for both of them.&lt;/p&gt;  &lt;p&gt;Here are the links to the slides and code:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.r2musings.com/downloads/IntroToMEF_RRobinson.zip"&gt;Intro to MEF for Silverlight&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.r2musings.com/downloads/IntroToJounce_RRobinson.zip"&gt;Intro to Jounce MVVM Framework for Silverlight&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;(Note that these are zip files with 7z files embedded so you will need to unzip and then “un-7z” them. The files were huge as straight zips and the server wouldn’t let them through as 7z files. &lt;a href="http://www.7-zip.org/"&gt;7-Zip&lt;/a&gt; is free and will work on both zip/7z files).&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=20019" width="1" height="1"&gt;</description></item><item><title>Moving further towards the Dark Side</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/06/28/moving-further-towards-the-dark-side.aspx</link><pubDate>Tue, 28 Jun 2011 22:37:15 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:19999</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/19999.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=19999</wfw:commentRss><description>&lt;p&gt;I’ve been a proponent of dark coding environments for many moons, back to Turbo C++ and &lt;strong&gt;&lt;a href="http://3.bp.blogspot.com/_Zhzwni_BRd4/TBV6xr019FI/AAAAAAAAAD4/doOoyq42KQo/s1600/tc.jpg"&gt;that blue&lt;/a&gt;&lt;/strong&gt;.&amp;#160; In fact, my current Visual Studio template started way back in the first version of Visual Studio for .NET. I actually painstakingly hand-copied my colors from &lt;a href="http://en.wikipedia.org/wiki/Macromedia_HomeSite"&gt;HomeSite&lt;/a&gt;.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;At the recent &lt;a href="http://www.atlantacodecamp.org/default.aspx"&gt;Atlanta Code Camp&lt;/a&gt;, I overheard someone mention a &lt;a href="http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378"&gt;Visual Studio Theme Editor&lt;/a&gt; that goes beyond your personal editing colors and extends into the actual Visual Studio shell (drool).&amp;#160; After a quick look around, I found the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378"&gt;Visual Studio Theme Editor&lt;/a&gt; and a &lt;a href="http://www.nerdpad.com/visual-studio/visual-studio-2010-dark-expression-blend-color-theme"&gt;really great .vstheme file&lt;/a&gt; that gets me pretty close to the &lt;a href="http://www.microsoft.com/expression/fw/sketchFlow/sketchflow_full_screen.jpg"&gt;Expression&lt;/a&gt; products.&amp;#160; &lt;/p&gt;  &lt;p&gt;Below is what I’m looking at now.&amp;#160; I am a happy man.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/image_464F8055.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/rrobinson/image_thumb_01733654.png" width="597" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Links: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378"&gt;Visual Studio Theme Editor&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.nerdpad.com/visual-studio/visual-studio-2010-dark-expression-blend-color-theme"&gt;Expression Dark Theme&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.r2musings.com/downloads/R2_vssettings.zip"&gt;My current vssettings file&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=19999" width="1" height="1"&gt;</description></item><item><title>Atlanta Code Camp is open for Registration</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/06/15/atlanta-code-camp-is-open-for-registration.aspx</link><pubDate>Wed, 15 Jun 2011 13:21:11 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:19965</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/19965.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=19965</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://www.atlantacodecamp.org/default.aspx"&gt;Atlanta Code Camp&lt;/a&gt; has finally been confirmed for this year and will take place on Saturday. June 25, 2011 at &lt;a href="http://www.spsu.edu/"&gt;Southern Tech&lt;/a&gt; in Marietta, GA.&amp;#160; I’ll be reprising my &lt;a href="http://codestock.org/"&gt;CodeStock&lt;/a&gt; talks on &lt;a href="http://codestock.org/Sessions/introduction-to-mef-for-silverlight.aspx"&gt;Intro to MEF with Silverlight&lt;/a&gt; and &lt;a href="http://codestock.org/Sessions/introduction-to-jounce-for-silverlight.aspx"&gt;Intro to Jounce MVVM Framework for Silverlight&lt;/a&gt;.&amp;#160; There are a lot of other really great &lt;a href="http://www.atlantacodecamp.org/Pages/Agenda2011.aspx"&gt;sessions&lt;/a&gt; planned for the day. &lt;/p&gt;  &lt;p&gt;Registration for this FREE event is available immediately &lt;a title="here" href="https://www.clicktoattend.com/invitation.aspx?code=155801"&gt;here&lt;/a&gt;.&amp;#160; There is limited space, so you should jump on this right away.&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=19965" width="1" height="1"&gt;</description></item><item><title>Another Great CodeStock!</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2011/06/07/another-great-codestock.aspx</link><pubDate>Tue, 07 Jun 2011 01:40:42 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:19930</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/19930.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=19930</wfw:commentRss><description>&lt;p&gt;Once again, &lt;a href="http://codestock.org/"&gt;CodeStock&lt;/a&gt; was awesome and the &lt;a href="http://codestock.org/"&gt;CodeStock&lt;/a&gt; crew took care of everything and made it look easy!&amp;#160; All of the attendees that I had chance to speak with had nothing but good things to say.&amp;#160; Big thank you to the &lt;a href="http://codestock.org/"&gt;CodeStock&lt;/a&gt; sponsors, volunteers, organizers, speakers, and attendees!&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I gave two presentations this year:&amp;#160; &lt;a href="http://codestock.org/Sessions/introduction-to-mef-for-silverlight.aspx"&gt;Intro to MEF for Silverlight&lt;/a&gt; and &lt;a href="http://codestock.org/Sessions/introduction-to-jounce-for-silverlight.aspx"&gt;Intro to Jounce MVVM Framework for Silverlight&lt;/a&gt;.&amp;#160; Thanks to the folks that made it out to the talks and especially those of you that stuck with me for both of them.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here are the links to the slides and code:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.r2musings.com/downloads/IntroToMEF_RRobinson.zip"&gt;Intro to MEF for Silverlight&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.r2musings.com/downloads/IntroToJounce_RRobinson.zip"&gt;Intro to Jounce MVVM Framework for Silverlight&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;(Note that these are zip files with 7z files embedded so you will need to unzip and then “un-7z”.&amp;#160; The files were huge as straight zips and the server wouldn’t let them through as 7z files.&amp;#160; &lt;a href="http://www.7-zip.org/"&gt;7-Zip&lt;/a&gt; is free and will work on both zip/7z files).&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=19930" width="1" height="1"&gt;</description></item><item><title>Happy Beatles Day</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/09/09/happy-beatles-day.aspx</link><pubDate>Wed, 09 Sep 2009 14:58:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:8863</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/8863.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=8863</wfw:commentRss><description>&lt;P&gt;In case you didn’t know, The Beatles re-masters are being released today (9/9/9).&amp;nbsp; Even more exciting is the fact that you will be able to get all of them in mono and in stereo.&amp;nbsp; So, you can hear them the way they were meant to be heard!!&amp;nbsp; From my understanding, though, the mono versions will not be released as single CDs.&amp;nbsp; You’ll have to buy the box set.&amp;nbsp; The mono box is supposedly “limited edition”, but I would bet anything that in a year, you’ll be able to buy the mono ones without any problem (and mostly likely be able to buy the single discs without dealing with the box set…and find them used at Amazon).&amp;nbsp; Here’s a really interesting discussion on an Audiophile site about the &lt;A href="http://www.tonepublications.com/music/beatles-box-in-stereo-and-mono/"&gt;mono vs. stereo&lt;/A&gt; editions.&lt;/P&gt;
&lt;P&gt;I think after reading this Audiophile opinion, I am going to buy a couple today at lunch (ok, maybe more than two if they just happen to be sitting there) in stereo as you can’t buy the mono ones (right now) as single CDs.&amp;nbsp; I’ll grab the mono set at some point when it gets past the “limited edition” status …..though I am dying to hear the earlier albums the way that The Beatles and George Martin created them.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Now, which ones to buy?&amp;nbsp;&amp;nbsp; Leaning toward Revolver and Abbey Road.&amp;nbsp; We’ll see what happens when I hit Best Buy to use the $20 gift card that they were so kind to give me for giving them $1000 recently.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Update:&amp;nbsp; Bought Revolver, Abbey Road, and Sgt. Peppers in stereo.&amp;nbsp; Revolver sounded so amazing that I went back to the store and bought the Mono box set (the last one!).&amp;nbsp; All Best Buys are sold out of the Stereo box set.&amp;nbsp; Got home and started with Please Please Me and I’m at Rubber Soul now.&amp;nbsp; Wow is all I can say…&amp;nbsp; &lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=8863" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Random/default.aspx">Random</category></item><item><title>Prism Presentation – Code and Slides</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/07/01/prism-presentation-code-and-slides.aspx</link><pubDate>Wed, 01 Jul 2009 22:10:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:8218</guid><dc:creator>rrobinson</dc:creator><slash:comments>1</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/8218.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=8218</wfw:commentRss><description>&lt;P&gt;I recently had the pleasure of speaking at &lt;A href="http://codestock.org/"&gt;CodeStock&lt;/A&gt; 2009 and was very impressed with the conference overall.&amp;nbsp; The folks behind this conference put in a lot of work and did a really great job.&amp;nbsp; I got the chance to see some really good presentations as well.&amp;nbsp; I look forward to attending CodeStock in the future.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The code and slides will be posted soon at the &lt;A href="http://codestock.org/"&gt;CodeStock&lt;/A&gt; site, but I wanted to note a few things about the code that I’m including for those that were present for my talk on Prism.&amp;nbsp; &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The AlbumSearch solution included is the one we worked through in the presentation.&amp;nbsp; In the interest of time, I had skipped the creation of separate folders/namespaces for the Views, ViewModels, etc during the presentation. For the download, I have cleaned that up and placed everything in a much more realistic (cleaner) project structure.&lt;/LI&gt;
&lt;LI&gt;While creating the SearchCommand in the SearchModuleViewModel during the presentation, I had skipped adding a CanExecute handler in the interest of time.&amp;nbsp; Someone asked me about it later and I promised to provide an example in the download and I have done so.&amp;nbsp; You’ll notice that the Search button now enables only when there are at least 3 letters typed in the Search Box.&amp;nbsp; (NOTE:&amp;nbsp; The only Artist Names defined in my test data are:&amp;nbsp; Pink Floyd, Mars Volta, and Tool.&amp;nbsp; Anything else will likely blow up as there is no Exception handling in the demo).&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;During the presentation, I mentioned a much larger solution that goes through each concept of Prism such as Modularity (and the various ways to load Modules), UI Composition, etc.&amp;nbsp; I have included my PrismConcepts solution in the download as well.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;I added a link to a &lt;A href="http://wpfslguidance.codeplex.com/"&gt;WPF and Silverlight Comparison&lt;/A&gt; paper from &lt;A href="http://www.wintellect.com/"&gt;Wintellect&lt;/A&gt; to the Resources slide as promised. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I think that covers it.&amp;nbsp; Thanks again to the organizers, the sponsors, the presenters, and all the attendees of &lt;A href="http://codestock.org/"&gt;CodeStock&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Here’s the &lt;A href="http://www.r2musings.com//downloads/prismtalk.zip"&gt;Code and Slides&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=8218" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/WPF/default.aspx">WPF</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Prism/default.aspx">Prism</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Silverlight UI Rant #2 - ListBoxItem</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/02/12/silverlight-ui-rant-2-listboxitem.aspx</link><pubDate>Thu, 12 Feb 2009 23:29:38 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7598</guid><dc:creator>rrobinson</dc:creator><slash:comments>1</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/7598.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=7598</wfw:commentRss><description>&lt;p&gt;Tonight's recipient of my UI Rant is the Silverlight 2 ListBox, or more specifically, the ListBoxItem.&amp;#160; A client recently asked me to provide an alternating row style like the DataGrid for the ListBox.&amp;#160; Now, if you've ever tried to add a border or background to your ListBoxItem, you've seen this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/DefaultlListBox_2.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="219" alt="DefaultlListBox" src="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/DefaultlListBox_thumb.jpg" width="183" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;No problem, you say, I will simply set the HorizontalContentAlignment of my ListBox to Stretch and all should be good.&amp;#160; When that doesn't do it, you'll probably try creating/editing the ListBox's ItemTemplate....maybe adding a Grid and setting its HorizontalAlignment to Stretch.&amp;#160; This too will fail.&amp;#160; &lt;/p&gt;  &lt;p&gt;Turns out, the problem is not with your ItemTemplate or even with the ListBox itself.&amp;#160; The issue is in the container that actually contains your Item and that is the ListBoxItem.&amp;#160; The property on the ListBox that allows you to set a custom style for this ListBoxItem is called &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox.itemcontainerstyle(VS.95).aspx" target="_blank"&gt;ItemContainerStyle&lt;/a&gt;.&amp;#160; Armed with this information, you quickly throw together a style for your ListBoxItem, maybe like so:&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;Style TargetType=&amp;quot;ListBoxItem&amp;quot; x:Key=&amp;quot;ItemContainerStyle&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;Padding&amp;quot; Value=&amp;quot;3&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;HorizontalContentAlignment&amp;quot; Value=&amp;quot;Stretch&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;VerticalContentAlignment&amp;quot; Value=&amp;quot;Top&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;Background&amp;quot; Value=&amp;quot;Transparent&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;BorderThickness&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;lt;/Style&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And then add that to your ListBox, like so:&lt;/p&gt;  &lt;p&gt;&amp;lt;ListBox Margin=&amp;quot;8,8,10,8&amp;quot; x:Name=&amp;quot;defaultListBox&amp;quot; ItemsSource=&amp;quot;{Binding}&amp;quot;    &lt;br /&gt;&amp;#160;&amp;#160; ItemTemplate=&amp;quot;{StaticResource EmployeeItemTemplate}&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160; ItemContainerStyle=&amp;quot;{StaticResource ItemContainerStyle}&amp;quot;/&amp;gt;&lt;/p&gt;  &lt;p&gt;Hit F5 and just about the time you congratulate yourself on solving this, the Silverlight Loading Animation will finish and you'll discover that your ListBox still looks exactly like the original screenshot above.&amp;#160; So, what happened?&amp;#160; &lt;/p&gt;  &lt;p&gt;What happened is that the default ControlTemplate for the ListBoxItem has its HorizontalAlignment hard-coded to Left and no matter what you do when setting the properties, it will always be Left.&amp;#160; If you'll do a little diving into the full default style for ListBoxItem, courtesy of &lt;a href="http://blogs.msdn.com/delay/archive/2008/12/14/expanded-access-to-silverlight-2-s-generic-xaml-resources-silverlightdefaultstylebrowser-updated-for-better-compatibility.aspx" target="_blank"&gt;SilverlightDefaultStyleBrowser&lt;/a&gt; (highly recommended), you'll see exactly what I'm talking about in the ContentPresenter's HorizontalAlignment property:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/ListBoxItemDefaultStyle_2.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="406" alt="ListBoxItemDefaultStyle" src="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/ListBoxItemDefaultStyle_thumb.jpg" width="539" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The good news is that because you have the ability to replace the Template of any control in Silverlight, you can simply &amp;quot;correct&amp;quot; this hard-coded problem by replacing the hard-coded Left value for HorizontalAlignment with {TemplateBinding HorizontalContentAlignment}, so your final new Style would look like this:&lt;/p&gt;  &lt;p&gt;&amp;lt;Style TargetType=&amp;quot;ListBoxItem&amp;quot; x:Key=&amp;quot;StretchedItemContainerStyle&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;Padding&amp;quot; Value=&amp;quot;3&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;HorizontalContentAlignment&amp;quot; Value=&amp;quot;Stretch&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;VerticalContentAlignment&amp;quot; Value=&amp;quot;Top&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;Background&amp;quot; Value=&amp;quot;Transparent&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;BorderThickness&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;TabNavigation&amp;quot; Value=&amp;quot;Local&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter Property=&amp;quot;Template&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Setter.Value&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ControlTemplate TargetType=&amp;quot;ListBoxItem&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;#160; &amp;lt;Grid Background=&amp;quot;{TemplateBinding Background}&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;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;vsm:VisualStateManager.VisualStateGroups&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;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;!-- removed VSM code for brevity&amp;#160; --&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;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/vsm:VisualStateManager.VisualStateGroups&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;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Rectangle x:Name=&amp;quot;fillColor&amp;quot; Opacity=&amp;quot;0&amp;quot; Fill=&amp;quot;#FFBADDE9&amp;quot; IsHitTestVisible=&amp;quot;False&amp;quot; RadiusX=&amp;quot;1&amp;quot; RadiusY=&amp;quot;1&amp;quot;&amp;#160; /&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;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Rectangle x:Name=&amp;quot;fillColor2&amp;quot; Opacity=&amp;quot;0&amp;quot; Fill=&amp;quot;#FFBADDE9&amp;quot; IsHitTestVisible=&amp;quot;False&amp;quot; RadiusX=&amp;quot;1&amp;quot; RadiusY=&amp;quot;1&amp;quot;&amp;#160; /&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;#160;&amp;#160;&amp;#160; &amp;lt;ContentPresenter x:Name=&amp;quot;contentPresenter&amp;quot; Content=&amp;quot;{TemplateBinding Content}&amp;quot; ContentTemplate=&amp;quot;{TemplateBinding ContentTemplate}&amp;quot; &lt;strong&gt;&lt;font color="#ff0000"&gt;HorizontalAlignment=&amp;quot;{TemplateBinding HorizontalContentAlignment}&amp;quot;&lt;/font&gt;&lt;/strong&gt; Margin=&amp;quot;{TemplateBinding Padding}&amp;quot;&amp;#160; /&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;#160;&amp;#160; &amp;lt;Rectangle x:Name=&amp;quot;FocusVisualElement&amp;quot; Stroke=&amp;quot;#FF6DBDD1&amp;quot; StrokeThickness=&amp;quot;1&amp;quot; Visibility=&amp;quot;Collapsed&amp;quot;&amp;#160; RadiusX=&amp;quot;1&amp;quot; RadiusY=&amp;quot;1&amp;quot;&amp;#160; /&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;lt;/Grid&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ControlTemplate&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Setter.Value&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Setter&amp;gt;     &lt;br /&gt;&amp;lt;/Style&amp;gt;&lt;/p&gt;  &lt;p&gt;Now your ListBoxItem will respect the value you are setting for its HorizontalContentAlignment in your Setter above and your ListBox will finally look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/CorrectedListBox_2.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="244" alt="CorrectedListBox" src="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant2_1490A/CorrectedListBox_thumb.jpg" width="221" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Hope that saves someone a little frustration.&amp;#160; I'll continue on to adding the alternating row style in another post.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here is the &lt;a href="http://silverlight.r2musings.com/StretchedListBox/" target="_blank"&gt;live sample&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here is the &lt;a href="http://www.r2musings.com/downloads/StretchedListBox.zip" target="_blank"&gt;source code&lt;/a&gt;.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7598" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight+2/default.aspx">Silverlight 2</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/UI+Rant/default.aspx">UI Rant</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/UI+and+Usability/default.aspx">UI and Usability</category></item><item><title>Silverlight UI Rant #1</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/02/06/another-annoying-ui-rant-1.aspx</link><pubDate>Fri, 06 Feb 2009 02:02:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7579</guid><dc:creator>rrobinson</dc:creator><slash:comments>1</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/7579.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=7579</wfw:commentRss><description>&lt;P&gt;If you've used the the Silverlight 2 DataGrid, you've no doubt seen this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant1_113D2/silverlightDatagrid01_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height=195 alt=silverlightDatagrid01 src="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant1_113D2/silverlightDatagrid01_thumb.jpg" width=330 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I really hate when this happens!&amp;nbsp; I've seen several forum discussions where folks were looking to get rid of this nastiness, so I know I'm not the only one losing sleep over it.&amp;nbsp; I haven't come across a solution in anything I've seen and so now that I have one, I thought I'd share it.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I ran into this a few weeks back and tried most of the obvious things with defining the DataGridColumns myself rather than auto-generating them.&amp;nbsp; In these defined DataGridColumns, I tried setting the Width of the last column to "*" just like you would a standard Grid.ColumnDefinition if you wanted to have it take up the remainder of the space.&amp;nbsp; This did nothing more than invite my buddy, AG_E_PARSER_BAD_PROPERTY, to show up...again.&amp;nbsp; It appears that star-sizing isn't yet implemented for DataGridColumn derivatives.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This morning I was finally able to grab a few minutes to dive into DataGrid and find out what I could do about this.&amp;nbsp; I decided to create an ExtendedDataGrid and add a LastColumnFill DependencyProperty similar to way the DockPanel has a LastChildFill. Most of the work is happening in this method which is called if the LastColumnFill is true:&lt;/P&gt;
&lt;P&gt;private void AdjustLastColumnWidth(Size finalSize) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the Vertical ScrollBar &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ScrollBar scrollBar = this.GetTemplateChild("VerticalScrollbar") as ScrollBar; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // compute the width to allow for the scrollbar based on its visibility. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; double scrollBarWidthAllowance = (scrollBar != null &amp;amp;&amp;amp; scrollBar.Visibility == Visibility.Visible) ? scrollBar.ActualWidth + 2 : 2; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // compute the width of all the columns excluding the last one &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var widthOfAllButLastColumn = this.Columns &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .TakeWhile(c =&amp;gt; c != Columns.Last() &amp;amp;&amp;amp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.Visibility == Visibility.Visible) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Sum(c =&amp;gt; c.ActualWidth); &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set the last column width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Columns.Last().Width = new DataGridLength(finalSize.Width - widthOfAllButLastColumn - scrollBarWidthAllowance); &lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;This is the result:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant1_113D2/silverlightDatagrid02_2.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-RIGHT-WIDTH:0px;" height=199 alt=silverlightDatagrid02 src="http://www.wintellect.com/CS/blogs/rrobinson/WindowsLiveWriter/AnotherAnnoyingUIRant1_113D2/silverlightDatagrid02_thumb.jpg" width=331 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Much better!&amp;nbsp; The &lt;A href="http://silverlight.r2musings.com/LastColumnFillDataGrid/" target=_blank&gt;live demo&lt;/A&gt; shows it with and without a vertical scrollbar.&amp;nbsp; Note that it also handles auto-generated DataGridColumns if that's your thang.&lt;/P&gt;
&lt;P&gt;Here's the &lt;A href="http://silverlight.r2musings.com/LastColumnFillDataGrid/" target=_blank&gt;live demo&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here's the &lt;A href="http://www.r2musings.com/downloads/LastColumnFillDataGrid.zip" target=_blank&gt;code&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7579" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight+2/default.aspx">Silverlight 2</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/UI+Rant/default.aspx">UI Rant</category><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/UI+and+Usability/default.aspx">UI and Usability</category></item><item><title>HtmlPage.PopupWindow vs. HtmlWindow.Navigate</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/02/04/htmlpage-popupwindow-vs-htmlwindow-navigate.aspx</link><pubDate>Wed, 04 Feb 2009 04:05:22 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7569</guid><dc:creator>rrobinson</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/7569.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=7569</wfw:commentRss><description>&lt;p&gt;I was recently looking at various ways of launching an external window from inside a &lt;a target="_blank"&gt;Silverlight 2&lt;/a&gt; application.&amp;#160; Dusting off your javascript brain cell, you'll recall that to open a popup dialog in &amp;quot;the old days&amp;quot;, we'd use &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open()&lt;/a&gt;.&amp;#160; I knew about the &lt;a href="http://msdn.microsoft.com/en-us/library/cc645076(VS.95).aspx" target="_blank"&gt;HtmlBridge&lt;/a&gt; available in &lt;a href="http://silverlight.net" target="_blank"&gt;Silverlight 2&lt;/a&gt; and I had used it for several other nifty interactions between my managed code and the DOM.&amp;#160; So, I went looking for an equivalent to &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open()&lt;/a&gt; and came across the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx" target="_blank"&gt;HtmlPage.PopupWindow&lt;/a&gt;() method.&amp;#160; If you'll recall the javascript &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open()&lt;/a&gt; method is defined as such:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;window.open( [&lt;em&gt;sURL&lt;/em&gt;] [, &lt;em&gt;sName&lt;/em&gt;] [, &lt;em&gt;sFeatures&lt;/em&gt;]);&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The HtmlPage.PopupWindow() is defined as: &lt;/p&gt;    &lt;blockquote&gt;     &lt;p&gt;HtmlPage.PopupWindow(string navigateToUri, string target, HtmlPopupWindowOptions options); &lt;/p&gt;   &lt;/blockquote&gt;   &lt;p&gt;Perfect!&amp;#160; ...or so I thought.&amp;#160; I fully expected that if I called &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx" target="_blank"&gt;PopupWindow&lt;/a&gt;() like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;HtmlPopupWindowOptions options = new HtmlPopupWindowOptions()      &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; {       &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;#160;&amp;#160;&amp;#160;&amp;#160; Directories = false,       &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;#160;&amp;#160;&amp;#160;&amp;#160; Location = false,       &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;#160;&amp;#160;&amp;#160;&amp;#160; Menubar = false,       &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;#160;&amp;#160;&amp;#160;&amp;#160; Status = false,       &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;#160;&amp;#160;&amp;#160;&amp;#160; Toolbar = false,       &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; };       &lt;br /&gt;HtmlPage.PopupWindow(new Uri(&amp;quot;&lt;a href="http://www.wintellect.com"&gt;http://www.wintellect.com&amp;quot;)&lt;/a&gt;, &amp;quot;_blank&amp;quot;, options);&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;..that I'd get a new browser window with the default width/height on the monitor that the launching browser is on. &lt;/p&gt;  &lt;p&gt;After all, if I called &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open()&lt;/a&gt; with equivalent arguments as follows that's what would happen:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;string features = String.Format(&amp;quot;directories=no,location=no,menubar=no,status=no,toolbar=no&amp;quot;);      &lt;br /&gt;HtmlPage.Window.Navigate(new Uri(&amp;quot;&lt;a href="http://www.r2musings.com"&gt;http://www.r2musings.com&amp;quot;)&lt;/a&gt;, &amp;quot;_blank&amp;quot;, features);&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Instead, I get a small window that launches on Monitor 1.&amp;#160; I do my main work on my Monitor 2 and I kept waiting for my popup window only to realize that it was on the other monitor.&amp;#160; I really hate applications that do this! &lt;/p&gt;  &lt;p&gt;Looking into Reflector, the issue seems to be that if options is passed as null in the last parameter of &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx" target="_blank"&gt;PopupWindow&lt;/a&gt;(), the call is simply forwarded to &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open().&lt;/a&gt;&amp;#160; But, if you pass an instance of &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpopupwindowoptions(VS.95).aspx" target="_blank"&gt;HtmlPopupWindowOptions&lt;/a&gt; (even with no properties set) to &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx" target="_blank"&gt;PopupWindow&lt;/a&gt;(), the ToFeaturesString() that gets called to convert this strongly-typed version of the features to the string that is needed for &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open()&lt;/a&gt; is also changing the height/width/top/left of the popup window.&amp;#160; &lt;/p&gt;  &lt;p&gt;Looking over the documentation...yes, I'm male and sometimes do that *after* nothing else works. ....anyway, there it is in the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx" target="_blank"&gt;remarks of HtmlPage.PopupWindow()&lt;/a&gt;.&amp;#160; All the ugly details and the admission that my popup would be altered.&amp;#160; Documented or not, it's not acceptable to my client and I'm not putting my name on anything that launches a browser on the wrong monitor!&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;That's when I decided to have another look at &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlwindow.navigate(VS.95).aspx" target="_blank"&gt;HtmlWindow.Navigate()&lt;/a&gt; which seems to more accurately mirror the behavior that I would expect out of something that purports to wrap &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open().&lt;/a&gt;&amp;#160; Going this route, we lose the strong typing of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpopupwindowoptions(VS.95).aspx" target="_blank"&gt;HtmlPopupWindowOptions&lt;/a&gt;, but in exchange we get exactly what we are expecting when calling &lt;a href="http://msdn.microsoft.com/en-us/library/ms536651(VS.85).aspx" target="_blank"&gt;window.open().&lt;/a&gt;&amp;#160; The call using &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlwindow.navigate(VS.95).aspx" target="_blank"&gt;HtmlWindow.Navigate()&lt;/a&gt; looks like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; string features = &amp;quot;directories=no,location=no,menubar=no,status=no,toolbar=no&amp;quot;;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; HtmlPage.Window.Navigate(new Uri(&amp;quot;&lt;a href="http://www.r2musings.com"&gt;http://www.r2musings.com&amp;quot;)&lt;/a&gt;, &amp;quot;_blank&amp;quot;, features);&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This will fire a new window on the correct monitor and will honor the default settings for width/height/top/left.&amp;#160; &lt;/p&gt;  &lt;p&gt;Here's the &lt;a href="http://www.r2musings.com/downloads/launchexternalwindow.zip" target="_blank"&gt;code&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here's a &lt;a href="http://silverlight.r2musings.com/launchexternalwindow" target="_blank"&gt;live sample&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7569" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight+2/default.aspx">Silverlight 2</category></item><item><title>Yngwie Malmsteen syndrome (Silverlight 2 Scroller revisited)</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/01/22/yngwie-malmsteen-syndrome-silverlight-2-scroller-revisited.aspx</link><pubDate>Thu, 22 Jan 2009 18:26:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7522</guid><dc:creator>rrobinson</dc:creator><slash:comments>3</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/7522.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=7522</wfw:commentRss><description>&lt;P&gt;Earlier this month, I &lt;A href="http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/01/12/silverlight-2-scroller.aspx" target=_blank&gt;blogged&lt;/A&gt; about a &lt;A href="http://silverlight.net/" target=_blank&gt;Silverlight&lt;/A&gt; 2 Scroller control that I had labored over for the better part of a weekend.&amp;nbsp; The entire time I was working on this Scroller, I had this small, dirty feeling that what I had created was somehow &lt;STRONG&gt;way&lt;/STRONG&gt; more than what I needed to accomplish my end goal.&amp;nbsp; But, time was short, it got the job done and I figured that I could always revisit it at some point.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Fast forward a few days as I was reading &lt;A href="http://wildermuth.com/" target=_blank&gt;Shawn Wildermuth's blog&lt;/A&gt; and I come across &lt;A href="http://wildermuth.com/2009/01/18/Fun_with_ItemsControl" target=_blank&gt;his post&lt;/A&gt; on the &lt;A href="http://silverlight.net/" target=_blank&gt;Silverlight&lt;/A&gt; ItemsControl and realized what that dirty feeling was all about.&amp;nbsp; I was exactly the guy he was talking about that was trying to bastardize the &lt;A href="http://silverlight.net/" target=_blank&gt;Silverlight&lt;/A&gt; ListBox into something else...namely the ItemsControl.&amp;nbsp; So, I revisited the Scroller and was able to remove about 50% or more of the code and still achieve my goal.&amp;nbsp; No custom ListBox, etc.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I think it's part of most any process, really.&amp;nbsp; As you work on making something better you tend to keep adding and adding more code until you reach a saturation point where you need to step back and just start removing things.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It made me think of so many guitarists in the 80's that just kept adding and adding notes and playing faster and faster until the music just became guitar masturbation instead of anything musical.&amp;nbsp; (These guys wouldn't have known a whole note if it hit them in the face). On the other hand, you take someone like &lt;A href="http://en.wikipedia.org/wiki/David_Gilmour" target=_blank&gt;David Gilmour&lt;/A&gt; that can play one note and absolutely convey way more than the shred monsters could ever muster.&amp;nbsp; It's all part of the learning process.&amp;nbsp; There's a curve graphed somewhere (I'm sure) that shows the guitarist's ascension to knowing when NOT to play.&lt;/P&gt;
&lt;P&gt;So, who is &lt;A href="http://en.wikipedia.org/wiki/Yngwie_Malmsteen" target=_blank&gt;Yngwie Malmsteen&lt;/A&gt; and what does he have to do with this post?&amp;nbsp; You can find out more than you ever wanted to know about Yngwie &lt;A href="http://en.wikipedia.org/wiki/Yngwie_Malmsteen" target=_blank&gt;here&lt;/A&gt;.&amp;nbsp; Yngwie was the &lt;A href="http://www.5min.com/Video/Yngwie-Malmsteen---insane-speed-playing-10238" target=_blank&gt;poster boy&lt;/A&gt; for never quite knowing when to stop adding notes and he flashed before my eyes when I looked back and my original Scroller code.&amp;nbsp; Anyway, thanks &lt;A href="http://wildermuth.com/" target=_blank&gt;Shawn&lt;/A&gt; for saving me from that fate.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The updated code is &lt;A href="http://www.r2musings.com/downloads/SilverlightScrollerWithItemsControl.zip" target=_blank&gt;here&lt;/A&gt;.&amp;nbsp; Here is the &lt;A href="http://silverlight.r2musings.com/SilverlightScroller/default.htm" target=_blank&gt;live demo.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I'll leave the original code &lt;A href="http://www.r2musings.com/downloads/SilverlightScroller.zip" target=_blank&gt;here&lt;/A&gt; in case you want to get it and make fun of me.&amp;nbsp; &lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7522" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight+2/default.aspx">Silverlight 2</category></item><item><title>Silverlight System.ExecutionEngineException</title><link>http://www.wintellect.com/CS/blogs/rrobinson/archive/2009/01/15/silverlight-system-executionengineexception.aspx</link><pubDate>Thu, 15 Jan 2009 20:29:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7499</guid><dc:creator>rrobinson</dc:creator><slash:comments>1</slash:comments><comments>http://www.wintellect.com/CS/blogs/rrobinson/comments/7499.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/rrobinson/commentrss.aspx?PostID=7499</wfw:commentRss><description>&lt;P&gt;Just a quick note that will hopefully save someone the pain that I just went through chasing yet another exception in Silverlight with nothing to go on from Visual Studio.&amp;nbsp; (I really hope that there is some better feedback coming on Silverlight applications when you hit a runtime error in the future).&amp;nbsp; Anyway, I was digging in my App.xaml today to do a bit of much-needed clean up and then started getting System.ExecutionEngineException being thrown at runtime.&amp;nbsp; I was just about to the point of pulling out WinDbg (see &lt;A href="http://devmeat.com/show/89422" target=_blank&gt;this post&lt;/A&gt; on that) and I decided that maybe&amp;nbsp;Blend could help me out.&amp;nbsp; After all, it really does owe me one for all the times it wouldn't load my xaml without telling me why.&lt;/P&gt;
&lt;P&gt;So, I opened the project in Blend and sure enough, it gave me the old "Invalid XAML" message that I was expecting when I attempted to open my app.xaml.&amp;nbsp; However, it also gave me a bunch of errors about not finding properties from one of my styles.&amp;nbsp; I took a wild shot and clicked the View XAML Code link that Blend offered.&amp;nbsp; It placed me on a style that I had added earlier and I immediately noticed that I had left off the TargetType attribute.&amp;nbsp; Adding this cured the problem.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;And for those that just scan for the code...&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bad:&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Style x:Key="MyButtonStyle"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property="FontSize" Value="10" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Style&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Good:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Style x:Key="MyButtonStyle" TargetType="Button"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property="FontSize" Value="10" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Style&amp;gt;&lt;/P&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7499" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/rrobinson/archive/tags/Silverlight+2/default.aspx">Silverlight 2</category></item></channel></rss>
