<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>House of w00t</title>
	<atom:link href="http://ryancdavidson.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryancdavidson.com/blog</link>
	<description>A collection of technology lessons learned though doing. Sharing of code samples, tips and tricks for web design and development. Written by an interactive designer/developer for other designer/developers</description>
	<lastBuildDate>Tue, 15 May 2012 18:19:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Clipping Path nuance in WPF/Silverlight/WP7</title>
		<link>http://ryancdavidson.com/blog/2012/05/clipping-path-nuance-in-wpfsilverlightwp7/</link>
		<comments>http://ryancdavidson.com/blog/2012/05/clipping-path-nuance-in-wpfsilverlightwp7/#comments</comments>
		<pubDate>Mon, 14 May 2012 17:01:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=298</guid>
		<description><![CDATA[When you&#8217;re working with clipping paths in WPF and/or Silverlight there is a little nuance that you need to know about. If the alignment of your path and the item your are masking are different you&#8217;ll get some pretty bizarre behavior. The item your masking will appear in the correct position, but the clipping path will appear [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re working with <a href="http://msdn.microsoft.com/en-us/library/ms752293.aspx">clipping path</a>s in WPF and/or Silverlight there is a little nuance that you need to know about. If the alignment of your path and the item your are masking are different you&#8217;ll get some pretty bizarre behavior. The item your masking will appear in the correct position, but the clipping path will appear offset.</p>
<p>The default orientation of a path is &#8220;Stretch&#8221; &#8211; this is not what you want in most cases.</p>
<p>Make sure that the alignment of both your Image (in this case) and your Path are set to &#8216;Left&#8221; and &#8220;Top&#8221;, otherwise your clipping mask will be offset.</p>
<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2012/05/clipping_path_alignment_sample.jpg"><img class="alignleft size-medium wp-image-299" title="clipping_path_alignment_sample" src="http://ryancdavidson.com/blog/wp-content/uploads/2012/05/clipping_path_alignment_sample-300x154.jpg" alt="" width="300" height="154" /></a></p>
<p>This one stumped me for a while, so hopefully this saves someone else time.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>You can quickly apply your clipping path to the item by selecting both the path and the item and then right clicking -&gt; roll over PATH -&gt; and select Make Clipping Path.</p>
<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2012/05/apply_clipping_path.jpg"><img class="size-medium wp-image-301 alignleft" title="apply_clipping_path" src="http://ryancdavidson.com/blog/wp-content/uploads/2012/05/apply_clipping_path-285x300.jpg" alt="" width="285" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2012/05/clipping-path-nuance-in-wpfsilverlightwp7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a printable image from a still-screen capture.</title>
		<link>http://ryancdavidson.com/blog/2011/01/getting-a-printable-image-from-a-still-screen-capture/</link>
		<comments>http://ryancdavidson.com/blog/2011/01/getting-a-printable-image-from-a-still-screen-capture/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 23:43:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=274</guid>
		<description><![CDATA[Getting a printable image from a still-screen capture. Software tools needed. Adobe Photoshop (or other photo manipulation program with the ability to switch color mode from RGB to Index) Windows or Mac OS Have you ever had a client ask you to get a screen capture of some software, or a website, or anything that [...]]]></description>
			<content:encoded><![CDATA[<h3>Getting a printable image from a still-screen capture.</h3>
<ul>Software tools needed.</p>
<li>Adobe Photoshop (or other photo manipulation program with the ability to switch color mode from RGB to Index)</li>
<li>Windows or Mac OS</li>
</ul>
<p>Have you ever had a client ask you to get a screen capture of some software, or a website, or anything that can appear on screen and then include that screen shot in a printed proposal? If you have, you have probably run into the following problem. When you create your screen capture and go to print it out the image become extremely pixelated and looks aweful. Here is the solution to that problem.</p>
<ol>
<li>First of all you have to know how to make a screen capture. It&#8217;s easy on both a PC and Mac. On a PC you simply hit the <em>Print Screen</em> key on your keyboard. On a Mac you hit <em>Shift-Ctrl-Open Apple-4</em>and then drag the little target around the area you want to capture. Once you&#8217;ve done this the image data is stored on your clipboard.</li>
<li>Next, open up your image editing software (Photoshop, Photoshop Elements, MS Paint, etc).</li>
<li>Once the program is open you want to create a new blank canvas. File &gt; New.</li>
<li>Once the new canvas is open hit <em>ctrl-v</em> or Edit &gt; Paste and the image data you saved to your clipboard will show up in your image editing software.</li>
</ol>
<p>At this point you can save the image but if you try to print it you&#8217;ll notice all the pixelation. The reason for this that screen resoltuion is 72dpi and Print is usually a minimum of 180dpi. That brings us to the solution. This is more of a graphics trick. What we&#8217;re going to do is trick the computer into giving us more pixel data than we actually have. It&#8217;s rather clever.</p>
<ol>
<li>First, in Photoshop go the the Image menu and select Mode and change the image to Indexed Color. Image &gt; Mode &gt; Indexed Color as shown in figure 1.1
<p><img src="http://ryancdavidson.com/web/changeindexclr.gif" alt="Change Color Mode to Indexed Color" width="418" height="360" /><br />
Figure 1.1</li>
<li>Next, we&#8217;re going to blow up the image. Usually this will pixelate the image but because we&#8217;re working in indexed color mode the effects are not as severe. Go to Image &gt; Image Size and increase the Resolution to 300. as shown in figure 1.2
<p><img src="http://ryancdavidson.com/web/changeres.gif" alt="Change Resolution to 300" width="405" height="335" /><br />
Figure 1.2</li>
<li>Finally we&#8217;re going to change the color mode back to RGB. Image &gt; Mode &gt; RGB and save the file. Now you have something you can work with for print.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2011/01/getting-a-printable-image-from-a-still-screen-capture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Santa</title>
		<link>http://ryancdavidson.com/blog/2011/01/santa/</link>
		<comments>http://ryancdavidson.com/blog/2011/01/santa/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 02:46:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=267</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2011/01/169420_480857053035_551453035_6074382_8127710_o.jpg"><img src="http://ryancdavidson.com/blog/wp-content/uploads/2011/01/169420_480857053035_551453035_6074382_8127710_o-214x300.jpg" alt="" title="169420_480857053035_551453035_6074382_8127710_o" width="214" height="300" class="alignleft size-medium wp-image-271" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2011/01/santa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Flickr Integration</title>
		<link>http://ryancdavidson.com/blog/2011/01/testing-flickr-integration/</link>
		<comments>http://ryancdavidson.com/blog/2011/01/testing-flickr-integration/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 22:38:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=268</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a class="flickr-image alignnone" title="Fireman Rogan" href="http://www.flickr.com/photos/discorax/4736901328/" target="_blank"><img src="http://farm5.static.flickr.com/4114/4736901328_556e117a5b_t.jpg" alt="Fireman Rogan" /></a></p>
<a href="http://www.flickr.com/photos/81056571@N00/4736901328/" title="Fireman Rogan" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4114/4736901328_556e117a5b_s.jpg" alt="Fireman Rogan" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736265353/" title="DSC_7400" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4097/4736265353_972d0fefaa_s.jpg" alt="DSC_7400" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736266153/" title="DSC_7397" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4080/4736266153_932357004b_s.jpg" alt="DSC_7397" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736903364/" title="DSC_7393" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4140/4736903364_22e0236891_s.jpg" alt="DSC_7393" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736904114/" title="DSC_7389" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4079/4736904114_524206c118_s.jpg" alt="DSC_7389" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736268119/" title="DSC_7407" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4122/4736268119_2aabdc6610_s.jpg" alt="DSC_7407" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736268785/" title="DSC_7409" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4074/4736268785_2d5425fa0e_s.jpg" alt="DSC_7409" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736269655/" title="DSC_7411" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4137/4736269655_322f01c216_s.jpg" alt="DSC_7411" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736270507/" title="DSC_7412" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4076/4736270507_87b42b98a9_s.jpg" alt="DSC_7412" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736271289/" title="DSC_7417" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4080/4736271289_fcff76c3e0_s.jpg" alt="DSC_7417" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736272679/" title="DSC_7421" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4075/4736272679_1a9a34d04e_s.jpg" alt="DSC_7421" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736273861/" title="DSC_7423" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4097/4736273861_cf009ecdca_s.jpg" alt="DSC_7423" class="flickr-medium" />
</a>
<a href="http://www.flickr.com/photos/81056571@N00/4736275247/" title="DSC_7426" rel="flickr-mgr[72157624363960586]" class="flickr-image" >
	<img src="http://farm5.static.flickr.com/4138/4736275247_9ee2d72816_s.jpg" alt="DSC_7426" class="flickr-medium" />
</a>

]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2011/01/testing-flickr-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Spectrum of User Experience.</title>
		<link>http://ryancdavidson.com/blog/2011/01/the-spectrum-of-user-experience/</link>
		<comments>http://ryancdavidson.com/blog/2011/01/the-spectrum-of-user-experience/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 22:08:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=262</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2011/01/4075480414_90f736c735_o.gif"><img class="alignleft size-medium wp-image-263" title="Spectrum of User Experience" src="http://ryancdavidson.com/blog/wp-content/uploads/2011/01/4075480414_90f736c735_o-276x300.gif" alt="UX" width="276" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2011/01/the-spectrum-of-user-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My guest chapter for Hacking Silverlight: Community Edition</title>
		<link>http://ryancdavidson.com/blog/2010/11/my-guest-chapter-for-hacking-silverlight-community-edition/</link>
		<comments>http://ryancdavidson.com/blog/2010/11/my-guest-chapter-for-hacking-silverlight-community-edition/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 17:50:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[programing]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=249</guid>
		<description><![CDATA[I&#8217;ve been working hard to stay involved in the local user group community. My adventures put me in touch with a local Silverlight MVP, David J. Kelley. David has been working on a number of projects, one of which is a follow-up book to his first title Hacking Silverlight. This new edition is titled Hacking [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2010/11/HackingSilverlightCover.png"><img class="alignleft size-medium wp-image-258" title="HackingSilverlightCover" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/11/HackingSilverlightCover-184x300.png" alt="Hacking Silverlight: Community Edition Cover" width="184" height="300" /></a>I&#8217;ve been working hard to stay involved in the local user group community. My adventures put me in touch with a local Silverlight MVP, <a href="http://twitter.com/davidjkelley" target="_blank">David J. Kelley</a>. David has been working on a number of projects, one of which is a follow-up book to his first title <a href="http://www.hackingsilverlight.net/" target="_blank"><em>Hacking Silverlight</em></a>. This new edition is titled <em>Hacking Silverlight: Community Edition</em>. David asked me to write a chapter that highlights some of the great projects that are on <a href="http://www.codeplex.com/" target="_blank">Codeplex.com</a>. My chapter is titled <em>Codeplex Projects Everyone Should Know About</em> and you can read it <a href="http://hackingsilverlight.blogspot.com/2010/11/codeplex-projects-everyone-should-know.html" target="_blank">here</a>.</p>
<p>In addition to the book there is a great <a href="http://www.hackingsilverlight.net/HackingSilverlightCodeBrowser.html" target="_blank">Code Browser</a> that you can install which will guide you through learning the XAML/C# techniques highlighted in the book. It was a great learning experience and I hope to be able to contribute more in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/11/my-guest-chapter-for-hacking-silverlight-community-edition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Connect to MySQL from windows command prompt.</title>
		<link>http://ryancdavidson.com/blog/2010/10/connect-to-mysql-from-windows-command-prompt/</link>
		<comments>http://ryancdavidson.com/blog/2010/10/connect-to-mysql-from-windows-command-prompt/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 23:47:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=276</guid>
		<description><![CDATA[This is a brief tutorial to help you connect to your database via the command prompt in windows using telnet. This should work just fine from the terminal window on a Mac as well but the screen shot won&#8217;t match exactly. Open the command prompt in windows through the start menu as shown in figures [...]]]></description>
			<content:encoded><![CDATA[<h2><span style="font-weight: normal; font-size: 13px;">This is a brief tutorial to help you connect to your database via the command prompt in windows using telnet. This should work just fine from the terminal window on a Mac as well but the screen shot won&#8217;t match exactly.</span></h2>
<ol>
<li>Open the command prompt in windows through the start menu as shown in figures 1.1 and 1.2.<br />
<img src="http://ryancdavidson.com/web/_images/figure1.1.gif" alt="" width="414" height="279" /><br />
figure 1.1</p>
<p><img src="http://ryancdavidson.com/web/_images/figure1.2.gif" alt="" width="362" height="252" /><br />
figure 1.2</li>
<li>Type &#8216;telnet&#8217; into the command prompt (see figure 1.3).
<p><img src="http://ryancdavidson.com/web/_images/figure1.3.gif" alt="" width="691" height="373" /><br />
figure 1.3</p>
<p>Then login to your web server using the command &#8216;open&#8217; and entering the Login and Password you set up when you created your account. (figure 1.4) If you don&#8217;t know this information contact your web host.<br />
<img src="http://ryancdavidson.com/web/_images/figure1.4.gif" alt="" width="699" height="373" /><br />
figure 1.4</li>
<li>Once you&#8217;ve logged in open the MySQL command line by typing (see figure 1.5)
<pre>%mysql -u -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17109 to server version: 4.1.18-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&gt;</pre>
<p><img src="http://ryancdavidson.com/web/_images/figure1.5.gif" alt="" width="869" height="394" /></li>
</ol>
<p>And there you have it. You are connected to MySQL now have fun manipulating your database.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/10/connect-to-mysql-from-windows-command-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome 7 browser update has a great user experience</title>
		<link>http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/</link>
		<comments>http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 17:31:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=239</guid>
		<description><![CDATA[Google announced today the release of the latest version of their Chrome browser, version 7. You can read all about the changes in the update from Google, but what I wanted to talk about was the great user experience for the update. You start by click on the Wrench icon and going to About Google [...]]]></description>
			<content:encoded><![CDATA[<p>Google announced today the release of the latest version of their Chrome browser, version 7. You can read all about the <a href="http://www.google.com/chrome/intl/en/landing_chrome.html?hl=en&amp;brand=CHMB&amp;utm_campaign=en&amp;utm_source=en-ha-na-us-sk&amp;utm_medium=ha">changes in the update</a> from Google, but what I wanted to talk about was the great user experience for the update.</p>
<p>You start by click on the Wrench icon and going to About Google Chrome.  On there is a big button that says Update Now! You click on it and it starts installing right away. After it downloads and installs all the necessary files (in under 10 seconds by the way) it instructs you to close down all Chrome windows for the changes to take effect. That&#8217;s a GREAT EXPERIENCE. You installed all the stuff, but the update didn&#8217;t interrupt my current browsing session. You didn&#8217;t even force me to restart ANYTHING at that moment.  Then you finish what you&#8217;re doing and restart Chrome. Lets say you had 7 tabs open. Your start screen has a link to the 7 tabs you closed when you restarted so you can click on it and instantly be back where you were now running the latest version of Chrome. The whole process took under a minute for me.  That is a great user experience.</p>

<a href='http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/chromeupdateprocess1/' title='ChromeUpdateProcess1'><img width="150" height="150" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/10/ChromeUpdateProcess1-150x150.png" class="attachment-thumbnail" alt="ChromeUpdateProcess1" title="ChromeUpdateProcess1" /></a>
<a href='http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/chromeupdateprocess2/' title='ChromeUpdateProcess2'><img width="150" height="150" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/10/ChromeUpdateProcess2-150x150.png" class="attachment-thumbnail" alt="ChromeUpdateProcess2" title="ChromeUpdateProcess2" /></a>
<a href='http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/chromeupdateprocess3/' title='ChromeUpdateProcess3'><img width="150" height="150" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/10/ChromeUpdateProcess3-150x150.png" class="attachment-thumbnail" alt="ChromeUpdateProcess3" title="ChromeUpdateProcess3" /></a>

]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/10/google-chrome-7-browser-update-has-a-great-user-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using HtmlAgilityPack to parse a website.</title>
		<link>http://ryancdavidson.com/blog/2010/07/using-htmlagilitypack-to-parse-a-website/</link>
		<comments>http://ryancdavidson.com/blog/2010/07/using-htmlagilitypack-to-parse-a-website/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:17:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=215</guid>
		<description><![CDATA[In my line of work I&#8217;m often asked to come up with some unique data sources to power some of our information visualizations. Often times this data  is not available in an API or RSS feed. Sometimes it&#8217;s just available in HTML. Up until recently I&#8217;ve shied away from parsing HTML with RegEx or XML [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2010/07/bingSearchResultsSS.png"><img class="size-medium wp-image-237 alignright" title="bingSearchResultsSS" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/07/bingSearchResultsSS-300x121.png" alt="Bing.com Twitter Bird Image Results" width="300" height="121" /></a>In my line of work I&#8217;m often asked to come up with some unique data sources to power some of our information visualizations. Often times this data  is not available in an API or RSS feed. Sometimes it&#8217;s just available in HTML. Up until recently I&#8217;ve shied away from parsing HTML with RegEx or XML parsers because they can be really processor intensive and give mixed results.</p>
<p>This past week I had another need for some data in an HTML page as a data source, this time for a WPF application. Since I needed to make it work I did a quick search on on the internet for some HTML parsers. What I found was amazingly useful. The <a href="http://htmlagilitypack.codeplex.com/" target="_blank">HtmlAgilityPack</a> is a .NET library that gives all the tools to parse your HTML, retrieve the data you&#8217;re looking for. It supports Linq to Objects and has XPATH implementation to let you find what you need easily. PLUS, because it&#8217;s on codeplex it&#8217;s open-source and free! Fantastic!</p>
<p>Here is a little code snippet if you ever wanted to know how many <a href="http://www.bing.com/images/search?q=twitter+bird">Twitter Bird image results</a> are in a Bing.com search. Note that I&#8217;m using the XPATH syntax to find the &lt;span&gt; tag with and ID value of &#8216;sw_ptc&#8217; and then select the InnerText from that node. HtmlAgilityPack has lots of XPATH and XSLT options so you&#8217;ll be able to find whatever your looking for with minimal effort.</p>
<pre class="brush: c-sharp">using System;
using System.IO;
using System.Net;
using System.Configuration;
using System.Xml.Linq;
using HtmlAgilityPack;
class BingCounter
    {
        private WebClient webClient;
        public BingCounter()
        {
            Uri _feedUri = new Uri("http://www.bing.com/images/search?q=twitter+bird");
            webClient = new WebClient();
            webClient.DownloadDataCompleted += new DownloadDataCompletedEventHandler(stringDataCompletedEvent);
            webClient.DownloadDataAsync(_feedUri);
        }
        private void stringDataCompletedEvent(object sender, DownloadDataCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                try
                {
                    byte[] xmlString = e.Result;
                    HtmlDocument doc = new HtmlDocument();
                    doc.Load(new StreamReader(new MemoryStream(xmlString)));
                    string results = "";
                    foreach (HtmlNode span in doc.DocumentNode.SelectNodes("//span[@id='sw_ptc']"))
                    {
                        results = span.InnerText;
                    }
                }
                catch (Exception exp)
                {
                    Console.Write(exp.Data);

                }
            }
        }</pre>
<p>Have fun and happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/07/using-htmlagilitypack-to-parse-a-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metro UI &#8211; The Windows Phone 7 Aesthetic</title>
		<link>http://ryancdavidson.com/blog/2010/07/metro-ui-the-windows-phone-7-aesthetic/</link>
		<comments>http://ryancdavidson.com/blog/2010/07/metro-ui-the-windows-phone-7-aesthetic/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 23:13:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[MIX10]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=126</guid>
		<description><![CDATA[This year there was a lot of talk at MIX10 in Las Vegas about the new Windows Phone 7. A large part of this discussion was on Metro UI, the interface aesthetic driving the user experience on the new phone. The Keynotes spent a fair bit of time discussing the new phone and how Silverlight [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryancdavidson.com/blog/wp-content/uploads/2010/07/METRO_poster.jpg"><img class="alignleft size-medium wp-image-235" title="METRO_poster" src="http://ryancdavidson.com/blog/wp-content/uploads/2010/07/METRO_poster-300x152.jpg" alt="METRO" width="300" height="152" /></a>This year there was a lot of talk at MIX10 in Las Vegas about the new Windows Phone 7. A large part of this discussion was on Metro UI, the interface aesthetic driving the user experience on the new phone. The Keynotes spent a fair bit of time discussing the new phone and how Silverlight can power the experience of the phone.</p>
<p>I attended the MIX10 session &#8211; Windows Phone UI and Design Language which you can watch online: <a href="http://live.visitmix.com/MIX10/Sessions/CL14">http://live.visitmix.com/MIX10/Sessions/CL14</a></p>
<p><strong>List of Metro Principles:</strong></p>
<ul>
<li>Clean, Light, Open, Fast</li>
<li>Celebrate Typography</li>
<li>Alive in Motion</li>
<li>Content, Not Chrome</li>
<li>Authentically Digital</li>
</ul>
<p>Twtpoll: <a href="http://twtpoll.com/cco6xc">http://twtpoll.com/cco6xc</a> &#8211; What words would you use to describe the new Metro UI design. &#8216; Typography&#8217; and &#8216;Content-Driven&#8217; were my two.</p>
<p>The inspiration for Metro came from international mass transit, namely metropolitan train stations  and air ports in Europe and the United States. Microsoft created a neat little booklet that explains the Metro design aesthetic. <a href="http://www.ryancdavidson.com/files/MetroBook.pdf" target="_blank">Download the PDF</a>. My big critic of Metro is that it claims to have drawn inspiration from international symbol design, however it seems to be extremely typographic heavy. They have done away with most of the symbols in favor of typography. And while it is very beautiful there is a level of concern in my mind with how well it will localize (translate into other languages). I can see a large German or Dutch word completely breaking the flow of a Metro UI. There are symbols still included in Metro, and they have been used to good effect as a sub-menu element.  I&#8217;m interested to see the future of Metro once <a href="http://www.windowsphone7.com/">Windows® Phone 7</a> goes international.</p>
<p>Here is a little interview with Albert Shum, Director of Mobile Experience Design at Microsoft. Listen direct from the source as he discusses the design inspiration for Windows® Phone 7.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" 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://www.youtube-nocookie.com/v/n7pW7V_JLNg&amp;hl=en_US&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube-nocookie.com/v/n7pW7V_JLNg&amp;hl=en_US&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/07/metro-ui-the-windows-phone-7-aesthetic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What does an Internship Proposal look like?</title>
		<link>http://ryancdavidson.com/blog/2010/05/what-does-an-internship-proposal-look-like/</link>
		<comments>http://ryancdavidson.com/blog/2010/05/what-does-an-internship-proposal-look-like/#comments</comments>
		<pubDate>Mon, 03 May 2010 23:05:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[PBJS]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=196</guid>
		<description><![CDATA[Over on my Posterous I put up a fun little graphic that captures my mouse movement while I was writing up an internship proposal. Knowing full well that many people would come to the post hoping to find an example of a internship proposal, I set up this blog post to show what an internship [...]]]></description>
			<content:encoded><![CDATA[<p>Over on <a href="http://discorax.posterous.com" target="_blank">my Posterous</a> I put up a fun little graphic that captures my mouse movement while I was writing up an internship proposal. Knowing full well that many people would come to the post hoping to find an example of a internship proposal, I set up this blog post to show what an internship proposal can look like and what elements I include so others don&#8217;t have to start from scratch.</p>
<p>First off I&#8217;ll answer the question of &#8220;WHY?&#8221;  Why I value internships and why you should too. Internships are great way to build your reputation and engage with schools and the community to get the best of the available talent pool. For some companies, internships are a way to leverage your reputation to get cheap/free labor. Forgive my obvious bias for a moment, I&#8217;ve had a few internship experiences and some were better than others. I worked as an intern for both a large media company (<a href="http://www.fsci.com/" target="_blank">Fisher Compunctions</a>) and a 10-person strong marketing agency (<a href="http://www.pbjs.com" target="_blank">PBJS</a>). During my internship experience, I learned a lot more, and received more professional benefits from the small company because I was a valuable member of the team, unlike the large company where I was cheap go-for. But I digress.</p>
<p>Internships can be hard to fill for many companies. Often time a internship proposal is like selling your company to prospective students. You want your company to stand out so that the best and the brightest students come to work at your company. Your reputation, client list and portfolio go a long way in this sales pitch.</p>
<p>When I first started writing up an internship program I was doing so with one simple goal: <strong>create an experience that was as good as or better than my own experience</strong>. That&#8217;s sounds a lot easier than it is for a few reasons. First of all, all school programs have different criteria for their students. It behooves you to do a little research through the internship coordinators and be sure to pinpoint those requirements so your interns can receive credit for their time as your intern. Some schools won&#8217;t even allow your internship in their program if you don&#8217;t. I&#8217;ll talk more about school requirements in a moment. Second, make sure you have enough time to have an intern. I know that sounds a little counter-intuitive but the reality is that interns (even the best ones) require your time and attention in some form. If you are a mentor, then that is your responsibility to engage with your intern. If you fill your 40 hours a week with work, your poor intern will end up being left to find things to keep themselves busy or end up getting bored and doing <em>nothing </em>their whole time. That doesn&#8217;t benefit either of you. Finally, make sure you have something for them to do. Not only do you have to manage your intern, but it&#8217;s your job to make sure they have work. Your management could be a simple as starting each day off telling your intern to, &#8220;walk around the office asking if people need help.&#8221;  Be warned, this only works with he right type of intern. Realize that without a clear work plan, having an intern is likely going to end up costing <em>you </em>productivity.</p>
<p>What are the pieces of an Internship Proposal? Typically, you are writing an internship proposal for a particular school. Sometimes those schools will have a desired format for your internship proposal. Obviously you will need to include all requirements laid out by the school. However, if the school doesn&#8217;t have a required format or your reaching out for interns outside of academia below are some sections to get your proposal started.</p>
<p><strong>A description of the internship and of the company - <span style="font-weight: normal;">A brief paragraph that talks about your company, what it does and how the internship will support that process. This is where you want to sell the position to prospective students. Set your internship apart from the rest by highlighting big name clients and projects, workflows, or well known professionals within your company. If your office wears rock-band t-shirts or suit coats, this is a good place to call that out as well.</span></strong></p>
<p><strong>List of goals and measurements for all interns in the program</strong> &#8211; List all of the goals for your intern. This is where you call out the requirements from the school. Be sure to include any company policies around attendance, sick time, start and stop times, etc.</p>
<p><strong>What your company will provide</strong> &#8211; Share what the intern will be able to use being part of your company. Talk about access to technology (computers, software),  work flow process, mentoring, clients and compensation if applicable.</p>
<p><strong>Requirements of the intern</strong> &#8211; List out the complete list of skills both required and desired for the position. Try to keep your required skills to a minimum after all your intern is there to learn, but they are interning for your company in your field so they should know something about what you do before coming in.</p>
<p><strong>Schedule or time commitment for the position</strong> &#8211; If you need your intern there from 9-5 3 days a week, put it here. If the school requires a minimum of 30 hours per week and you don&#8217;t have a set timeline, put that here as well. Just make sure you have the cycles available to meet whatever requirements you set up in this section.</p>
<p><strong>Measurements for success</strong> &#8211; This is the great place to highlight what you, as a company, value in the internship process and among your employees. Here is another place you can sell the position. If you value creativity and self-motivation, make those requirements in this section. Also be aware if your require any rights to the work done by an intern. You can call out those aspects in this section as well.</p>
<p>You can download my <a href="http://ryancdavidson.com/blog/wp-content/uploads/2010/05/Intership-Proposal-Sample.doc">Internship Proposal Sample</a> to help get you started</p>
<p>Once you have your proposal written up typically all you have to do is submit it to the internship coordinator at the school or post it on your local work bulletin board. I was surprised at first at how many people were applying for the internship I created. It was much less than I was anticipating, but after having 3 successful interns finish the program and go on to some great careers in the industry I&#8217;ve seen a steady increase in interest in the program.</p>
<p>Hopefully if you&#8217;re reading this you already see the benefits of creating an internship program at your company. I had an amazing internship experience that was so successful it inspired me to start my own. I hope that this information can help you learn more about what it takes to get your internship proposal written.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/05/what-does-an-internship-proposal-look-like/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash and Apple from my perspective.</title>
		<link>http://ryancdavidson.com/blog/2010/04/flash-and-apple-from-my-perspective/</link>
		<comments>http://ryancdavidson.com/blog/2010/04/flash-and-apple-from-my-perspective/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 17:23:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=157</guid>
		<description><![CDATA[Steve Jobs recently wrote a letter addressing his Thoughts on Flash for iPhone/iPod/iPad. You can read it here: http://discorax.posterous.com/steve-jobs-thoughts-on-flash-9# Following Jobs posting there were numerous responses, a great one coming from Adam Banks in a post titled Thoughts on Thoughts on Flash. After reading it, I actually had mixed feelings on an issue where I have been [...]]]></description>
			<content:encoded><![CDATA[<p>Steve Jobs recently wrote a letter addressing his <em>Thoughts on Flash</em> for iPhone/iPod/iPad. You can read it here: <a href="http://discorax.posterous.com/steve-jobs-thoughts-on-flash-9#">http://discorax.posterous.com/steve-jobs-thoughts-on-flash-9#</a></p>
<p>Following Jobs posting there were numerous responses, a great one coming from Adam Banks in a post titled <em><a href="http://www.adambanks.com/wordpress/thoughts-on-thoughts-on-flash/2506/">Thoughts on Thoughts on Flash</a>. </em>After reading it, I actually had mixed feelings on an issue where I have been pretty black and white to this point. Color me intrigued. I still feel after having used HTML5 on some small projects that as a cost effective mass market consumer ready technology, HTML5 is a ways off (2-3 years). It&#8217;ll be interesting to see how this plays out from a consumer perspective. As a developer this just means I have another technology to learn (w00t for me) and another content delivery mechanism to develop for.</p>
<p>Personally I enjoy the challenge of learning new technology, but it definitely isn&#8217;t the most efficient way to do business. I learned this when I made a switch from Flash to Silverlight. A project that I could quickly and accurately budget out resource wise became a shot in the dark. I would grossly under or over estimate the time needed because I wasn&#8217;t familiar with the technology. That&#8217;s what companies, like PBJS, will have to do if they want to adopt HTML5 in favor of proprietary, but familiar, plugins (Flash/Silverlight).  That also means that developers will have to support that choice both with time invested in learning it, and optimizing it to create the best possible user experience.</p>
<p>Content is still king. If your content generates the traffic you can easily justify any expense to make the user experience better whether that is open standards (HTML5), mobile apps (iPhone), or web plugin. It&#8217;s when you are building your business that these multiple distribution technologies can hinder progress. Delivering your content via HTML5 right now you won&#8217;t have the same rich experience that it would inside a plugin. Also, I&#8217;d be surprised if your agency has HTML5 experts on staff. Plus, they can be hard to find in the freelance market. Today the question is; do you deliver your content using a more costly (resources &amp; time) and a sub-standard user experience using the technology &#8220;of the future&#8221; or do you choose the &#8220;dead technology&#8221; that can provide a cost effective and engaging user experience?</p>
<p>Apple may be forward thinking, but not everyone has pockets as deep as Apple. I&#8217;ll continue to look into techniques using HTML5/CSS3/JavaScript but it&#8217;s likely that I&#8217;ll continue to <strong>get paid</strong> to create plugin based experiences, at least for another year. As for those clients that want to do it the Apple way, I&#8217;ll get paid double for developing using two different workflows. Looks like I&#8217;ll be busy.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/04/flash-and-apple-from-my-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP Twitter script</title>
		<link>http://ryancdavidson.com/blog/2010/04/simple-php-twitter-script/</link>
		<comments>http://ryancdavidson.com/blog/2010/04/simple-php-twitter-script/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 20:22:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programing]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=137</guid>
		<description><![CDATA[I broke out this useful little PHP Twitter script from the WordPress theme jessica-fletcher-redux, which happens to be the theme I used as a template for this blog. There were a few issues I needed to overcome in order to make this work. I&#8217;m hosting this WordPress blog on Windows Server running IIS7. By default [...]]]></description>
			<content:encoded><![CDATA[<p>I broke out this useful little PHP Twitter script from the WordPress theme <a href="http://wordpress.org/extend/themes/jessica-fletcher-redux">jessica-fletcher-redux</a>, which happens to be the theme I used as a template for this blog. There were a few issues I needed to overcome in order to make this work. I&#8217;m hosting this WordPress blog on Windows Server running IIS7. By default many PHP functions are disabled for security so you have to implement a work around.</p>
<p>The get_url_contents($url) function was added to overcome a security problem on IIS where file_get_contents() is not allowed. The other issues to is to make sure you grant write permission to PHP so it can write to your twittercache.xml file. These two changes make for a very clean twitter readout that can easily be styled using CSS.</p>
<pre class="brush: php">&lt;?php

function get_url_contents($url){
        $crl = curl_init();
        $timeout = 5;
        curl_setopt ($crl, CURLOPT_URL,$url);
        curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
        $ret = curl_exec($crl);
        curl_close($crl);
        return $ret;
}

function generatetwitter($twittername){

	$username = $twittername; // Your twitter username.
	if ($username == ""){
		$username = "discorax";
	}
	$limit = "15"; // Number of tweets to pull in.
	/* These prefixes and suffixes will display before and after the entire block of tweets. */
	$prefix = ""; // Prefix - some text you want displayed before all your tweets.
	$suffix = ""; // Suffix - some text you want displayed after all your tweets.
	$tweetprefix = "&lt;li&gt;"; // Tweet Prefix - some text you want displayed before each tweet.
	$tweetsuffix = "&lt;/li&gt; \r"; // Tweet Suffix - some text you want displayed after each tweet.
	$feed_string = "http://search.twitter.com/search.atom?q=from:" . $username . "&amp;rpp=" . $limit;  

 function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix, $username) {
		$feed = str_replace("&lt;", "&lt;", $feed);   		$feed = str_replace("&gt;", "&gt;", $feed);
		$clean = explode("&lt;content type=\"html\"&gt;", $feed);
		$link = explode("search.twitter.com,2005:", $feed);
		$amount = count($clean) - 1;
		echo $prefix;
			for ($i = 1; $i &lt;= $amount; $i++) {   				$cleaner = explode("&lt;/content&gt;", $clean[$i]);
				$linker = explode("&lt;/id&gt;", $link[$i+1]);
				$this_tweets = str_replace("&amp;apos;", "'", $cleaner[0]);
				$this_tweets = str_replace("&amp;gt;", "&gt;", $this_tweets);
				$this_tweets = preg_replace('!&lt;a href.*?&gt;!', '', $this_tweets);
				$this_tweets = preg_replace('!&lt;/a&gt;!', '', $this_tweets);
				echo $tweetprefix.'&lt;a href="http://twitter.com/'.$username.'/status/';
				echo $linker[0];
				echo '" target="_blank"&gt;'.$this_tweets.'&lt;/a&gt;';
				echo $tweetsuffix;
			}
		echo $suffix;
	}

	$twitter_cache_file = 'twittercache.xml';

	$mtime= null;

	if($mtime== null ||(time()-$mtime)&gt;(9*60)){// 9 minutes or older?
		$content=get_url_contents($feed_string);
		if(strlen($content)&gt;0){
			$cache_static=fopen($twitter_cache_file,'w+');
			fwrite($cache_static,$content);
			fclose($cache_static);
		}
	}else{
		$mtime=filemtime($twitter_cache_file);
		}

	if (!@file_get_contents($twitter_cache_file)){
		  echo __('Oops, something went wrong. Did you rename the cache folder? The cache file? You shouldn\'t have done that...', 'jfr_theme');
	}else {
		  $twitterFeed = file_get_contents($twitter_cache_file);
	}

	parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix, $username);  

}
?&gt;</pre>
<p>Setup is easy. You simply need to call the generatetwitter() function like so.</p>
<pre class="brush: php">&lt;php
echo "&lt;div&gt;";
echo "&lt;ul&gt;";
generatetwitter("discorax");
echo "&lt;/ul&gt;&lt;/div&gt;";
?&gt;</pre>
<p>When you&#8217;re uploading the files to your server make sure to include a blank twittercache.xml file in the same directory as the script. You can change this location by changing the value of the $twitter_cache_file variable (line 48 above) to a path where you keep the twittercache.xml file (make sure you grant write permission to that folder).</p>
<p>That&#8217;s it. It&#8217;s a clean little code snippit for pulling a user&#8217;s twitter feed which you can easily extend using a simple form to select your twitter account.  Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/04/simple-php-twitter-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Smart Phone delima&#8230;</title>
		<link>http://ryancdavidson.com/blog/2010/01/my-smart-phone-delima/</link>
		<comments>http://ryancdavidson.com/blog/2010/01/my-smart-phone-delima/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 21:50:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=6</guid>
		<description><![CDATA[iPhone 3Gs and HTC Tilt2 I recently received an offer from AT&#38;T; inviting me to trade-in my old Smart Phone. I would bring in my old Blackjack II and get $100 rebate on a new HTC Tilt2. From a marketing perspective this was a timely email. I am in the market for a new Smart [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ryancdavidson.com/personal/uploaded_images/iPhone3GsTilt2-785833.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="cursor: hand; width: 320px; height: 150px;" src="http://www.ryancdavidson.com/personal/uploaded_images/iPhone3GsTilt2-785827.png" border="0" alt="" /></a></p>
<p><a href="http://www.ryancdavidson.com/personal/uploaded_images/iPhone3GsTilt2-785833.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"></a><br />
<span style="font-weight: bold;"><a href="http://www.apple.com/iphone/">iPhone 3Gs</a> and <a href="http://www.htc.com/us/products/tilt-2-att#overview">HTC Tilt2</a></span></p>
<p>I recently received an <a href="http://www.htctradein.com/att/?intcid=inp091223tlt2us">offer</a> from AT&amp;T; inviting me to trade-in my old Smart Phone. I would bring in my old Blackjack II and get $100 rebate on a new HTC Tilt2.  From a marketing perspective this was a timely email. I am in the market for a new Smart Phone for two reasons my current phone (Blackjack II) is getting a little warn out AND I will be attending <a href="http://live.visitmix.com/">MIX10</a> this year in Las Vegas and I will be tweeting, blogging, networking with my mobile device so I need something that can keep up with me.</p>
<p>There are a few factors that I am considering before buying my new Smart Phone.</p>
<p><span style="font-weight: bold;">1. Price</span></p>
<p>The HTC Tilt2 is $250 w/ 2 year contract + $50 mail in rebate + $100 email discount for trading in my old Smart Phone.  Data plan is $30/mo and talk is part of my family plan.</p>
<p>The iPhone 3Gs 16 GB is $199 w/2 year contract and no rebates. Data plan is also $30/mo and talk is again part of my family plan.</p>
<p><span style="font-weight: bold;">2. Speed</span></p>
<p>I played with both devices at the store and the Tilt2 is noticeably faster than my Blackjack II but also noticeably slower than the iPhone 3Gs, which just plain smokes.  The touch interface on the Tilt2 is clunky running Windows Mobile 6.5 and the iPhone is &#8220;zippy-zoom&#8221; responsive.</p>
<p><span style="font-weight: bold;">3. Features</span></p>
<p>Applications &#8211; everyone knows about the iPhone App store. The Windows Mobile app store has a few useful apps that I currently have installed on my Blackjack II. No games to speak of on the Tilt right now.</p>
<p>Keyboard &#8211; I have an iPod Touch and I have used the screen keyboard on it. It’s clunky and makes for lots of typos, but it’s not overly horrible. The Tilt2 has a slide out QWERTY keyboard in addition to the touch screen keyboard. The slide out keyboard feels amazing. The keys are a perfect size for my fingers, the buttons are easy to locate and the device sits effortlessly in my hand while I type. This is a HUGE plus for the Tilt2.</p>
<p>Media &#8211; iPhone offers the same features of my iPod Touch (which I love except for the lack of HD Radio). An iPod is a WAY BETTER media device than a Tilt2 especially with iTunes attached to it. Plus all my music/media is already in iTunes.</p>
<p>Storage &#8211; Tilt2 has built in 512MB but expandable to 32GB with a microSD card (~$50). The iPod at my price point has 16GB and isn’t expandable unless I get the next level up which is 32GB for an additional $100.</p>
<p>Screen Size &#8211; I believe both devices have the same screen size. The iPhone UI makes better use of the space with their app layout design.</p>
<p>Battery Life &#8211; Tilt2 up to 6.5 hours iPhone up to 5 hours.</p>
<p>E-mail &#8211; iPhone and Tilt2 both have full Office Exchange support so this is a wash.</p>
<p>So I guess the final question; is $100 less (via rebate) and a much more usable slide out QWERTY keyboard on the Tilt2 worth more than the iPhone dominating in every other category?</p>
<p>On a side note, I was considering getting a <a href="http://www.zune.net/en-us/products/zunehd/default.htm">Zune HD</a> just because it can listen to HD radio. There are rumors that Windows Mobile 7 or &#8220;7&#8243; will be out later next year about the time I&#8217;m ready for another upgrade, so maybe sticking with (or suffering through) windows mobile is what I&#8217;ll do.  So many choices.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/01/my-smart-phone-delima/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MIX10: Sales pitch or career resource?</title>
		<link>http://ryancdavidson.com/blog/2010/01/mix10-sales-pitch-or-career-resource/</link>
		<comments>http://ryancdavidson.com/blog/2010/01/mix10-sales-pitch-or-career-resource/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 12:49:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MIX10]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=5</guid>
		<description><![CDATA[I believe it&#8217;s common knowledge that vendor lead conferences will involve some level of marketing, otherwise how could you justify the expense to the bean counters. MIX10 is no exception. Last year, there was a lot of hype about Blend/SketchFlow, Silverlight, Azure, and IE8. Some products lived up to the hype, others not so much. [...]]]></description>
			<content:encoded><![CDATA[<p>I believe it&#8217;s common knowledge that vendor lead conferences will involve some level of marketing, otherwise how could you justify the expense to the bean counters. <a href="http://live.visitmix.com">MIX10</a> is no exception.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ryancdavidson.com/personal/uploaded_images/Microsoft-MIX10_1263968232744-773525.png"><img style="cursor:pointer; cursor:hand;width: 243px; height: 115px;" src="http://www.ryancdavidson.com/personal/uploaded_images/Microsoft-MIX10_1263968232744-773524.png" border="0" alt="" /></a></p>
<p>Last year, there was a lot of hype about Blend/SketchFlow, Silverlight, Azure, and IE8. Some products lived up to the hype, others not so much.  Regardless, the message was pretty one sided, Microsoft has some great new tools to help the designer/developer work flow improve and deliver outstanding content to users.</p>
<p>One thing I am seeing this year both from Microsoft as a company AND in some <a href="http://live.visitmix.com/Sessions">sessions</a> is a real commitment to Open-Source and alternative technologies (JQuery, HTML5, PHP, MySQL, Ruby, Python to name a few). Seeing Microsoft include these technologies in the box with their software makes me smile. <a href="http://www.microsoft.com/web/Downloads/platform.aspx">Windows Platform Installer</a> will install and configure these technologies for you automatically. That&#8217;s a far cry from the nightmare it was to get PHP/MySQL running on an IIS server in the (recent) past. It now takes minutes. I also love seeing the <a href="http://visitmix.com/Lab">Mix lab</a> work with projects like Oxite, Gestald, and WordPress. I&#8217;m also seeing more session content revolving around these technologies. That&#8217;s a good thing.</p>
<p>I attended an event in Seattle put on by <a href="http://www.interactseattle.org/?p=283">Interact Seattle</a> a few months ago where two software evangelists Adam Kinney (Microsoft) and Ryan Stewart (Adobe) showcased their respective products Blend &#038; Flash Catalyst side by side. This session created an amazingly interesting dynamic. It wasn&#8217;t about which features were better, it was about how tools could help execute and ultimately realize ideas. There was some great dialog during and after the presentations.</p>
<p>Seeing Open-Source technologies being talked about and used at MIX is a great step forward as far as breaking out of the &#8220;Marketing Marketing blah blah&#8221; of vendor conferences. I am hopeful that today, when the <a href="http://live.visitmix.com/opencall">Open Call sessions</a> are announced more of these alternative technologies will be showcased.  </p>
<p>Finally, the part of MIX10 I&#8217;m looking forward to the most is getting a chance to talk with other industry professionals, most of which use Microsoft technologies, but not exclusively. It’s those conversations that I find the real value of a conference regardless of who is footing the bill.</p>
<p>See you in Vegas!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2010/01/mix10-sales-pitch-or-career-resource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Session that needs to be shared &#8211; from Devdays Seattle</title>
		<link>http://ryancdavidson.com/blog/2009/10/jquery-session-that-needs-to-be-shared-from-devdays-seattle/</link>
		<comments>http://ryancdavidson.com/blog/2009/10/jquery-session-that-needs-to-be-shared-from-devdays-seattle/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 08:37:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[DevDays]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=7</guid>
		<description><![CDATA[Yesterday I attended the Stack Overflow Dev Days Seattle conference. First of all, a $99 conference locally that had this amazing collection of topics made this a must attend. Honestly, though, this jQuery presentation was worth the $99 by itself. Cody Lindley [@codylindley] gave a great intro and exploration of what jQuery is all about! [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I attended the <a href="http://stackoverflow.carsonified.com/events/seattle/">Stack Overflow Dev Days Seattle </a>conference. First of all, a $99 conference locally that had this amazing collection of topics made this a <span style="font-style: italic;">must attend.</span> Honestly, though, this jQuery presentation was worth the $99 by itself.</p>
<p>Cody Lindley [<a href="http://twitter.com/codylindley">@codylindley</a>] gave a great intro and exploration of what <a href="http://jquery.com/">jQuery</a> is all about!</p>
<p>Sure there was lots of great ideas for how to use this technology bubbling in my head after Cody introduced feature after feature of jQuery. The best part was his &#8216;How to build your own jQuery plug-in in 6 Steps&#8217; starting on slide 82. I can&#8217;t tell you how many times I&#8217;ve wanted to extend a library but the documentation doesn&#8217;t clearly outline best practices for building new classes or plug-ins. It&#8217;s a lot of trial and error, not to mention headaches. This presentation was so valuable I just have to share it!</p>
<div style="width:425px;text-align:left" id="__ss_2320438"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/codylindley/devdays-seattle-jquery-intro-for-developers" title="Devdays Seattle jQuery Intro for Developers">Devdays Seattle jQuery Intro for Developers</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquery-091022094816-phpapp01&#038;stripped_title=devdays-seattle-jquery-intro-for-developers" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquery-091022094816-phpapp01&#038;stripped_title=devdays-seattle-jquery-intro-for-developers" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/codylindley">codylindley</a>.</div>
</div>
<p>You can also check out Cody&#8217;s PDF book <a href="http://jqueryenlightenment.com/">jQuery Enlightenment</a> for just $15. It is a collection of useful code and samples which can rapidly get you up and running with all the power of jQuery.</p>
<p><a href="http://jquery.com/">jQuery: The Write Less, Do More JavaScript Libary!</a></p>
<p>P.S. Microsoft was at Dev Days Seattle giving FREE RAM upgrades to every computer that wasn&#8217;t already maxed out. Unfortunately, my laptop was maxed so I couldn&#8217;t take advantage, but what a cool way to engage this audience.</p>
<p>P.P.S. You have to check out this video of the guys who brought you <a href="http://photosynth.net/">Photosynth</a>. <a href="http://www.cs.washington.edu/homes/seitz/">Steve Seitz</a> talked about how their team has taken the ideas behind Photosynth further and this technology is seriously impressive. Their goal: Re-Build Rome in a day! <a href="http://grail.cs.washington.edu/rome/">http://grail.cs.washington.edu/rome/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2009/10/jquery-session-that-needs-to-be-shared-from-devdays-seattle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What TweetStats says about you.</title>
		<link>http://ryancdavidson.com/blog/2009/10/what-tweetstats-says-about-you/</link>
		<comments>http://ryancdavidson.com/blog/2009/10/what-tweetstats-says-about-you/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 15:08:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=8</guid>
		<description><![CDATA[Have you visited Tweetstats.com yet? Well I guess the first question would be have you visited Twitter.com and set up your Twitter account? If you haven&#8217;t you can stop reading now. If you have, and are curious about your Twitter usage, take a trip to Tweetstats and enter your account name. The service will go [...]]]></description>
			<content:encoded><![CDATA[<p>Have you visited <a href="http://tweetstats.com/">Tweetstats.com</a> yet? Well I guess the first question would be have you visited <a href="http://twitter.com">Twitter.com</a> and set up your Twitter account? If you haven&#8217;t you can stop reading now. </p>
<p>If you have, and are curious about your Twitter usage, take a trip to Tweetstats and enter your account name. The service will go and fetch all tweets and build some fun Flash graphs to illustrate how you use Twitter. For instance you&#8217;ll notice that March of this year was a particularly busy tweeting month of me. I was attending <a href="http://live.visitmix.com/">MIX</a> and letting everyone know all the cool things I was learning. You&#8217;ll also notice that I pretty much only tweet during the day. Mostly in the morning as I review all the cool stuff from the previous day.</p>
<p>Curious, here are <a href="http://tweetstats.com/graphs/discorax">my results</a>:</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ryancdavidson.com/personal/uploaded_images/TweetStats-797756.jpg"><img style="cursor:pointer; cursor:hand;width: 182px; height: 320px;" src="http://www.ryancdavidson.com/personal/uploaded_images/TweetStats-797751.jpg" border="0" alt="" /></a></p>
<p>There is also my TweetCloud featuring the words I tweet the most.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ryancdavidson.com/personal/uploaded_images/TweetCloud-743548.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 122px;" src="http://www.ryancdavidson.com/personal/uploaded_images/TweetCloud-743543.png" border="0" alt="" /></a></p>
<p>any my HashCloud featuring the words I hash the most.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ryancdavidson.com/personal/uploaded_images/HashCloud-798085.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 82px;" src="http://www.ryancdavidson.com/personal/uploaded_images/HashCloud-798082.png" border="0" alt="" /></a></p>
<p>My TweetStats give a glimpse into how I use Twitter. What will TweetStats say about you? Also, if all this Twitter Speak hash tags and @mentions is confusing you, check out <a href="http://www.ctoverdrive.ca/article/649/twitter-speak-a-beginners-guide">Twitter Speak &#8211; A Beginners Guide</a> to learn the basics! Happy Tweeting!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2009/10/what-tweetstats-says-about-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What WebsiteSpark can do for you!</title>
		<link>http://ryancdavidson.com/blog/2009/10/what-websitespark-can-do-for-you/</link>
		<comments>http://ryancdavidson.com/blog/2009/10/what-websitespark-can-do-for-you/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 09:15:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=10</guid>
		<description><![CDATA[Microsoft recently announced a program called WebsiteSpark. You can read more about it on Scott Guthrie&#8217;s blog. It&#8217;s a variation on their Spark program which is intended to give people that have an idea for a business or web site an opportunity to use Microsoft technologies for free to develop and deploy their ideas for [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft recently announced a program called <a href="http://www.microsoft.com/web/websitespark/">WebsiteSpark</a>. You can read more about it on <a href="http://weblogs.asp.net/scottgu/archive/2009/09/24/announcing-the-websitespark-program.aspx">Scott Guthrie&#8217;s blog</a>. It&#8217;s a variation on their Spark program which is intended to give people that have an idea for a business or web site an opportunity to use Microsoft technologies for free to develop and deploy their ideas for 3 years.</p>
<p>Personally, I think it is a brilliant program that finally shows a desire from Microsoft to embrace a culture of open-source without having to sacrifice their business model of making software to <span style="font-style:italic;">sell</span> to people. If you let someone use your technologies for free, support them making something amazing with it and add that to your portfolio of successful projects, it just fosters positive connection to the community that ultimately will drive success in the future.</p>
<p>Microsoft products can be extremely pricey. A windows server license alone can cost near $1000 per processor. With this program you get 4 licenses for free for 3 years. Talk about offsetting the start up costs. You can have a solid, supported, industry standard technology in place while you build your business.</p>
<p>The <a href="http://www.microsoft.com/web/websitespark/">WebsiteSpark program</a> joins the other two successful &#8220;Spark&#8221; programs previously launched &#8211; <a href="http://www.microsoft.com/bizspark/">BizSpark</a> for startups, and <a href="https://www.dreamspark.com/default.aspx">DreamSpark</a> for students.</p>
<p>While I was in school back in 2005, the only technologies we learned and used were open-source because we couldn&#8217;t <span style="font-style:italic;">afford</span> to use anything Microsoft. I can only imagine how many fun, off the wall, projects I could have created in school with access to some of the products available in these programs.</p>
<p>I&#8217;m sure a lot of this sounds like I&#8217;m spitting <a href="http://www.ryancdavidson.com/personal/files/kool-aid.jpg">cool-aid </a>out all over the place, but I honestly believe that this program is a good thing for everyone. Microsoft got this one right, and I&#8217;m giving credit where credit is due. </p>
<p>Now go out and bring your ideas to life!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2009/10/what-websitespark-can-do-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting and using the pixels of your Visual in WPF</title>
		<link>http://ryancdavidson.com/blog/2009/09/getting-and-using-the-pixels-of-your-visual-in-wpf/</link>
		<comments>http://ryancdavidson.com/blog/2009/09/getting-and-using-the-pixels-of-your-visual-in-wpf/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 13:30:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=11</guid>
		<description><![CDATA[Have you ever wanted to get the Bitmap Data (pixels) of a Visual (Canvas, Grid, etc) in WPF or Silverlight from memory and without having to add it to the root visual. After doing a lot of trial and error here is a quick piece of code and a sample project that can help you [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to get the Bitmap Data (pixels) of a Visual (Canvas, Grid, etc) in WPF or Silverlight from memory and without having to add it to the root visual. After doing a lot of trial and error here is a quick piece of code and a sample project that can help you accomplish exactly that.</p>
<p>There are plenty of cool ways to extend this project including some cool transition and other code based animations. Just let your imagination go wild!</p>
<p>First, create a new WPF Application in Visual Studio or <a href="http://www.ryancdavidson.com/personal/files/BitmapFromVisualSample.zip">[download a sample project]</a>. In your Window1.xaml give the Grid an x:Name value. You&#8217;ll use this to add your elements later on.</p>
<pre class="brush: c-sharp" >&lt;br  /&gt;&lt;grid x:Name="VisualRoot"&gt;&lt;/grid&gt;&lt;br /&gt;</pre>
<p>Now lets add a new Page to our project. We&#8217;re going to alter the Page to extend a Canvas rather than a Page for no other reason then when I&#8217;m creating animations I prefer to work with a Canvas. We are going to put some visuals onto our canvas. In the sample it&#8217;s a blue square with a red circle next to it and a little bit of text below it. It could be any UIElement including another Canvas/Grid, Images, Text anything.</p>
<p>In our Window1.xaml code behind we&#8217;re going to create an instance of our Canvas1 and call the methods to have WPF Measure, Arrange, and UpdateLayout in memory. We need to call these methods in order for WPF to figure out where all the pixels are positioned in our visual to return accurate Bitmap Data. These methods are called automatically when you add a Visual to WPF using the Visual.Children.Add() method.</p>
<p>The CreateBitmapSourceFromVisual function was taken from a project on CodePlex, unfortunately I can&#8217;t recall the link. I&#8217;ll add it here if I run across it again. That function takes a Visual and returns a BitmapSource object with the pixel data. It automatically updates the dots per inch (DPI) to 96, which is required for WPF to render properly).</p>
<p>Here is the code behind from our root Window.</p>
<pre class="brush: c-sharp" >using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BitmapFromVisualSample
{
    ///
<summary>
    /// Interaction logic for Window1.xaml
    /// </summary>

    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
            Canvas1 myVisualElement = new Canvas1();
            myVisualElement.Measure(new System.Windows.Size(0, 0));
            myVisualElement.Arrange(new Rect(new System.Windows.Size(0, 0)));
            myVisualElement.UpdateLayout();
            // Note the myVisualElement is never added

            // Use myVisualElement to get our Bitmap Source Data.
            BitmapSource myVisualElementBitmapData = CreateBitmapSourceFromVisual(300, 500, myVisualElement, false);
            // Create an Image for your Bitmap Source
            Image myImage = new Image();
            // use our Bitmap Data
            myImage.Source = myVisualElementBitmapData;

            // Add our Image to the Grid
            VisualRoot.Children.Add(myImage);
        }
        public BitmapSource CreateBitmapSourceFromVisual(Double width, Double height, Visual visualToRender, Boolean undoTransformation)
        {
            if (visualToRender == null)
            {
                return null;
            }
            RenderTargetBitmap bmp = new RenderTargetBitmap(
                                            (Int32)Math.Ceiling(width),
                                            (Int32)Math.Ceiling(height),
                                            96,
                                            96,
                                            PixelFormats.Pbgra32);
            if (undoTransformation)
            {
                DrawingVisual dv = new DrawingVisual();
                using (DrawingContext dc = dv.RenderOpen())
                {
                    VisualBrush vb = new VisualBrush(visualToRender);
                    System.Windows.Point myPoint = new System.Windows.Point();
                    dc.DrawRectangle(vb, null, new Rect(myPoint, new System.Windows.Size(width, height)));
                }
                bmp.Render(dv);
            }
            else
            {
                bmp.Render(visualToRender);
            }
            return bmp;

        }
    }
}
</pre>
<p><a href="http://www.ryancdavidson.com/personal/uploaded_images/BitmapFromVisualSample-742145.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="cursor: hand; width: 300px; height: 300px;" src="http://www.ryancdavidson.com/personal/uploaded_images/BitmapFromVisualSample-742144.png" border="0" alt="" /></a></p>
<p>You can run the sample project and you will see the visual we created in Canvas1. We used the BitmapSource object of the Canvas1 as the Source of our Image. Note: we never added Canvas1 to the root visual, we simply created it in the code behind and retrieved the pixel data from that visual to use as on our Image. I leave it to you to play with this technology to create cool WPF/Silverlight animations.</p>
<p><a href="http://www.ryancdavidson.com/personal/files/BitmapFromVisualSample.zip">[Download Source Code]</a> as Visual Studio Project.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2009/09/getting-and-using-the-pixels-of-your-visual-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mother&#8217;s Day Collage</title>
		<link>http://ryancdavidson.com/blog/2009/07/mothers-day-collage/</link>
		<comments>http://ryancdavidson.com/blog/2009/07/mothers-day-collage/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:05:00 +0000</pubDate>
		<dc:creator>discorax</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryancdavidson.com/blog/?p=12</guid>
		<description><![CDATA[Mother&#8217;s Day Collage, originally uploaded by discorax.]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;"><a href="http://www.flickr.com/photos/discorax/3535291822/" title="photo sharing"><img src="http://farm4.static.flickr.com/3382/3535291822_3da33b64bf.jpg" style="border: solid 2px #000000;" alt="" /></a><br /><span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/discorax/3535291822/">Mother&#8217;s Day Collage</a>, originally uploaded by <a href="http://www.flickr.com/people/discorax/">discorax</a>.</span></div></p>
]]></content:encoded>
			<wfw:commentRss>http://ryancdavidson.com/blog/2009/07/mothers-day-collage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

