<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Program With .NET</title>
	
	<link>http://programwith.net/blog</link>
	<description>Matt Casto's Technology Journal</description>
	<lastBuildDate>Tue, 15 Mar 2011 18:55:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ProgramWithDotNet" /><feedburner:info uri="programwithdotnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Stir Trek: Thor Edition</title>
		<link>http://feedproxy.google.com/~r/ProgramWithDotNet/~3/aYPjuRJmLXw/</link>
		<comments>http://programwith.net/blog/2011/03/stir-trek-thor-edition/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 18:55:33 +0000</pubDate>
		<dc:creator>mattcasto</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://programwith.net/blog/?p=34</guid>
		<description><![CDATA[We&#8217;re bringing back the Stir Trek conference on May 6th, 2011! This year&#8217;s event is called Stir Trek: Thor Edition and, as the name suggests, we will have a private screening of Thor on it&#8217;s opening date! The new website at stirtrek.com has already launched. This year we&#8217;ll have six tracks of content, giving you [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re bringing back the <a href="http://stirtrek.com">Stir Trek</a> conference on May 6th, 2011! This year&#8217;s event is called Stir Trek: Thor Edition and, as the name suggests, we will have a private screening of Thor on it&#8217;s opening date!</p>
<p>The new website at <a href="http://stirtrek.com">stirtrek.com</a>  has already launched. This year we&#8217;ll have six tracks of content, giving you <a href="http://stirtrek.com/Sessions">30 sessions</a> of the highest quality <a href="http://stirtrek.com/Speakers">local and national speakers</a> I&#8217;ve ever seen in a single day event. Just check out the <a href="http://stirtrek.com/Schedule">schedule</a> for yourself.</p>
<p>Registration opens this Thorsday, March 17th. With the way conferences like <a href="http://codemash.org">CodeMash</a> have been quickly selling out recently, I&#8217;d get yours as soon as possible!</p>
<p><iframe title="YouTube video player" width="500" height="311" src="http://www.youtube.com/embed/JOddp-nlNvQ" frameborder="0" allowfullscreen></iframe></p>
<img src="http://feeds.feedburner.com/~r/ProgramWithDotNet/~4/aYPjuRJmLXw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://programwith.net/blog/2011/03/stir-trek-thor-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://programwith.net/blog/2011/03/stir-trek-thor-edition/</feedburner:origLink></item>
		<item>
		<title>Downtown Columbus Developers Book Club Meeting 2-24-11</title>
		<link>http://feedproxy.google.com/~r/ProgramWithDotNet/~3/Blng7K0UDp8/</link>
		<comments>http://programwith.net/blog/2011/02/downtown-columbus-developers-book-club-meeting-2-22-11/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 15:25:46 +0000</pubDate>
		<dc:creator>mattcasto</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://programwith.net/blog/?p=74</guid>
		<description><![CDATA[The next meeting of the Downtown Columbus Developers Book Club is this Thursday, February 24, 2011. In the last meeting we decided our next book would be &#8220;The Pragmatic Programmer: From Journeyman to Master&#8221; by Andrew Hunt. This meeting we will discuss the first section of the book, &#8220;A Pragmatic Philosophy.&#8221; This first section includes [...]]]></description>
			<content:encoded><![CDATA[<p>The next meeting of the <a href="http://groups.google.com/group/columbus-downtown-developer-book-club/about?pli=1">Downtown Columbus Developers Book Club</a> is this Thursday, February 24, 2011.</p>
<p>In the last meeting we decided our next book would be &#8220;<a href="http://amzn.com/B000SEGEKI">The Pragmatic Programmer: From Journeyman to Master</a>&#8221; by Andrew Hunt. This meeting we will discuss the first section of the book, &#8220;A Pragmatic Philosophy.&#8221; This first section includes the first six chapters of the book.</p>
<p style="padding-left: 30px;"><strong>What:</strong> <a href="http://groups.google.com/group/columbus-downtown-developer-book-club">Downtown Columbus Developer Book Club</a></p>
<p style="padding-left: 30px;"><strong>When:</strong> Every other Thursday at 11:30am starting February 10th</p>
<p style="padding-left: 30px;"><strong>Where:</strong> <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Deli+Boys,+2+East+Long+Street,+Columbus,+OH+43215,+USA&amp;aq=&amp;sll=39.858999,-82.898836&amp;sspn=0.010064,0.013368&amp;ie=UTF8&amp;hq=Deli+Boys,&amp;hnear=2+E+Long+St,+Columbus,+Franklin,+Ohio+43215&amp;ll=39.965001,-83.000808&amp;spn=0.001256,0.001671&amp;t=h&amp;z=19">Deli Boy&#8217;s on the corner of High and Long</a></p>
<p style="padding-left: 30px;"><strong>Why:</strong> To meet new people and learn!</p>
<p style="padding-left: 30px;"><strong>RSVP:</strong> <a href="http://nerddinner.com/4175">http://nerddinner.com/4175</a></p>
<img src="http://feeds.feedburner.com/~r/ProgramWithDotNet/~4/Blng7K0UDp8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://programwith.net/blog/2011/02/downtown-columbus-developers-book-club-meeting-2-22-11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://programwith.net/blog/2011/02/downtown-columbus-developers-book-club-meeting-2-22-11/</feedburner:origLink></item>
		<item>
		<title>Restarting Downtown Columbus Developers Book Club</title>
		<link>http://feedproxy.google.com/~r/ProgramWithDotNet/~3/BjNeorwtQi4/</link>
		<comments>http://programwith.net/blog/2011/02/restarting-downtown-columbus-developers-book-club/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 14:23:06 +0000</pubDate>
		<dc:creator>mattcasto</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://programwith.net/blog/?p=71</guid>
		<description><![CDATA[Last year I accidentally heard about a book club for developers in downtown Columbus, Ohio and decided to attend. I&#8217;m really glad I did because I&#8217;ve ended up meeting people and reading books that I wouldn&#8217;t have otherwise. Over the holidays and due to CodeMash the club fizzled, but I&#8217;d like to start it back [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I accidentally heard about a <a href="http://groups.google.com/group/columbus-downtown-developer-book-club/about?pli=1">book club for developers in downtown Columbus, Ohio</a> and decided to attend. I&#8217;m really glad I did because I&#8217;ve ended up meeting people and reading books that I wouldn&#8217;t have otherwise. Over the holidays and due to <a href="http://codemash.org">CodeMash</a> the club fizzled, but I&#8217;d like to start it back up.</p>
<p>Our next meeting will be <a href="http://nerddinner.com/4165">tomorrow, February 10th at 11:30am</a> where we&#8217;ll be discussing plans for the group, including which book to read in 2011. Its short notice and if you miss the meeting, that&#8217;s okay. I&#8217;ll post here, and in the group, any decisions that are made.</p>
<p><strong>What:</strong> <a href="http://groups.google.com/group/columbus-downtown-developer-book-club">Downtown Columbus Developer Book Club</a></p>
<p><strong>When:</strong> Every other Thursday at 11:30am starting February 10th</p>
<p><strong>Where:</strong> <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Deli+Boys,+2+East+Long+Street,+Columbus,+OH+43215,+USA&amp;aq=&amp;sll=39.858999,-82.898836&amp;sspn=0.010064,0.013368&amp;ie=UTF8&amp;hq=Deli+Boys,&amp;hnear=2+E+Long+St,+Columbus,+Franklin,+Ohio+43215&amp;ll=39.965001,-83.000808&amp;spn=0.001256,0.001671&amp;t=h&amp;z=19">Deli Boy&#8217;s on the corner of High and Long</a></p>
<p><strong>Why:</strong> To meet new people and learn!</p>
<p><strong>RSVP:</strong> <a href="http://nerddinner.com/4165">http://nerddinner.com/4165</a></p>
<img src="http://feeds.feedburner.com/~r/ProgramWithDotNet/~4/BjNeorwtQi4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://programwith.net/blog/2011/02/restarting-downtown-columbus-developers-book-club/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://programwith.net/blog/2011/02/restarting-downtown-columbus-developers-book-club/</feedburner:origLink></item>
		<item>
		<title>Accept and Cancel Buttons Behavior in Silverlight</title>
		<link>http://feedproxy.google.com/~r/ProgramWithDotNet/~3/ZT5vpnaMiSY/</link>
		<comments>http://programwith.net/blog/2011/02/accept-and-cancel-buttons-behavior-in-silverlight/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 02:52:14 +0000</pubDate>
		<dc:creator>mattcasto</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://programwith.net/blog/?p=60</guid>
		<description><![CDATA[Let&#8217;s say you start an application and a login window pops up asking you for your username and password. Once you enter your name and password, you might reflexively hit Enter and hope to be on your way. There is an expected behavior with modal windows in client applications. Whether its a login window, a [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you start an application and a login window pops up asking you for your username and password. Once you enter your name and password, you might reflexively hit Enter and hope to be on your way.</p>
<p>There is an expected behavior with modal windows in client applications. Whether its a login window, a save confirmation, or an error notification, users expect the Enter button to perform some sort of action and close the window. Along with that, it is expected that the Escape key should close the window without performing any action.</p>
<h3>Default Actions in Client Applications</h3>
<p>In Windows Forms development, there was the AcceptButton and CancelButton properties on the Form class. You&#8217;d set these properties to the actual button controls in the Form&#8217;s children, and the Form would change it&#8217;s behavior. Likewise, WPF has something like this, albeit at bit different. In WPF buttons have the IsDefault and IsCancel boolean properties. Setting this property to True changed the Window&#8217;s behavior accordingly.</p>
<p>However, Silverlight&#8217;s paired down framework doesn&#8217;t include these properties or anything like them. Silverlight does have the ChildWindow class, but it doesn&#8217;t have any functionality like this.</p>
<p><a href="http://programwith.net/blog/wp-content/uploads/2011/02/SilverlightLoginWindow.png"><img class="alignnone size-medium wp-image-32" title="Silverlight Login Window" alt="Login Window" src="http://programwith.net/blog/wp-content/uploads/2011/02/SilverlightLoginWindow-300x112.png" width="300" height="112" /></a></p>
<p>Recently I was working on a Silverlight 4 Out of Browser application that displays a Login window when it starts out of the browser. The application had several other dialogs in use other places without a problem up to this point, but it was painfully obvious on this one that I needed to implement something.</p>
<p>Sure, you an always handle the KeyPress or KeyUp event on the ChildWindow, but I wanted something a little more reusable than this. I also didn&#8217;t want to create a sub-classed ChildWindow or Button control because I wanted to be able to easily apply this to existing code without major modifications.</p>
<h3>So I decided to create a behavior.</h3>
<p>I started with a behavior class that handles the ChildWindow&#8217;s KeyUp event and look for Enter and Cancel keys. I also made AcceptButton and CancelButton dependency properties to have a reference to the buttons so the correct button&#8217;s Command when the desired key is pressed.</p>
<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:e6416f96-f8dc-4ee1-8500-26cf0e2b13a1" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 400px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#000080">public</span> <span style="color:#000080">class</span> <span style="color:#a65300">ChildWindowAcceptCancelBehavior</span> : <span style="color:#a65300">Behavior</span>&lt;<span style="color:#a65300">ChildWindow</span>&gt;<br /> {<br />     <span style="color:#0000ff">#region</span> AcceptButton Dependency Property</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">const</span> <span style="color:#000080">string</span> <span style="color:#800000">AcceptButtonPropertyName</span> = <span style="color:#bf3f00">&quot;AcceptButton&quot;</span>;</p>
<p>     <span style="color:#000080">public</span> <span style="color:#a65300">ButtonBase</span> <span style="color:#800000">AcceptButton</span><br />     {<br />         <span style="color:#000080">get</span> { <span style="color:#000080">return</span> (<span style="color:#a65300">ButtonBase</span>)<span style="color:#800000">GetValue</span>(<span style="color:#800000">AcceptButtonProperty</span>); }<br />         <span style="color:#000080">set</span> { <span style="color:#800000">SetValue</span>(<span style="color:#800000">AcceptButtonProperty</span>, <span style="color:#000080">value</span>); }<br />     }</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">static</span> <span style="color:#000080">readonly</span> <span style="color:#a65300">DependencyProperty</span> <span style="color:#800000">AcceptButtonProperty</span> =<br />         <span style="color:#a65300">DependencyProperty</span>.<span style="color:#800000">Register</span>(<span style="color:#800000">AcceptButtonPropertyName</span>,<br />         <span style="color:#000080">typeof</span>(<span style="color:#a65300">ButtonBase</span>), <span style="color:#000080">typeof</span>(<span style="color:#a65300">ChildWindowAcceptCancelBehavior</span>), <span style="color:#000080">null</span>);</p>
<p>     <span style="color:#0000ff">#endregion</span></p>
<p>     <span style="color:#0000ff">#region</span> CancelButton Dependency Property</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">const</span> <span style="color:#000080">string</span> <span style="color:#800000">CancelButtonPropertyName</span> = <span style="color:#bf3f00">&quot;CancelButton&quot;</span>;</p>
<p>     <span style="color:#000080">public</span> <span style="color:#a65300">ButtonBase</span> <span style="color:#800000">CancelButton</span><br />     {<br />         <span style="color:#000080">get</span> { <span style="color:#000080">return</span> (<span style="color:#a65300">ButtonBase</span>)<span style="color:#800000">GetValue</span>(<span style="color:#800000">CancelButtonProperty</span>); }<br />         <span style="color:#000080">set</span> { <span style="color:#800000">SetValue</span>(<span style="color:#800000">CancelButtonProperty</span>, <span style="color:#000080">value</span>); }<br />     }</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">static</span> <span style="color:#000080">readonly</span> <span style="color:#a65300">DependencyProperty</span> <span style="color:#800000">CancelButtonProperty</span> =<br />         <span style="color:#a65300">DependencyProperty</span>.<span style="color:#800000">Register</span>(<span style="color:#800000">CancelButtonPropertyName</span>,<br />         <span style="color:#000080">typeof</span>(<span style="color:#a65300">ButtonBase</span>), <span style="color:#000080">typeof</span>(<span style="color:#a65300">ChildWindowAcceptCancelBehavior</span>), <span style="color:#000080">null</span>);</p>
<p>     <span style="color:#0000ff">#endregion</span></p>
<p>     <span style="color:#000080">protected</span> <span style="color:#000080">override</span> <span style="color:#000080">void</span> <span style="color:#800000">OnAttached</span>()<br />     {<br />         <span style="color:#000080">base</span>.<span style="color:#800000">OnAttached</span>();</p>
<p>         <span style="color:#800000">AssociatedObject</span>.<span style="color:#800000">KeyUp</span> += <span style="color:#800000">ChildWindow_KeyUp</span>;<br />     }</p>
<p>     <span style="color:#000080">protected</span> <span style="color:#000080">override</span> <span style="color:#000080">void</span> <span style="color:#800000">OnDetaching</span>()<br />     {<br />         <span style="color:#800000">AssociatedObject</span>.<span style="color:#800000">KeyUp</span> -= <span style="color:#800000">ChildWindow_KeyUp</span>;</p>
<p>         <span style="color:#000080">base</span>.<span style="color:#800000">OnDetaching</span>();<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">ChildWindow_KeyUp</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">KeyEventArgs</span> <span style="color:#800000">e</span>)<br />     {<br />         <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Enter</span>)<br />         {<br />             <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">AcceptButton</span>);<br />         }<br />         <span style="color:#000080">else</span> <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Escape</span>)<br />         {<br />             <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">CancelButton</span>);<br />         }<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">ActivateButton</span>(<span style="color:#a65300">ButtonBase</span> <span style="color:#800000">button</span>)<br />     {<br />         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> != <span style="color:#000080">null</span> &amp;&amp; <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span> != <span style="color:#000080">null</span><br />             &amp;&amp; <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span>.<span style="color:#800000">CanExecute</span>(<span style="color:#800000">button</span>.<span style="color:#ff0000">CommandParameter</span>))<br />         {<br />             <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span>.<span style="color:#800000">Execute</span>(<span style="color:#800000">button</span>.<span style="color:#ff0000">CommandParameter</span>);<br />         }<br />     }<br /> }</div>
</p></div>
</p></div>
<p>&#160;</p>
<p>When the behavior is attached to a ChildWindow the KeyUp event is handled. In the event handler, if the key pressed is Key.Enter we execute the AcceptButton&#8217;s Command. Notice that I&#8217;m using ButtonBase for the AcceptButton and CancelButton dependency property&#8217;s type. This is because ButtonBase is the base class that contains the Command property. Using ButtonBase instead of Button allows us to use this behavior with HyperlinkButtons, ToggleButtons, and RepeatButtons as well.</p>
<p>This works pretty well, but when I was testing it on my Login window, my logins were failing. I use the Model-View-ViewModel pattern in this application, and so my controls are databound to a ViewModel class. It turned out that my failed logins were because the Password property of my LoginWindowViewModel was still blank. I was hitting the Enter key after typing in my password, but the password TextBox still had focus, so data binding never executed and my ViewModel didn&#8217;t know there was a new password! While WPF has the UpdateSourceTrigger binding property, Silverlight 4 doesn&#8217;t have an easy way to do this.</p>
<h3>Focus, Young Grasshopper</h3>
<p>To fix this situation, I decided to change focus to the button being activated when the key is pressed. This proved trickier than I thought it would &#8211; just calling Focus() on the button then moving on was causing the command to execute before data binding finished.</p>
<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:f9bd375e-36d7-4a68-941a-6670d8654d3a" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px;"><span style="color:#800000">AcceptButton</span>.<span style="color:#800000">Focus</span>();<br /> <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">AcceptButton</span>);</div>
</p></div>
</p></div>
<p>&#160;</p>
<p>After some trial &amp; error, I settled on dynamically handing the GotFocus event on the button, calling Focus(), and not executing the button&#8217;s command until the button actually received focus.</p>
<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:f0cbb490-881c-44da-914e-e1f7cf0c6afe" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">ChildWindow_KeyUp</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">KeyEventArgs</span> <span style="color:#800000">e</span>)<br /> {<br />     <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Enter</span>)<br />     {<br />         <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">GotFocus</span> += <span style="color:#800000">AcceptButton_GotFocus</span>;<br />         <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">Focus</span>();<br />     }<br />     <span style="color:#000080">else</span> <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Escape</span>)<br />     {<br />         <span style="color:#800000">CancelButton</span>.<span style="color:#800000">GotFocus</span> += <span style="color:#800000">CancelButton_GotFocus</span>;<br />         <span style="color:#800000">CancelButton</span>.<span style="color:#800000">Focus</span>();<br />     }<br /> }</p>
<p> <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">AcceptButton_GotFocus</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">RoutedEventArgs</span> <span style="color:#800000">e</span>)<br /> {<br />     <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">GotFocus</span> -= <span style="color:#800000">AcceptButton_GotFocus</span>;<br />     <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">AcceptButton</span>);<br /> }</p>
<p> <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">CancelButton_GotFocus</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">RoutedEventArgs</span> <span style="color:#800000">e</span>)<br /> {<br />     <span style="color:#800000">CancelButton</span>.<span style="color:#800000">GotFocus</span> -= <span style="color:#800000">CancelButton_GotFocus</span>;<br />     <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">CancelButton</span>);<br /> }</div>
</p></div>
</p></div>
<h3>&#160;</h3>
<h3>What About Clicks?</h3>
<p>I was happy with this and promptly applied it to all of the ChildWindow classes in my application. A day or so later I ran across a dialog window that wasn&#8217;t doing anything when I hit Enter. What the heck? Oh &#8230; it turns out that this window doesn&#8217;t have an associated ViewModel so it handles the Click event of the buttons instead of using Commands. Fixing this should be as simple as raising the Click event on the button, right? Well, not exactly. You can&#8217;t actually raise an event of another class like that. Also, there appeared to be limitations in Silverlight that made it so you can&#8217;t use reflection to raise events on classes. I was about to give up on this and then I remembered the UI automation support in Silverlight. This functionality was added to improve accessibility in Silverlight, but also was useful for UI testing. Turns out it was useful for me here too.</p>
<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:bc478640-2401-4c11-95b2-ed738515242a" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#000080">var</span> <span style="color:#800000">automationPeer</span> = <span style="color:#000080">new</span> <span style="color:#a65300">ButtonAutomationPeer</span>(<span style="color:#800000">AcceptButton</span>);<br /> <span style="color:#000080">var</span> <span style="color:#800000">invokeProvider</span> = (<span style="color:#2b91af">IInvokeProvider</span>)<span style="color:#800000">automationPeer</span>;<br /> <span style="color:#800000">invokeProvider</span>.<span style="color:#800000">Invoke</span>();</div>
</p></div>
</p></div>
<p>&#160;</p>
<p>The ButtonAutomationPeer class lets you call Invoke to &quot;invoke&quot; the Click event on a button. There&#8217;s also an abstract ButtonBaseAutomationPeer class, but in order to use it you need to check the type of the button, and return the correct sub-class &#8211; ButtonAutomationPeer, HyperlinkButtonAutomationPeer, RepeatButtonAutomationPeer, or ToggleButtonAutomationPeer.</p>
<h3>Final Product</h3>
<p>At this point I&#8217;m very pleased with this behavior. I can easily apply it to a ChildWindow like this &#8230;</p>
<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:45d94922-f9df-4c7f-b566-04e8e506a754" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">&lt;</span><span style="color:#a31515">controls</span><span style="color:#0000ff">:</span><span style="color:#a31515">ChildWindow</span><span style="color:#0000a0"> x</span><span style="color:#0000ff">:</span><span style="color:#0000a0">Class</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;MyApp.Views.LoginWindow&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">:</span><span style="color:#0000a0">x</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">:</span><span style="color:#0000a0">controls</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">:</span><span style="color:#0000a0">datainput</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;clr-namespace:</span><span style="color:#ff0000">System</span><span style="color:#910091">.</span><span style="color:#ff0000">Windows</span><span style="color:#910091">.</span><span style="color:#ff0000">Controls</span><span style="color:#910091">;assembly=System.Windows.Controls.Data.Input&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">:</span><span style="color:#0000a0">common</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;clr-namespace:MyApp.</span><span style="color:#ff0000">Common</span><span style="color:#910091">&quot;</span><br />                      <span style="color:#0000a0"> xmlns</span><span style="color:#0000ff">:</span><span style="color:#0000a0">i</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity&quot;</span><span style="color:#0000ff">&gt;</span><br />     <span style="color:#bf3f00"></span><span style="color:#0000ff">&lt;</span><span style="color:#a31515">i</span><span style="color:#0000ff">:</span><span style="color:#a31515">Interaction.Behaviors</span><span style="color:#0000ff">&gt;</span><br />         <span style="color:#bf3f00"></span><span style="color:#0000ff">&lt;</span><span style="color:#a31515">common</span><span style="color:#0000ff">:</span><span style="color:#ff0000">ChildWindowAcceptCancelBehavior</span><br />            <span style="color:#0000a0"> </span><span style="color:#ff0000">AcceptButton</span><span style="color:#0000ff">=&quot;{</span><span style="color:#a31515">Binding</span><span style="color:#ec7600"> ElementName</span><span style="color:#0000ff">=</span><span style="color:#00b3b3">LoginButton}</span><span style="color:#910091">&quot;</span><span style="color:#0000ff"> /&gt;</span><br />     <span style="color:#bf3f00"></span><span style="color:#0000ff">&lt;/</span><span style="color:#a31515">i</span><span style="color:#0000ff">:</span><span style="color:#a31515">Interaction.Behaviors</span><span style="color:#0000ff">&gt;</span><br />     <span style="color:#bf3f00"></span><span style="color:#0000ff">&lt;</span><span style="color:#a31515">Button</span><span style="color:#0000a0"> x</span><span style="color:#0000ff">:</span><span style="color:#0000a0">Name</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;LoginButton&quot;</span><span style="color:#0000a0"> Content</span><span style="color:#0000ff">=</span><span style="color:#910091">&quot;Login&quot;</span><span style="color:#0000a0"> </span><span style="color:#ff0000">Command</span><span style="color:#0000ff">=&quot;{</span><span style="color:#a31515">Binding</span><span style="color:#ec7600"> LoginCommand}</span><span style="color:#910091">&quot;</span><span style="color:#0000ff"> /&gt;</span><br /> <span style="color:#0000ff">&lt;/</span><span style="color:#a31515">controls</span><span style="color:#0000ff">:</span><span style="color:#a31515">ChildWindow</span><span style="color:#0000ff">&gt;</span></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Here&#8217;s the final behavior class that I&#8217;m currently using.</p>
<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:2c4709e7-9093-4ee5-930d-64faae429ea9" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 300px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#000080">public</span> <span style="color:#000080">class</span> <span style="color:#a65300">ChildWindowAcceptCancelBehavior</span> : <span style="color:#a65300">Behavior</span>&lt;<span style="color:#a65300">ChildWindow</span>&gt;<br /> {<br />     <span style="color:#0000ff">#region</span> AcceptButton Dependency Property</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">const</span> <span style="color:#000080">string</span> <span style="color:#800000">AcceptButtonPropertyName</span> = <span style="color:#bf3f00">&quot;AcceptButton&quot;</span>;</p>
<p>     <span style="color:#000080">public</span> <span style="color:#a65300">ButtonBase</span> <span style="color:#800000">AcceptButton</span><br />     {<br />         <span style="color:#000080">get</span> { <span style="color:#000080">return</span> (<span style="color:#a65300">ButtonBase</span>)<span style="color:#800000">GetValue</span>(<span style="color:#800000">AcceptButtonProperty</span>); }<br />         <span style="color:#000080">set</span> { <span style="color:#800000">SetValue</span>(<span style="color:#800000">AcceptButtonProperty</span>, <span style="color:#000080">value</span>); }<br />     }</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">static</span> <span style="color:#000080">readonly</span> <span style="color:#a65300">DependencyProperty</span> <span style="color:#800000">AcceptButtonProperty</span> =<br />         <span style="color:#a65300">DependencyProperty</span>.<span style="color:#800000">Register</span>(<span style="color:#800000">AcceptButtonPropertyName</span>,<br />         <span style="color:#000080">typeof</span>(<span style="color:#a65300">ButtonBase</span>), <span style="color:#000080">typeof</span>(<span style="color:#a65300">ChildWindowAcceptCancelBehavior</span>), <span style="color:#000080">null</span>);</p>
<p>     <span style="color:#0000ff">#endregion</span></p>
<p>     <span style="color:#0000ff">#region</span> CancelButton Dependency Property</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">const</span> <span style="color:#000080">string</span> <span style="color:#800000">CancelButtonPropertyName</span> = <span style="color:#bf3f00">&quot;CancelButton&quot;</span>;</p>
<p>     <span style="color:#000080">public</span> <span style="color:#a65300">ButtonBase</span> <span style="color:#800000">CancelButton</span><br />     {<br />         <span style="color:#000080">get</span> { <span style="color:#000080">return</span> (<span style="color:#a65300">ButtonBase</span>)<span style="color:#800000">GetValue</span>(<span style="color:#800000">CancelButtonProperty</span>); }<br />         <span style="color:#000080">set</span> { <span style="color:#800000">SetValue</span>(<span style="color:#800000">CancelButtonProperty</span>, <span style="color:#000080">value</span>); }<br />     }</p>
<p>     <span style="color:#000080">public</span> <span style="color:#000080">static</span> <span style="color:#000080">readonly</span> <span style="color:#a65300">DependencyProperty</span> <span style="color:#800000">CancelButtonProperty</span> =<br />         <span style="color:#a65300">DependencyProperty</span>.<span style="color:#800000">Register</span>(<span style="color:#800000">CancelButtonPropertyName</span>,<br />         <span style="color:#000080">typeof</span>(<span style="color:#a65300">ButtonBase</span>), <span style="color:#000080">typeof</span>(<span style="color:#a65300">ChildWindowAcceptCancelBehavior</span>), <span style="color:#000080">null</span>);</p>
<p>     <span style="color:#0000ff">#endregion</span></p>
<p>     <span style="color:#000080">protected</span> <span style="color:#000080">override</span> <span style="color:#000080">void</span> <span style="color:#800000">OnAttached</span>()<br />     {<br />         <span style="color:#000080">base</span>.<span style="color:#800000">OnAttached</span>();<br />         <span style="color:#800000">AssociatedObject</span>.<span style="color:#800000">KeyUp</span> += <span style="color:#800000">ChildWindow_KeyUp</span>;<br />     }</p>
<p>     <span style="color:#000080">protected</span> <span style="color:#000080">override</span> <span style="color:#000080">void</span> <span style="color:#800000">OnDetaching</span>()<br />     {<br />         <span style="color:#800000">AssociatedObject</span>.<span style="color:#800000">KeyUp</span> -= <span style="color:#800000">ChildWindow_KeyUp</span>;<br />         <span style="color:#000080">base</span>.<span style="color:#800000">OnDetaching</span>();<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">ChildWindow_KeyUp</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">KeyEventArgs</span> <span style="color:#800000">e</span>)<br /> {<br />     <span style="color:#000080">var</span> <span style="color:#800000">controlWithFocus</span> = <span style="color:#a65300">FocusManager</span>.<span style="color:#800000">GetFocusedElement</span>();<br />     <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Enter</span>)<br />     {<br />         <span style="color:#008000">// we don&#39;t want to do anything if the currently focused control uses the enter key</span><br />         <span style="color:#000080">if</span> (<span style="color:#800000">controlWithFocus</span> <span style="color:#000080">is</span> <span style="color:#a65300">TextBox</span> &amp;<span style="color:#ff0000">amp</span>;&amp;<span style="color:#ff0000">amp</span>; ((<span style="color:#a65300">TextBox</span>)<span style="color:#800000">controlWithFocus</span>).<span style="color:#800000">AcceptsReturn</span>)<br />             <span style="color:#000080">return</span>;</p>
<p>         <span style="color:#800000">e</span>.<span style="color:#800000">Handled</span> = <span style="color:#000080">true</span>;<br />         <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">GotFocus</span> += <span style="color:#800000">AcceptButton_GotFocus</span>;<br />         <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">Focus</span>();<br />     }<br />     <span style="color:#000080">else</span> <span style="color:#000080">if</span> (<span style="color:#800000">e</span>.<span style="color:#800000">Key</span> == <span style="color:#2b91af">Key</span>.<span style="color:#800000">Escape</span>)<br />     {<br />         <span style="color:#800000">CancelButton</span>.<span style="color:#800000">GotFocus</span> += <span style="color:#800000">CancelButton_GotFocus</span>;<br />         <span style="color:#800000">CancelButton</span>.<span style="color:#800000">Focus</span>();<br />     }<br /> }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">AcceptButton_GotFocus</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">RoutedEventArgs</span> <span style="color:#800000">e</span>)<br />     {<br />         <span style="color:#800000">AcceptButton</span>.<span style="color:#800000">GotFocus</span> -= <span style="color:#800000">AcceptButton_GotFocus</span>;<br />         <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">AcceptButton</span>);<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">CancelButton_GotFocus</span>(<span style="color:#000080">object</span> <span style="color:#800000">sender</span>, <span style="color:#a65300">RoutedEventArgs</span> <span style="color:#800000">e</span>)<br />     {<br />         <span style="color:#800000">CancelButton</span>.<span style="color:#800000">GotFocus</span> -= <span style="color:#800000">CancelButton_GotFocus</span>;<br />         <span style="color:#800000">ActivateButton</span>(<span style="color:#800000">CancelButton</span>);<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#000080">void</span> <span style="color:#800000">ActivateButton</span>(<span style="color:#a65300">ButtonBase</span> <span style="color:#800000">button</span>)<br />     {<br />         <span style="color:#000080">var</span> <span style="color:#800000">automationPeer</span> = <span style="color:#800000">GetAutomationPeerForButton</span>(<span style="color:#800000">button</span>);<br />         <span style="color:#000080">var</span> <span style="color:#800000">invokeProvider</span> = (<span style="color:#2b91af">IInvokeProvider</span>)<span style="color:#800000">automationPeer</span>;<br />         <span style="color:#800000">invokeProvider</span>.<span style="color:#800000">Invoke</span>();</p>
<p>         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> != <span style="color:#000080">null</span> &amp;&amp; <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span> != <span style="color:#000080">null</span><br />             &amp;&amp; <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span>.<span style="color:#800000">CanExecute</span>(<span style="color:#800000">button</span>.<span style="color:#ff0000">CommandParameter</span>))<br />         {<br />             <span style="color:#800000">button</span>.<span style="color:#ff0000">Command</span>.<span style="color:#800000">Execute</span>(<span style="color:#800000">button</span>.<span style="color:#ff0000">CommandParameter</span>);<br />         }<br />     }</p>
<p>     <span style="color:#000080">private</span> <span style="color:#a65300">ButtonBaseAutomationPeer</span> <span style="color:#800000">GetAutomationPeerForButton</span>(<span style="color:#a65300">ButtonBase</span> <span style="color:#800000">button</span>)<br />     {<br />         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> <span style="color:#000080">is</span> <span style="color:#a65300">Button</span>)<br />             <span style="color:#000080">return</span> <span style="color:#000080">new</span> <span style="color:#a65300">ButtonAutomationPeer</span>((<span style="color:#a65300">Button</span>)<span style="color:#800000">button</span>);<br />         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> <span style="color:#000080">is</span> <span style="color:#a65300">HyperlinkButton</span>)<br />             <span style="color:#000080">return</span> <span style="color:#000080">new</span> <span style="color:#a65300">HyperlinkButtonAutomationPeer</span>((<span style="color:#a65300">HyperlinkButton</span>)<span style="color:#800000">button</span>);<br />         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> <span style="color:#000080">is</span> <span style="color:#a65300">RepeatButton</span>)<br />             <span style="color:#000080">return</span> <span style="color:#000080">new</span> <span style="color:#a65300">RepeatButtonAutomationPeer</span>((<span style="color:#a65300">RepeatButton</span>)<span style="color:#800000">button</span>);<br />         <span style="color:#000080">if</span> (<span style="color:#800000">button</span> <span style="color:#000080">is</span> <span style="color:#a65300">ToggleButton</span>)<br />             <span style="color:#000080">return</span> <span style="color:#000080">new</span> <span style="color:#a65300">ToggleButtonAutomationPeer</span>((<span style="color:#a65300">ToggleButton</span>)<span style="color:#800000">button</span>);<br />         <span style="color:#000080">return</span> <span style="color:#000080">null</span>;<br />     }<br /> }</div>
</p></div>
</p></div>
<h3>&#160;</h3>
<h3>Gotchas</h3>
<p>Keep in mind that if your button&#8217;s Command or Click event tries to do something that requires user action, like close the application or access the webcam, you&#8217;ll get a SecurityException thrown. This is because of Silverlight&#8217;s sandboxed environment. There&#8217;s really no way around this except to keep it in mind and not use the behavior if you need functionality like this.</p>
<p>Also, there are a few things that this behavior doesn&#8217;t do that Windows Forms and WPF functionality does do. In Windows Forms and WPF the default/accept button has a different style that makes it apparent to the user what the default button is. This behavior could definitely be improved to apply a style change on the Accept button, but I didn&#8217;t take it that far.</p>
<p>Also, in WPF and Windows Forms if the Default button doesn&#8217;t close the window you&#8217;ll notice focus doesn&#8217;t actually change. I don&#8217;t know why you&#8217;d ever have a situation like this, but its possible. Just like the above situation, if you need your application to work this way you should probably just avoid using this behavior.</p>
<img src="http://feeds.feedburner.com/~r/ProgramWithDotNet/~4/ZT5vpnaMiSY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://programwith.net/blog/2011/02/accept-and-cancel-buttons-behavior-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://programwith.net/blog/2011/02/accept-and-cancel-buttons-behavior-in-silverlight/</feedburner:origLink></item>
		<item>
		<title>CodeMash 2011 Presentation</title>
		<link>http://feedproxy.google.com/~r/ProgramWithDotNet/~3/jMEXek4kZ0Y/</link>
		<comments>http://programwith.net/blog/2011/01/codemash-2011-presentation/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 03:36:15 +0000</pubDate>
		<dc:creator>mattcasto</dc:creator>
				<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://216.119.97.66/blog/?p=5</guid>
		<description><![CDATA[Last week I had the honor to give my &#8220;Taking Web Applications Offline&#8221; presentation at CodeMash v2.0.1.1. The talk went into various technologies you might use if you wanted to take a web application and make it available for use with no network connection, including some features of HTML5, Silverlight and AIR. My slides are [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had the honor to give my &#8220;Taking Web Applications Offline&#8221; presentation at <a title="CodeMash v2.0.1.1" href="http://www.codemash.org">CodeMash v2.0.1.1</a>. The talk went into various technologies you might use if you wanted to take a web application and make it available for use with no network connection, including some features of HTML5, Silverlight and AIR.</p>
<p>My slides are available through <a href="http://www.slideshare.net/mattcasto/taking-web-applications-offline-6531560">SlideShare</a>.</p>
<div id="__ss_6531560" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Taking Web Applications Offline" href="http://www.slideshare.net/mattcasto/taking-web-applications-offline-6531560">Taking Web Applications Offline</a></strong><br />
<object id="__sse6531560" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=takingwebappsoffline-110112095406-phpapp01&amp;stripped_title=taking-web-applications-offline-6531560&amp;userName=mattcasto" /><param name="allowfullscreen" value="true" /><embed id="__sse6531560" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=takingwebappsoffline-110112095406-phpapp01&amp;stripped_title=taking-web-applications-offline-6531560&amp;userName=mattcasto" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/mattcasto">Matt Casto</a>.</div>
</div>
<p>The demo code is available on my <a href='http://cid-63a50a5c41970075.office.live.com/browse.aspx/CodeMash%202011'>SkyDrive</a>.</p>
<p>If you went to the presentation, let me know what you thought by giving it a rating at <a href="http://speakerrate.com/talks/5289-taking-web-applications-offline">SpeakerRate</a>.</p>
<img src="http://feeds.feedburner.com/~r/ProgramWithDotNet/~4/jMEXek4kZ0Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://programwith.net/blog/2011/01/codemash-2011-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://programwith.net/blog/2011/01/codemash-2011-presentation/</feedburner:origLink></item>
	</channel>
</rss>

