<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>silverlight</title>
        <link>http://blog.kellybrownsberger.com/category/20.aspx</link>
        <description>silverlight</description>
        <language>en-US</language>
        <copyright>kellyb</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <item>
            <title>ASP.NET MVC - Unhandled Error in Silverlight Application Code: 2104</title>
            <link>http://blog.kellybrownsberger.com/archive/2009/12/10/71.aspx</link>
            <description>&lt;p&gt;I’m creating a simple ASP.NET MVC application and on first run I’m getting blasted with this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/ASP.NETMVCUnhandledErrorinSilverlightApp_107A5/image.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://blog.kellybrownsberger.com/____Uploads____/ASP.NETMVCUnhandledErrorinSilverlightApp_107A5/image_thumb.png" width="446" height="296" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Google didn’t turn up the solution as fast as I would have liked, so I thought I’d post it here for the next fool to find :)&lt;/p&gt;  &lt;h2&gt;Solution:&lt;/h2&gt;  &lt;p&gt;When you add a Silverlight project to a solution, Visual Studio will ask you if you would like to &lt;em&gt;create new web site&lt;/em&gt; to host it, or &lt;em&gt;choose an existing one&lt;/em&gt; in your solution.  I choose an existing one.  By default, Visual Studio creates this in your HTML markup to host a Silverlight application:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="silverlight"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;object&lt;/span&gt; &lt;span class="attr"&gt;data&lt;/span&gt;&lt;span class="kwrd"&gt;="data:application/x-silverlight-2,"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="application/x-silverlight-2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="source"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="ClientBin/MySilverlightApp.xap"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="onError"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="onSilverlightError"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="background"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="white"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="minRuntimeVersion"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="3.0.40624.0"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="autoUpgrade"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="initParams"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="page=UserRegistrationView"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;

          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.40624.0"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="text-decoration:none"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="http://go.microsoft.com/fwlink/?LinkId=108181"&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;="Get Microsoft Silverlight"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="border-style:none"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
          
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;object&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;iframe&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="_sl_historyFrame"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="visibility:hidden;height:0px;width:0px;border:0px"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;iframe&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Visual Studio does not account for the URL rewriting that comes with MVC and by default the path to xap file is wrong.  Change the source parameter to be rooted like so:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="source"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="/ClientBin/MySilverlightApp.xap"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;One simple slash should fix your problem.  Hope this helps someone else (you’re not a fool :)&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/71.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2009/12/10/71.aspx</guid>
            <pubDate>Fri, 11 Dec 2009 00:52:02 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/71.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2009/12/10/71.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/71.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Debugging Silverlight with Silverlight Spy</title>
            <link>http://blog.kellybrownsberger.com/archive/2009/11/23/69.aspx</link>
            <description>&lt;p&gt;The debugging experience in Silverlight project using Visual Studio is quite good.  However, there are two things that is doesn’t help much with:  when data bindings don’t work, and when your XAML doesn’t look like you think it should.  &lt;a href="http://blog.kellybrownsberger.com/archive/2009/11/23/67.aspx" target="_blank"&gt;Here’s a post about debugging data bindings&lt;/a&gt;.  The visual part is a little more involved.  Yes, yes Expression Blend has a nice visual designer, but it’s fairly common for Blend to show a piece of XAML in one way and for it to actually render in the browser differently (sometime &lt;em&gt;significantly&lt;/em&gt; differently).  Today I found First Floor Software’s &lt;a href="http://firstfloorsoftware.com/silverlightspy/" target="_blank"&gt;Silverlight Spy&lt;/a&gt;.  This appears to be a pretty awesome diagnostics tool that allows you to see and alter Silverlight’s Visual Tree at runtime side by side an embedded browser.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/DebuggingSilverlightwithSilverlightSpy_B3E2/image.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/DebuggingSilverlightwithSilverlightSpy_B3E2/image_thumb.png" width="224" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can edit the Visual Studio within Silverlight Spy and see the rendered content change immediately.  This is extremely useful.  This is to Silverlight apps what Firebug is to web apps. &lt;/p&gt;  &lt;p&gt;If this is still useful at the end of the trial period, I’ll be buying a copy of this for myself.&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/69.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2009/11/23/69.aspx</guid>
            <pubDate>Mon, 23 Nov 2009 18:47:35 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/69.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2009/11/23/69.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/69.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Silverlight ComboBox SelectedItem Not Working</title>
            <link>http://blog.kellybrownsberger.com/archive/2009/11/23/68.aspx</link>
            <description>&lt;p&gt;I spent well over an hour on Friday with this one and gave up.  I spent almost another hour today working on this.  I almost gave up, but when I’m in learn-mode like I am with Silverlight, these types of issues can really teach you a lot if you see them through.  I had a ComboBox with bindings on it’s ItemSource and SelectedItem like so:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComboBox&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="ComboBoxControl"&lt;/span&gt; &lt;span class="attr"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource ComboBoxStyle}"&lt;/span&gt;
                &lt;span class="attr"&gt;SelectedItem&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=SelectedOption, Mode=TwoWay}"&lt;/span&gt;
                &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Options}"&lt;/span&gt;
                &lt;span class="attr"&gt;IsEnabled&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=IsReadOnly}"&lt;/span&gt;
                &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource SemiDarkTextBrush}"&lt;/span&gt;                    
                &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="22"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="150"&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="30,0,10,0"&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Stretch"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComboBox.ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; 
                            &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource SemiDarkTextBrush}"&lt;/span&gt;                    
                            &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Label, Mode=OneWay}"&lt;/span&gt; 
                            &lt;span class="attr"&gt;TextWrapping&lt;/span&gt;&lt;span class="kwrd"&gt;="Wrap"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ComboBox.ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ComboBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;I put breakpoints in my model’s SelectedOption property and I could see Silverlight calling it.  So, I knew there were no hard binding errors.  The bindings were working, except… they weren’t.  The ComboBox always showed up with no selected item.  I kept plugging away, and by accident I discovered the order of the binding occurrences matter.  Changing the markup to define the ItemsSource binding &lt;em&gt;before&lt;/em&gt; the SelectedItem binding solved the problem.  Like so:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComboBox&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="ComboBoxControl"&lt;/span&gt; &lt;span class="attr"&gt;Style&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource ComboBoxStyle}"&lt;/span&gt;
                &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Options}"&lt;/span&gt;
                &lt;span class="attr"&gt;SelectedItem&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=SelectedOption, Mode=TwoWay}"&lt;/span&gt;
                &lt;span class="attr"&gt;IsEnabled&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=IsReadOnly}"&lt;/span&gt;
                &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource SemiDarkTextBrush}"&lt;/span&gt;                    
                &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="22"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="150"&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="30,0,10,0"&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Stretch"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ComboBox.ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; 
                            &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="{StaticResource SemiDarkTextBrush}"&lt;/span&gt;                    
                            &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Label, Mode=OneWay}"&lt;/span&gt; 
                            &lt;span class="attr"&gt;TextWrapping&lt;/span&gt;&lt;span class="kwrd"&gt;="Wrap"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ComboBox.ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ComboBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Wow, that’s pretty nasty.  I’m lucky stumbled on the solution.  I consider this a bug.&lt;/p&gt;

&lt;p&gt;Hope this helps someone else out there&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/68.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2009/11/23/68.aspx</guid>
            <pubDate>Mon, 23 Nov 2009 18:31:54 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/68.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2009/11/23/68.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/68.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Silverlight Lessons Learn &amp;ndash; Debugging Data Bindings</title>
            <link>http://blog.kellybrownsberger.com/archive/2009/11/23/67.aspx</link>
            <description>&lt;p&gt;I’ve been neck deep in Silverlight development for the last couple of weeks.  I’m finally starting to feel somewhat competent.  Most of my struggles have been with XAML in general, so I think the steep learning curve applies to both Silverlight and WPF.  One of the things I’ve been using struggling with the most is troubleshooting data bindings.  The data binding system in Silverlight and WPF is pretty awesome, but it’s definitely not intuitive nor discoverable.  When you force yourself to learn it, most of those issues melt away, but… buuuuut, debugging binding remains extremely difficult.&lt;/p&gt;  &lt;p&gt;Today I discovered something that helps a TON.  Binding errors are written to the Visual Studio Output Window!  Check this out:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.kellybrownsberger.com/____Uploads____/SilverlightLessonsLearnDebuggingDataBind_AE50/image.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="144" alt="image" src="http://blog.kellybrownsberger.com/____Uploads____/SilverlightLessonsLearnDebuggingDataBind_AE50/image_thumb.png" width="916" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It’s not the most robust solution, but it’s definitely workable.&lt;/p&gt;  &lt;p&gt;After discovering this, I did a bit more Googling around and found this handy article:  &lt;a href="http://www.beacosta.com/blog/?p=52" target="_blank"&gt;How can I debug WPF bindings&lt;/a&gt;.  He covers the Output Window approach there as well.  For the record, I was not able to get the “Trace Sources” technique to work in Silverlight – only WPF.&lt;/p&gt;  &lt;p&gt;Hope this helps someone else out&lt;/p&gt;&lt;img src="http://blog.kellybrownsberger.com/aggbug/67.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>kellyb</dc:creator>
            <guid>http://blog.kellybrownsberger.com/archive/2009/11/23/67.aspx</guid>
            <pubDate>Mon, 23 Nov 2009 18:23:51 GMT</pubDate>
            <wfw:comment>http://blog.kellybrownsberger.com/comments/67.aspx</wfw:comment>
            <comments>http://blog.kellybrownsberger.com/archive/2009/11/23/67.aspx#feedback</comments>
            <wfw:commentRss>http://blog.kellybrownsberger.com/comments/commentRss/67.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>