<?xml version="1.0" encoding="utf-8" ?><rss version="2.0">
	<channel>
		<title>Edward's Web Developer Site: Most Recent Items</title>
		<description>Keeps you up to date on the most recent items published to this site.</description>
		<link>http://www.tanguay.info/web/rss/index.php</link>
		<item>
			<title>PHP CODE EXAMPLE: How to call an unknown function on an unknown class with unknown parameters</title>
			<description>The call_user_func_array function can help you build some pretty flexible framework code in PHP, here's the syntax to call a function on an existing object.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=398</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=398</guid>
			<pubDate>28 Nov 2010 11:26:18 GMT</pubDate>
		</item>
		<item>
			<title>HOWTO: How to setup JQuery intellisense in Microsoft Visual Web Developer 2010 Express</title>
			<description>If you are working on Windows, Visual Web Developer 2010 Express has very nice intellisense for Jquery, here's how.</description>
			<link>http://www.tanguay.info/web/index.php?pg=howtos&amp;id=24</link>
			<guid>http://www.tanguay.info/web/index.php?pg=howtos&amp;id=24</guid>
			<pubDate>14 Nov 2010 21:12:53 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: Simple menu site with jQuery AJAX</title>
			<description>Simple example of using jQuery's $.get() to make a quick responding site that shows text in a display box based on menu selection.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=397</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=397</guid>
			<pubDate>14 Nov 2010 14:52:10 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE EXAMPLE: A PHP function which returns the most frequently occuring item</title>
			<description>This function shows how you can get the most frequently occurring item out of an array using array_count_values() and arsort().</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=396</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=396</guid>
			<pubDate>29 Oct 2010 09:03:12 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE EXAMPLE: How to create a singleton in PHP</title>
			<description>This example shows the syntax of creating a singleton in PHP. Note that the instance of the class is retrieved twice but its internal variable was set only once which shows that the same instance of the class is being retrieved and not being created again each time it is needed. Use this for any kind of global scope you need in your application, especially classes which have expensive initializations such as retrieving and parsing large amounts of data to be used by various classes in your application.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=395</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=395</guid>
			<pubDate>03 Oct 2010 07:50:33 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: Extension method to sort a generic collection of objects</title>
			<description>This example shows a method which randomizes any generic collection you give it. It is based on the <a target="_blank" href="http://en.wikipedia.org/wiki/Fisher-Yates_shuffle">Fisher Yates shuffle</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=394</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=394</guid>
			<pubDate>07 Sep 2010 21:54:13 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: A simple class that represents a matching quiz item</title>
			<description>This is a class that encapsulates matching items which can be displayed as a test with questions and answers and then shows the answer key.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=393</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=393</guid>
			<pubDate>07 Sep 2010 21:53:31 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: Extension method for checking regex in one line</title>
			<description>This simple extension method allows you to check strings against regular expressions in one line.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=392</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=392</guid>
			<pubDate>02 Sep 2010 02:59:37 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use a Dictionary&lt;&gt; with struct key to save a dynamic matrix of objects</title>
			<description>The following is an example of how you can save both a fixed matrix of objects and a dynamic matrix of objects (size determined at runtime) using first a multi-dimensional array and then a generic dictionary with a struct key. In both examples you can pick the object out of the map with the x/y coordinates.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=391</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=391</guid>
			<pubDate>22 Aug 2010 21:06:49 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: A simple jquery search machine for a web page</title>
			<description>This example shows how easy it is with JQuery to put a little form on the page that allows a user to search for a keyword which highlights that keyword on the page.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=390</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=390</guid>
			<pubDate>22 Aug 2010 21:05:22 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Wrapper class to simplify the creation of Excel files in C# 4.0</title>
			<description>This class uses of the improved COM Interop in C# 4.0 and makes it simple to create Excel files from data in your application. Note that in your visual studio project you have to add a reference to (in COM tab) the Microsoft Excel 14.0 Object Library.&nbsp;&nbsp;&nbsp;&nbsp;</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=389</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=389</guid>
			<pubDate>20 Jul 2010 02:27:40 GMT</pubDate>
		</item>
		<item>
			<title>JAVASCRIPT CODE EXAMPLE: How to make clickable flashcards in plain javascript for your mobile phone</title>
			<description>I realized that my Sony Ericsson C510 phone doesn't support JQuery (<a target="_blank" href="http://en.wikipedia.org/wiki/NetFront">NetFront</a> browser) so had to recreate the flashcards in plain Javascript, thanks to <a target="_blank" href="http://stackoverflow.com/questions/3190980/how-would-i-convert-this-jquery-code-into-to-standard-javascript/3191037#3191037">bobince via stackoverflow</a> it works nicely.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=388</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=388</guid>
			<pubDate>07 Jul 2010 01:40:52 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: Simple example of javascript which loads jquery locally</title>
			<description>Just download the latest version from <a target="_blank" href="http://jquery.com">jquery.com</a> (click the button and copy/paste the text into e.g. the file /jquery-1.4.2.min.js).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=387</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=387</guid>
			<pubDate>06 Jul 2010 23:33:59 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to stop regular expression greediness</title>
			<description>This example shows how you can tell a regular expression to only get the text before the first colon, thanks <a target="_blank" href="http://stackoverflow.com/questions/3180896/how-can-i-change-this-regular-expression-so-grab-the-text-before-the-first-colon">Matthew and Jason</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=386</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=386</guid>
			<pubDate>06 Jul 2010 03:42:18 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use a generic dictionary to total enum values</title>
			<description>This code example shows how you can use a generic dictionary to add up the total of each kind of item in an enum collection. It is flexible so that if you add an enum value, it automatically is totaled as well. See <a target="_blank" href="http://davefancher.com/2010/10/10/linqed-up-part-4/">Dave Fancher's article</a> showing how this approach is actually faster than various approaches with LINQ.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=385</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=385</guid>
			<pubDate>02 Jul 2010 06:04:35 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: Generic method to case-insensitively convert a string to any enum</title>
			<description>This generic static method takes an enum type and a string and converts it, ignoring case, and if the string is invalid, it will return the first (default) item in the enum collection. I'm returning the default value in a catch since IsDefined doesn't have an ignoreCase parameter, but <a target="_blank" href="http://stackoverflow.com/questions/3157936/how-can-i-test-if-an-enum-is-defined-or-not-whilst-ignoring-case">there are more elegant ways to do this</a>, especially in C#4 .</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=384</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=384</guid>
			<pubDate>02 Jul 2010 06:04:33 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: How to create a TextBlock that has various font formatting in code behind</title>
			<description>When you create a TextBlock, you can assign it a text and then assign formatting only to the whole text, e.g. the whole TextBlock can be one color. If you want different parts of the TextBlock.Text to be various colors and have various formatting (e.g. italic/bold), you can create as many Run elements as you need and add them to the TextBlock with Inlines collection.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=383</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=383</guid>
			<pubDate>30 Jun 2010 18:53:11 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to encode binary files to text files and back to binary again</title>
			<description>This shows you how you can take e.g. png, jpg, mp3 files and convert them to text, for example if you want to transport them via plain text, and then on the other site turn them back into their original binary format.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=382</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=382</guid>
			<pubDate>30 Jun 2010 18:46:57 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use a custom parameter struct to pass any number of variables to constructors of similar classes.</title>
			<description>This shows a common pattern to pass in a collection of unlike typed variables into constructors of similar classes, the inherited class of which saves the common variables locally while each asy then unpacks each of its specific variables. Putting all variables in a custom struct like this enables you to avoid the runtime recasting of the variables that a Dictionary&lt;string,object&gt; solution would cause.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=381</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=381</guid>
			<pubDate>26 Jun 2010 13:22:38 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: How to make a class that renders an interactive FrameworkElement and interacts with the View</title>
			<description>This example shows a class (Flashcard) which you can instantiate as many times as you want, rendering each as a StackPanel which you attach to another StackPanel, all of the interactivity in each control remains intact (showing the back of the flashcard on mouseover). Each flashcard also has an event which the main View is able to react to (counting how many times a flashcard is turned over).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=380</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=380</guid>
			<pubDate>15 Jun 2010 22:49:25 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to set a nullable type to null in a ternary operator</title>
			<description>If you try to set e.g. a nullable int to null in a ternary operator, you get the error &quot;there is no implicit conversion between null and int&quot;. Instead of assigning it to &quot;null&quot; assign it to default(int?). You can <a target="_blank" href="http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-wont-this-work">read more about why here</a>. Here is an example with Guid.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=379</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=379</guid>
			<pubDate>15 Jun 2010 22:39:49 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to override events in inherited classes</title>
			<description>This shows you how to have each inheriting class handle its own events and sent its own object back up to the subscriber.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=378</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=378</guid>
			<pubDate>11 Jun 2010 03:44:28 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to strip off e.g. &quot;note:&quot; and &quot;firstName: &quot; from the left of a string using regex</title>
			<description>This codes shows how you can use regular expressions to strip off a &quot;label + colon&quot; from a line e.g. if you are parsing through lines labels with codes on the left.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=377</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=377</guid>
			<pubDate>01 Jun 2010 22:09:34 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to create and subscribe to custom events using EventHandler</title>
			<description>This example shows the syntax of creating events on custom objects and then subscribing to those events. It is a simpler example than <a target="_blank" href="http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=279">this example which used delegate</a>, thanks <a target="_blank" href="http://stackoverflow.com/questions/2820054/is-there-a-more-abbreviated-way-to-define-a-custom-event-in-c3-and-c4/2820075">Konrad</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=376</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=376</guid>
			<pubDate>12 May 2010 22:02:40 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: Code base for asynchronously loading and caching dependent data in a Silverlight app</title>
			<description>This code blackboxes the loading of various dependent text files and images for a Silverlight Application. You create DataLoaders which load as many text and image sources as you need. Each DataLoader has a OnLoadingComplete event which enables you to load dependent data, for instance, you can load a text file with a list of image file names in it, when that is finished loading, it will then load each image. All text and images are stored in IsolatedStorage and are held until they are refreshed. These text and images are accesses in one line by variable name via the DataManager, so after everything is loaded asynchronously, you can access all texts and images immediately via the DataManager. There is also an example of loading specific data only when needed for e.g. larged images which do not necessarily need to be loaded at the beginning. However, once loaded, it will remain in memory until deleted or refreshed. Also if a text or image does not exist, it will not generate an error but instead load a default image and empty string into the IsolatedStorage for that variable. The download is a Silverlight 3 project.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=375</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=375</guid>
			<pubDate>05 May 2010 00:46:07 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE EXAMPLE: Function to trim the preceding and trailing blank lines off an array</title>
			<description>This function uses array_slice to remove the blank lines off the beginning and end of an array, but leaves any internal blank lines. Thanks <a target="_blank" href="http://stackoverflow.com/questions/2753179/what-is-the-fastest-way-to-trim-blank-lines-from-beginning-and-end-of-array">outis</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=374</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=374</guid>
			<pubDate>02 May 2010 12:16:12 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: How to load and display the contents of a text file with AJAX/Jquery</title>
			<description>This example shows allows the user to click a button which loads and displays the contents of a text file (via proxy on the same domain).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=373</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=373</guid>
			<pubDate>02 May 2010 06:45:10 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE EXAMPLE: How to use fopen() to create a proxy site to read any website content into AJAX</title>
			<description>If your provider allows fopen() on your hosting server, here is a script that allows you to get data from any website into AJAX, Silverlight, Flash, etc. If your provider doesn't support fopen() you can try this <a target="_blank" href="http://tanguay.info/web/index.php?pg=codeExamples&amp;id=366">curl version</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=372</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=372</guid>
			<pubDate>02 May 2010 05:28:25 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: Code base for loading and caching external data into a silverlight app</title>
			<description>This code is a nice start if you need a one-page silverlight control or application which loads text asynchronously and then caches it in IsolatedStorage so that the next time the user visits, the data is there. There is a clear cache button so that the data gets loaded again.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=371</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=371</guid>
			<pubDate>30 Apr 2010 04:10:34 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: An UpdateSourceTrigger workaround for Silverlight</title>
			<description>Although WPF has UpdateSourceTrigger and Silverlight doesn't, you can emulate this functionality with this <a target="_blank" href="http://www.thomasclaudiushuber.com/blog/2009/07/17/here-it-is-the-updatesourcetrigger-for-propertychanged-in-silverlight/">workaround from Thomas Huber</a>. When you type in the TextBox, your text is immediately appears transformed in the TextBlock below.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=370</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=370</guid>
			<pubDate>18 Apr 2010 01:47:48 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: Silverlight layout with click-in info panel</title>
			<description>This is a Silverlight layout with top, bottom, and main area, plus a tall button on the right which snaps in an info panel. All scrolling is taken care of in both the main and info areas so you can add as many controls as you want and the user will be able to scroll to it if it is not visible. All pertinent sizes are easy to change by editing the six main properties in MainPage().</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=369</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=369</guid>
			<pubDate>01 Apr 2010 18:51:38 GMT</pubDate>
		</item>
		<item>
			<title>SILVERLIGHT CODE EXAMPLE: How to get querystring variables and change HTML elements from Silverlight.</title>
			<description>This example shows you how to change the color of the HTML body element and read in a querystring variable from the brower. See <a target="_blank" href="http://www.silverlightshow.net/items/Interaction-between-Silverlight-and-HTM.aspx">this page</a> for a quick description of how to do the rest including reading and manipulating individual elements and calling javascript functions.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=368</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=368</guid>
			<pubDate>01 Apr 2010 18:25:23 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: XAML and code for a basic chat window in WPF</title>
			<description>This is a chat window to get you going, both the button and the ENTER key work, and the scroll bars appear only when necessary.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=367</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=367</guid>
			<pubDate>27 Mar 2010 17:04:59 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to consume text from any Google Document, RSS feed, or Twitter feed in your Silverlight application</title>
			<description>If you try to read data via WebClient into a Silverlight application, you will get a security error unless the site from which you are reading text has a clientaccesspolicy.xml file which allows you to read the text. This seriously limits the kinds of data Silverlight application can access on the web: no public RSS feeds, no Twitter feeds, etc. So I wrote this proxy script and put it up on my PHP site, and now can get text into Silverlight from any site on the Internet via this proxy by passing the url I want to access as a parameter like this: http://www.mysite.com/getwebdata.php?url=http://docs.google.com/Doc?id=dc7gj86r_1sdc4trnd2. This allows you to create Silverlight applications whose content can be controlled by non-technical administrators simply tweeting or updating a Google Docs document, etc.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=366</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=366</guid>
			<pubDate>21 Mar 2010 08:58:33 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to overlay one image on top of another in code behind</title>
			<description>The trick to easily overlaying images in code is to just put them all in a grid and adjust their margins.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=365</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=365</guid>
			<pubDate>20 Mar 2010 04:25:28 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to get the mouse-click and mouseover coordinates from an image</title>
			<description>This example shows how easy it is to respond to what the mouse is doing on top of an image: in the event handlers you get the coordinates of the mouse when clicked or moved. Note that this works in Silverlight as well, you just have to use ContentControl_MouseLeftButtonDown.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=364</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=364</guid>
			<pubDate>16 Mar 2010 21:55:02 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use OrderedDictionary to lookup items by string key or integer index</title>
			<description>I had created a Dictionary with which I could lookup items by their string key but then I also <a target="_blank" href="http://stackoverflow.com/questions/2402304/how-to-refer-to-items-in-dictionarystring-string-by-integer-index">needed to lookup the items by their integer index as well</a>. This unfornately doesn't work with Dictionary since it is not an ordered list, but the non-generic OrderedDictionary worked nicely in my case, I just had to do the appropriate casting. You might also check at the above link for more ideas, e.g. inherit from KeyedCollection&lt;TKey, TItem&gt;.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=363</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=363</guid>
			<pubDate>16 Mar 2010 21:52:52 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use NameValueCollection for a collection of items with both single and multiple keys</title>
			<description>I needed a <a target="_blank" href="http://stackoverflow.com/questions/2393638/what-is-the-best-collection-type-to-easily-lookup-values-with-multiple-identical">collection type to easily lookup values with multiple, identical keys</a> and since I was just storing strings, the non-generic NameValueCollection was exactly what I needed, here's an example of what it can do. This example assumes you know which keys are singular and multiple in your collection. Note that if you use .Get() on a multiple key, it will nicely return a comma-delimited string.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=362</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=362</guid>
			<pubDate>07 Mar 2010 04:50:37 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to use TryGetValue with Dictionary to test and get value if exists in one statement</title>
			<description>The TryGetValue method of Dictionary allows you to test if a key exists in the dictionary and if so, return the value, which makes for code that reads nicely.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=361</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=361</guid>
			<pubDate>06 Mar 2010 03:45:47 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to overload constructors with the &quot;this&quot; keyword</title>
			<description>Just as you can use the &quot;base&quot; keyword to call constructors in inherited classes, you can use the &quot;this&quot; keyword to overload constructors in the same class.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=360</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=360</guid>
			<pubDate>04 Mar 2010 21:50:26 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a CSS layout for icon-left, text-right with floating divs</title>
			<description>One of the only ways to get an image-left / text-right layout to work in HTML when you have <b>various-sized images</b> is to <a target="_blank" href="http://stackoverflow.com/questions/2351125/how-do-i-convert-this-html-table-layout-solution-to-floating-div-solution/2351178">use HTML tables</a>. However, if you are <b>generating your code </b> with a script and you <b>know the width</b> of your images (or if all of your images are the same width), you can use this <b>floating-div solution</b>. Note that in this example I have to use<b> in-line styles</b> to indicate the width of each icon image, but if you need to <b>avoid tables</b>, this is nice solution.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=359</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=359</guid>
			<pubDate>28 Feb 2010 15:22:33 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to convert a tabbed outline text to a XAML TreeView</title>
			<description>This example shows how an outline text created with tabs can be converted XAML tree view.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=358</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=358</guid>
			<pubDate>25 Feb 2010 03:03:51 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Extension method to remove preceding and succeeding blank lines on a List&lt;string&gt;</title>
			<description>This extension method TrimBlankLines() does to a List&lt;string&gt; what Trim() does to string.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=357</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=357</guid>
			<pubDate>25 Feb 2010 03:02:48 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to Create a TreeView with HierarchicalDataTemplate based on a collection of objects with collections</title>
			<description>This example gives you the basics to display an object collection that has objects with collections of those objects recursively down to any level.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=356</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=356</guid>
			<pubDate>24 Feb 2010 05:04:10 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to check for first and last items in a foreach loop</title>
			<description>This was one of the the <a target="_blank" href="http://stackoverflow.com/questions/2307945/is-there-a-less-verbose-way-of-knowing-if-i-am-on-the-first-pass-through-a-foreac">many interesing ideas for avoiding index counter messiness in foreach loops</a>. This reads nicely for short lists, e.g. dropdown/radiobutton collections, etc. but it is <b>not resourceful for large lists</b> (because .last() iterates through the collection) and it <b>assumes all values are unique</b>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=355</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=355</guid>
			<pubDate>22 Feb 2010 22:03:40 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to format text in a WPF application (bold, italic, colored, hyperlinks, etc.)</title>
			<description>I needed an easy way to display text with simple formatting (bold, italic, colors, hyperlinks) in a WPF application. This example gives you the basis to create custom markup that is converted into a FlowDocument. It is easy to create other codes which represent other formatting that you need for your application, copy and add a block in the switch statement.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=354</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=354</guid>
			<pubDate>21 Feb 2010 10:00:09 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Two ways to set focus in a programmatically created textbox</title>
			<description>This example shows you two ways to set focus for a programmatically created TextBox. If you need to set focus WHILE you are adding the TextBoxes for some reason, use the hack (thanks to <a target="_blank" href="http://apocryph.org/2006/09/10/wtf_is_wrong_with_wpf_focus">Adam Nelson</a>), otherwise, if you can, wait till AFTER you have set the ContentControl and then set focus via the parent of the TextBoxes.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=353</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=353</guid>
			<pubDate>14 Feb 2010 10:57:42 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a scrollable StackPanel that changes its content but keeps scroll position</title>
			<description>This example shows how you can full rebuild and replace a StackPanel but first save the position of the scrollbar before and setting it back to that position afterward, to the user it looks as if only the content changed.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=352</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=352</guid>
			<pubDate>14 Feb 2010 10:57:15 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Custom ChooserGroup control which allows user to change selection kind from dropdown to radiobuttons</title>
			<description>This is an example of how to make a control that abstracts the dropdown and radiobutton controls away so that you can make a &quot;ChooserGroup&quot; and then render it as a: (1) dropdown, (2) radio buttons vertical, or (3) radio buttons horizontal. This control has a custom OnChoiceItemChanged event which even abstracts the handling of a changed item no matter what type of control has been rendered.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=351</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=351</guid>
			<pubDate>06 Feb 2010 05:05:54 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: Base code to create a simple regex unit tester</title>
			<description>Here's some base code I use when I've written a regex and need to test it with positive and negative cases as I tweak it.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=350</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=350</guid>
			<pubDate>06 Feb 2010 05:04:19 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to use a WPF FileDialog to read in a text file</title>
			<description>This example shows how you can allow the user to click on a button and choose a text file to view the contents of the file in a scrollable box on the screen.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=349</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=349</guid>
			<pubDate>06 Feb 2010 05:03:43 GMT</pubDate>
		</item>
		<item>
			<title>XAML CODE EXAMPLE: How to stop a XAML button from expanding to the size of its parent width</title>
			<description>A trick to get a XAML button to expand only to the size of its text content is to wrap it with a StackPanel that has a HorizontalAlignment=&quot;Left&quot;.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=348</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=348</guid>
			<pubDate>06 Feb 2010 05:02:23 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to pass an event handler as a parameter</title>
			<description>This example shows how you can pass an event handler into a method (here a constructor of a class) so that method or class can attach that method handler to controls, thus making &quot;how to deal with a click event&quot; something you can pass in as any other variable.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=347</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=347</guid>
			<pubDate>02 Feb 2010 06:08:34 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: How to make open/close flashcards with JQuery</title>
			<description>This example shows you how to make flashcards so that the user can click on the header to open and close them.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=346</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=346</guid>
			<pubDate>01 Feb 2010 06:32:16 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to create a generic method to return a specific type specified by the call</title>
			<description>This method allows the caller to specify the type of variable he knows he will be getting, useful e.g. if you are doing reflection and only the caller knows what types to expect from a generic method. There is a <a target="_blank" href="http://stackoverflow.com/questions/2162002/how-can-i-create-a-generic-method-to-return-a-specific-type-specified-by-the-call/2163406#2163406">discussion at stackoverflow on where most people say that this example is a &quot;misuse of generics&quot;</a>, interesting, since it is a solution done in less code with the same outcome.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=345</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=345</guid>
			<pubDate>30 Jan 2010 13:31:02 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to use brackets to define scope</title>
			<description>In the past especially in unit-test code I've found myself creating variables such as **customer1**, **customer2**, **customer3** in one method since it was all the same scope. Just discovered that you can use brackets like this to create scope so that you can use the same variable repeatedly.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=344</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=344</guid>
			<pubDate>29 Jan 2010 01:18:00 GMT</pubDate>
		</item>
		<item>
			<title>JQUERY CODE EXAMPLE: JQuery all-in-one template page for quick examples</title>
			<description>This is a HTML/Javascript/JQuery/CSS template that I use to quickly try out a JQuery example or post an issue on a forum. It loads the latest version of jquery from google, everything all in one page, just change the jquery, javascript, css, html as you need it.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=343</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=343</guid>
			<pubDate>27 Jan 2010 04:36:01 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to make StringBuilder have a .Clear() method</title>
			<description>During the last decade everytime I wanted to clear a StringBuilder I had to look around for the code to do it (sb.Remove(0,sb.Length)), but if you put this in an extension method, you can simply call sb.Clear() to clear a StringBuilder.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=342</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=342</guid>
			<pubDate>27 Jan 2010 01:58:40 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to allow a user to click on TextBlocks which return an integer ID in the click handler</title>
			<description>This example shows you how to use the Tag attribute, the MouseDown event, and EventSetter in a style to make alist of TextBlocks which act as buttons with on a WPF page.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=341</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=341</guid>
			<pubDate>27 Jan 2010 01:58:38 GMT</pubDate>
		</item>
		<item>
			<title>JAVASCRIPT CODE EXAMPLE: Two ways to use the arguments object of a Javascript function as an array</title>
			<description>The arguments variable in a Javascript function is not an array, as you might think. To use the arguments of a javascript function as an array, use these two methods, Array.forEach() also useful, <a target="_blank" href="http://stackoverflow.com/questions/2091138/what-doesnt-join-work-with-function-arguments">more here</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=340</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=340</guid>
			<pubDate>19 Jan 2010 05:12:04 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to handle double-click in WPF when you don't need to handle single-click</title>
			<description>This example is useful when you only need to handle double-clicking and don't need to differentiate it from single-clicking, in order to get them both to work on one FrameworkElement (i.e. not a Control), you might try <a target="_blank" href="http://stackoverflow.com/questions/2086213/how-can-i-catch-both-single-click-and-double-click-events-on-wpf-frameworkelement/2087517#2087517">this approach</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=339</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=339</guid>
			<pubDate>19 Jan 2010 03:01:07 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to create JQuery-like chaining in C# with Extension methods</title>
			<description>After realizing how easy extension methods are to create, you next realize realize how useful it is to chain them together. Here's an example.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=338</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=338</guid>
			<pubDate>17 Jan 2010 17:27:33 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to randomize the order of a List&lt;string&gt; collection</title>
			<description>This example shows a simple way to mix up the order of a List&lt;string&gt; collection.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=337</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=337</guid>
			<pubDate>17 Jan 2010 04:54:34 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to serialize and deserialize an object</title>
			<description>This solution using XmlWriter/XmlReader is a simpler solution than <a target="_blank" href="http://tanguay.info/web/index.php?pg=codeExamples&amp;id=332">this example using XmlTextWriter and UTF8Encoding</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=336</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=336</guid>
			<pubDate>15 Jan 2010 22:03:36 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to read serialized XML into a XDocument by removing the BOM</title>
			<description>With the following code, when you try to read the serialized XML text into an XDocument with XDocument.Parse, it will tell you there is an invalid character at line 1, character 1. This is the BOM marker that was added. This code example shows you how to removed it so you can read in your XML into XDocument.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=335</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=335</guid>
			<pubDate>15 Jan 2010 22:03:34 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to respond to keyboard input to move objects around the screen</title>
			<description>This example allows the user to move a character around the screen with the arrow keys. Most of the characters are recognized this way: e.g. all letters and numbers. Note that to do this you use the KeyConverter instead of the e.Key.ToString()[0], e.g. to get the numbers.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=334</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=334</guid>
			<pubDate>13 Jan 2010 22:35:17 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to serialize an object with a Dictionary&lt;string,object&gt; property</title>
			<description>This example uses <a target="_blank" href="http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx">Paul Welter's XML Serializable Generic Dictionary</a> to serialize an object that has a Dictionary as a property. These is quite a bit of discussion at that link by people implementing it in various ways.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=333</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=333</guid>
			<pubDate>13 Jan 2010 22:35:15 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to serialize from object to string and deserialize from string to object</title>
			<description>This example has two reusable methods that make serialization and deserialization between object and string one line statements.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=332</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=332</guid>
			<pubDate>12 Jan 2010 18:45:11 GMT</pubDate>
		</item>
		<item>
			<title>LINQ CODE EXAMPLE: How to use a LINQ with join to compare two XML texts and return data differences</title>
			<description>This method compares two flat XML files and returns which data has changed between them.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=331</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=331</guid>
			<pubDate>09 Jan 2010 04:50:57 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Basic serialization</title>
			<description>This example shows how to serialize and deserialize C# objects to XML files, very easy.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=330</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=330</guid>
			<pubDate>07 Jan 2010 05:44:55 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: One-liner to get all files names recursively under a directory</title>
			<description>Here's a faster way to get all file names recursively from a directly. There is another setting SearchOption.TopDirectoryOnly which only gets one level deep.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=329</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=329</guid>
			<pubDate>03 Jan 2010 15:36:42 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Method to get all file names recursively under a directory</title>
			<description>This method will return an array of strings containing the full path and file name of every file under a directory. Note there is a <a target="_blank" href="index.php?pg=coeExamples&amp;id=329">faster way with a one-liner</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=328</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=328</guid>
			<pubDate>01 Jan 2010 00:39:43 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to print both from XAML and from code in WPF</title>
			<description>Printing in WPF is refreshingly easy compared to printing in the pre-WPF era. This code shows you how to (1) send an already existing XAML element to the printer, or (2) create an element in code and send that. Note in (1) that I hide the print button before I send it to the printer, and in (2) the necessary Measure and Arrange statements. Note also that printing from the XAML element will retain the word wrapping as it is on the screen whereas recreating the element in code will adapt the word wrapping to the printed page. You can convert XAML to code behind with <a target="_blank" href="http://www.xamlt.com/">xamlt.com</a> as shown here in this <a target="_blank" href="http://www.deviantsart.com/upload/123hjl5.png">screenshot</a>. If you are creating printed reports etc. be sure to get <a target="_blank" href="http://www.bullzip.com/products/pdf/info.php">free Bullzip PDF printer driver</a> to save you paper.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=327</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=327</guid>
			<pubDate>28 Dec 2009 10:51:26 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Three different ways to change Background and display Images in XAML</title>
			<description>The following example shows three different ways to change the background and display a picture in XAML. Basically: (1) do it in XAML if it is static, (2) do it with a INotifiedPropertyChanged property to get automatic binding (if either the XAML value or the property value changes, both will change), or (3) do it manually with x:name if you need a quick solution.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=326</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=326</guid>
			<pubDate>25 Dec 2009 23:53:33 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to display custom objects with ItemsControl without full MVVM pattern</title>
			<description>This is a simplified version of MVVM if you only need to display data of objects in a collection but don't need any functionality. Basically it is &quot;MV&quot; or &quot;Model and View&quot; since there is no ViewModel. You bind the view directly to the model since you don't need any extra functionality that the ViewModel provides (e.g. events or a ViewModel property that defines the background color, etc.) This is a good exercise for understanding MVVM since you see the limitations of MV while also seeing the practicality of it (i.e. if you only have data to display anyway).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=325</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=325</guid>
			<pubDate>23 Dec 2009 11:40:10 GMT</pubDate>
		</item>
		<item>
			<title>XAML CODE EXAMPLE: How to control your XAML layout with DockPanel, Border, and StackPanel</title>
			<description>When you do application layout with XAML, you run into issues of buttons stretching across the screen when you don't want them to, or a StackPanel collapsing around its children so the background color doesn't extend all the way to the bottom, etc. Here is base XAML layout code which I use that works pretty much 100% of the time for making rounded-corner areas inside a window and being able to position buttons in their natural sizes (based on their text) aligned in any of the four corners of the boxes.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=324</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=324</guid>
			<pubDate>22 Dec 2009 14:04:22 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: As simple WPF application for kids that counts numbers with audio voice.</title>
			<description>This is the second version of the counting program I made for my daughter. The main difference is that the numbers are now read aloud by a woman computer voice. In order to get it to work I had to change the timer to a BackgroundWorker.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=323</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=323</guid>
			<pubDate>17 Dec 2009 23:42:52 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a simple counting program for kids in WPF</title>
			<description>I made this counting program for my 5-year-old daughter who likes to type numbers into WordPad, so this program allows her to type in two numbers and it will count them for her. The slider on the left controls the speed that it counts. I used a timer instead of a BackgroundWorker for simplicity, works well.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=322</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=322</guid>
			<pubDate>17 Dec 2009 02:35:56 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a slider that changes information in a panel</title>
			<description>This example shows how to make information change in a text area based on the position of a slider to the left.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=321</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=321</guid>
			<pubDate>16 Dec 2009 22:58:57 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to creare a generic factory method to clone an inherited object</title>
			<description>This example shows how to start building a reflector class which analyzes an object (here an object derived from Item) and create a clone of it. Notice the where T : new() which you need if you are going to instantiate the generic object in the method.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=320</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=320</guid>
			<pubDate>16 Dec 2009 05:36:20 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make and use data bound custom user controls with dependency properties</title>
			<description>This example shows how you can make a WPF user control with dependency properties so that they can be controlled simply by setting their properties to certain values. This is a custom drop down control which allows you to define the data source, etc. Because of data binding, when you click on e.g. the check box control, the data in the drop down changes immediately. You can also click on RefreshControl which will individual refresh the controls but notice that when you refresh the first control it refreshes the second because ItemTypeIdCode changes on the second control and hence triggers a refresh. An improvment to this could be to implement some kind of lazy loading, etc. so that numerous refreshes are not unnecessarily triggered.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=319</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=319</guid>
			<pubDate>14 Dec 2009 20:10:52 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to attach events created in a common event factory from multiple controls</title>
			<description>This example shows how you can move events from code behind into one central location so that numerous controls can attach the same events. The calling control is sent as a parameter so that the events themselves could manipulate the controls.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=318</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=318</guid>
			<pubDate>14 Dec 2009 20:10:22 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Method that returns search-machine-like search results on List&lt;string&gt;</title>
			<description>This simple method SearchListWithSearchPhrase() allows you to send a List&lt;string&gt; which will be searched through in a search-machine-like fashion, i.e. case-insensitivity and quoted multi-word phrases are supported.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=317</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=317</guid>
			<pubDate>09 Dec 2009 05:55:42 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to add generic lists of different objects to a collective list</title>
			<description>This example shows how to use .Cast&lt;&gt; and .AddRange() to add different kinds of generic lists into another list of objects.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=316</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=316</guid>
			<pubDate>08 Dec 2009 02:20:01 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to mix abstract and virtual methods in a C# class</title>
			<description>You may have thought that abstract classes cannot have methods with executable code but they can, and hence, you can have classes with both abstract and virtual methods in them, which comes in handy as this example shows.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=315</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=315</guid>
			<pubDate>04 Dec 2009 21:16:36 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a hover info bubble which appears immediately</title>
			<description>The trick to doing this is to use a ToolTip but also to use ToolTipService.SetInitialShowDelay(tb,0) so that the bubble appears immediately.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=314</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=314</guid>
			<pubDate>04 Dec 2009 21:15:49 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to use Cast&lt;T&gt; to cast generic Lists of objects</title>
			<description>Since C# 3.0 doesn't inherently support co-variance and contra-variance, you can't just send a List&lt;Customer&gt; as a parameter to a method that accepts List&lt;object&gt; and expect it to cast automatically. But by running it through Cast&lt;T&gt;, it is easy enough, here's how.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=313</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=313</guid>
			<pubDate>04 Dec 2009 06:38:40 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: Custom method that processes a collection of objects dynamically</title>
			<description>This is beginning code if you need to, e.g. create a DataGrid that accepts a List&lt;T&gt; of any type of object, and a list of fields, and displays these based on the fields.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=312</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=312</guid>
			<pubDate>04 Dec 2009 06:37:42 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to manipulate content of WPFToolkit DataGrid cells at runtime</title>
			<description>This code shows you how to connect a WPFToolkit Datagrid to a collection of Customer objects and display the, but the content of each cell is manipulated in a particular way before being dislayed.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=311</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=311</guid>
			<pubDate>04 Dec 2009 06:36:06 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: A QuickForm method to display XAML Grid form by reflecting a passed object</title>
			<description>This is beginning code if you want to build a dynamic form that can edit any object by reflecting on its properties and displaying them in the form.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=310</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=310</guid>
			<pubDate>04 Dec 2009 06:35:02 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to display an image in its actual size</title>
			<description>The trick is to set img.Stretch = Stretch.None or else it will <a target="_blank" href="http://stackoverflow.com/questions/1841511/how-can-i-get-images-in-xaml-to-display-as-their-actual-size">expand to the size of its container</a>.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=309</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=309</guid>
			<pubDate>04 Dec 2009 06:33:49 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to define a WPFToolkit DatePicker in code behind with specific date format</title>
			<description>This examples shows you how you can define a DatePicker in code behind, add it to a control (note you have to register it), display the date in the correct format (note that you don't do this on the datepicker but the thread), and get the value back out (note that it is a nullable datetime so you have to use &quot;.Value.&quot;).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=308</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=308</guid>
			<pubDate>04 Dec 2009 06:26:10 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to call a custom control with a bound property</title>
			<description>This example has a custom user control which inherits from ComboBox and calls this from another XAML page that defines the selected value with a bound property.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=307</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=307</guid>
			<pubDate>30 Nov 2009 23:24:41 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Example of custom control with multiple dependency properties</title>
			<description>This is a full example of a custom user control loading another custom user control, each one sending a bound value as an attribute name down to the next control, good for making a flexible custom framework which still takes advantage of WPF binding.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=306</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=306</guid>
			<pubDate>30 Nov 2009 23:24:39 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to make a custom dropdown usercontrol that is controlled by binding its dependency properties</title>
			<description>This is an example of a user control to which you can send parameters (ItemTypeIdCode), which in a real scenario, would look data in a database to display dynamically. The useful feature of this is that your custom control can be used like any other WPF control, e.g. with ElementName binding etc. in XAML.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=305</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=305</guid>
			<pubDate>27 Nov 2009 21:39:43 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: How to bind an ObservableCollection to a Combobox</title>
			<description>This example uses an ObservableCollection of KeyValuePairs to hold values which are bound to a combobox. The buttons show how the GUI is updated automatically when the values change, quite powerful binding (as your model changes, your GUI changes automatically).</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=304</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=304</guid>
			<pubDate>27 Nov 2009 21:39:41 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: C# syntax for abstract, override, virtual, base</title>
			<description>The C# syntax of overriding classes and calling inherited parent classes differs than that of PHP (&quot;don't forget virtual&quot; and &quot;base instead of parent&quot;), so I did this example for future reference.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=303</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=303</guid>
			<pubDate>24 Nov 2009 02:27:57 GMT</pubDate>
		</item>
		<item>
			<title>C# CODE EXAMPLE: How to pass a where clause to a method to dynamically include in a LINQ statement</title>
			<description>This example shows you how to you can pass a where-clause as a parameter to a method which then includes this where clause dynamically in a LINQ statement.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=302</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=302</guid>
			<pubDate>24 Nov 2009 01:42:47 GMT</pubDate>
		</item>
		<item>
			<title>WPF CODE EXAMPLE: Two ways to update the UI within a button-click handler</title>
			<description>This code example shows you two methods for updating UI commands in background thread so that you can e.g. display a message before a lengthy process begins.</description>
			<link>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=301</link>
			<guid>http://www.tanguay.info/web/index.php?pg=codeExamples&amp;id=301</guid>
			<pubDate>22 Nov 2009 14:26:36 GMT</pubDate>
		</item>
		<item>
			<title>Notes on article: Silverlight 4 Beta – A guide to the new features</title>
			<description>I scanned this article by Tim Heuer when Silverlight 4 came out to get an idea of what is new: i.e., lots! Below is my list of what I'll be using.</description>
			<link>http://www.tanguay.info/web/index.php?pg=notesItems&amp;id=74</link>
			<guid>http://www.tanguay.info/web/index.php?pg=notesItems&amp;id=74</guid>
			<pubDate>19 Nov 2009 10:20:31 GMT</pubDate>
		</item>
	</channel>
</rss>

