<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.silverlight.net/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>Silverlight Debugging Challenge</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx</link><description>In about a week, I&amp;#39;ll be posting a video on creating a form that responds to keyboard shortcuts (as an intro to a video on user controls). This is also covered in the tutorial User Controls ) As a challenge to those of you who are already comfortable</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>re: Silverlight Debugging Challenge</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx#51461</link><pubDate>Tue, 06 May 2008 12:56:01 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:51461</guid><dc:creator>simon.ferquel</dc:creator><description>&lt;p&gt;3 different options:&lt;/p&gt;
&lt;p&gt;first one:&lt;/p&gt;
&lt;p&gt;In AddressGrid_KeyDown:&lt;/p&gt;
&lt;p&gt;if(e.Key == ....)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; AddressGrid.DataContext = new Address{Location=&amp;quot;...}&lt;/p&gt;
&lt;p&gt;This will indicate to the DataBinding system that a change occured on the DataContext property (as we reset it).&lt;/p&gt;
&lt;p&gt;second one: &lt;/p&gt;
&lt;p&gt;In Address.cs:&lt;/p&gt;
&lt;p&gt;Implement INotifyPropertyChanged, to notify changes on individual properties&lt;/p&gt;
&lt;p&gt;third one (but I don't know if it works in Silverlight, as I'm not aware of differents with WPF):&lt;/p&gt;
&lt;p&gt;at the end of AddressGrid_KeyDown, call the Update method on the Binding itself.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=51461" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Debugging Challenge</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx#50934</link><pubDate>Sat, 03 May 2008 20:29:44 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:50934</guid><dc:creator>jesseliberty</dc:creator><description>&lt;p&gt;Thomas, &lt;/p&gt;
&lt;p&gt;there is a much simpler fix. The biz object is getting updated (you can see that in the debugger) but when it is, nothing happens at the UI.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=50934" width="1" height="1"&gt;</description></item><item><title>Dew Drop - May 2, 2008 | Alvin Ashcraft's Morning Dew</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx#50752</link><pubDate>Fri, 02 May 2008 13:11:10 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:50752</guid><dc:creator>Dew Drop - May 2, 2008 | Alvin Ashcraft's Morning Dew</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Dew Drop - May 2, 2008 | Alvin Ashcraft's Morning Dew&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=50752" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Debugging Challenge</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx#50679</link><pubDate>Fri, 02 May 2008 07:05:52 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:50679</guid><dc:creator>Thomas Lebrun</dc:creator><description>&lt;p&gt;Hi Jesse,&lt;/p&gt;
&lt;p&gt;I proposed this answer:&lt;/p&gt;
&lt;p&gt;In AddressGrid_KeyDown, replace:&lt;/p&gt;
&lt;p&gt;AddressGrid.DataContext = theAddress;&lt;/p&gt;
&lt;p&gt;By:&lt;/p&gt;
&lt;p&gt;if (!string.IsNullOrEmpty(theAddress.Address1) &amp;amp;&amp;amp; !string.IsNullOrEmpty(theAddress.Address2) &amp;amp;&amp;amp; !string.IsNullOrEmpty(theAddress.City) &amp;amp;&amp;amp; !string.IsNullOrEmpty(theAddress.Location))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;AddressGrid.DataContext = theAddress;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Also, add a little code to allow the Location TextBox to have the focus on Loaded. &lt;/p&gt;
&lt;p&gt;Am I right ?&lt;/p&gt;
&lt;p&gt;Thanks !&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=50679" width="1" height="1"&gt;</description></item><item><title>re: Silverlight Debugging Challenge</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/05/01/silverlight-debugging-challenge.aspx#50630</link><pubDate>Thu, 01 May 2008 23:47:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:50630</guid><dc:creator>sariel</dc:creator><description>&lt;p&gt;&lt;font face="webdings"&gt;I added : INotifyPropertyChanged to the address class and now seems to be working&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;is this correct or have I over complicated it ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No; you got it. Thanks!&amp;nbsp; -jesse (I&amp;#39;ve obfuscaated your answer.)&lt;/p&gt;&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=50630" width="1" height="1"&gt;</description></item></channel></rss>