<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Entries tagged with WPF</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Tags/wpf/RSS"></atom:link>
    <itunes:summary></itunes:summary>
    <itunes:author>Microsoft</itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <image>
      <url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
      <title>Channel 9 - Entries tagged with WPF</title>
      <link>http://channel9.msdn.com/Tags/wpf</link>
    </image>
    <itunes:image href=""></itunes:image>
    <itunes:category text="Technology"></itunes:category>
    <description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
    <link>http://channel9.msdn.com/Tags/wpf</link>
    <language>en</language>
    <pubDate>Thu, 23 May 2013 02:18:53 GMT</pubDate>
    <lastBuildDate>Thu, 23 May 2013 02:18:53 GMT</lastBuildDate>
    <generator>Rev9</generator>
    <c9:totalResults>388</c9:totalResults>
    <c9:pageCount>16</c9:pageCount>
    <c9:pageSize>25</c9:pageSize>
  <item>
      <title>KinectChooserEx - Making Kinect Interactions even easier</title>
      <description><![CDATA[<p>Today's project is another in András Velvárt series on using the new Kinect Interactions. In this project he's making it even easier with...</p><h2>Kinect Interaction with WPF Part II: Getting Started Easier [KinectChooserEx]</h2><blockquote><p>In the previous post of <a href="http://dotneteers.net/blogs/vbandi/archive/tags/Kinect&#43;Interactions/default.aspx">this series</a>, I have introduced the Kinect for Windows SDK 1.7, and the key controls and concepts within its Kinect Interactions toolkit. If you have followed through <a href="http://vbandi.dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx">that post</a>, you have seen all the work and code you need to get the basics running. Most of the initialization code was biolerplate, and code that you can easily copy and paste into your own project.</p><p>I have packaged up the initialization code into a UserControl called <strong>KinectChooserEx</strong>, and wired up a couple of dependency properties.</p><p><em>Note: I could have inherited from KinectChooser instead of packaging it into a user control. But I ran into some serious strong name issues, and wanted more consistent naming for the properties, so it was better to hide some internal workings.</em></p><p>The <strong>NearMode</strong> property is a boolean value, and can be used to turn Near Mode on and off. Changing Near Mode also sets the <strong>EnableTrackingInNearRange</strong> of the SkeletonStream. You will probably want to keep NearMode as false if you are using a Kinect for XBox sensor instead of a Kinect for Windows one. Otherwise the interaction engine works better at close range, so I have set <strong>NearMode </strong>to be true by default.</p><p>The other property is <strong>KinectSensor</strong>, which contains null if no sensor is initialized, or a KinectSensor object if one is.</p><p>Both of these properties are bindable. With <strong>KinectChooserEx, </strong>you can finally get started with your own Kinect project purely in Blend, without writing a single line of code (at least for the interaction part). Here is a step by step tutorial on how to do this:</p><ul><li><h4>Create a New Project and Add KinectChooserEx.xaml and KinectChooserEx.xaml.cs</h4></li></ul><p>Create a new WPF project, and add the necessary references <a href="http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx">as described in my previous post</a>. Drag and drop the KinectChooserEx.xaml and KinectChooserEx.xaml.cs files from Explorer into the project. You will also want to add the KinectInteraction170_32.dll and KinectInteraction170_64.dll files at this point (again, see my previous post).</p><ul><li><strong>Add KinectChooserEx to the MainPage</strong> </li><li><strong>Adding a KinectRegion</strong> </li><li><strong>Adding a KinectUserViewer control</strong> </li><li><strong>Let’s See it Work!</strong> </li><li><strong>Using the Near Mode</strong> </li></ul></blockquote><p><strong>Project Information URL:</strong> <a title="http://dotneteers.net/blogs/vbandi/archive/2013/04/19/kinect-interaction-with-wpf-part-ii-getting-started-easier.aspx" href="http://dotneteers.net/blogs/vbandi/archive/2013/04/19/kinect-interaction-with-wpf-part-ii-getting-started-easier.aspx">http://dotneteers.net/blogs/vbandi/archive/2013/04/19/kinect-interaction-with-wpf-part-ii-getting-started-easier.aspx</a></p><p><strong>Project Download URL:</strong> <a href="http://sdrv.ms/117qGxo">http://sdrv.ms/117qGxo</a></p><p><strong>Project Source URL:</strong> <a href="http://sdrv.ms/117qGxo">http://sdrv.ms/117qGxo</a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B5%5D-149.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B1%5D-158.png" alt="image" width="467" height="336" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-241.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-238.png" alt="image" width="520" height="355" border="0"></a></p><p>Contact Information:</p><ul><li>Blog: <a title="http://dotneteers.net/blogs/vbandi/" href="http://dotneteers.net/blogs/vbandi/">http://dotneteers.net/blogs/vbandi/</a> </li><li>Twitter: <a href="https://twitter.com/vbandi" target="_blank">@vbandi</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:4f7fb621176b487cad48a1a601871d62">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/KinectChooserEx-Making-Kinect-Interactions-even-easier</comments>
      <itunes:summary>Today&#39;s project is another in Andr&#225;s Velv&#225;rt series on using the new Kinect Interactions. In this project he&#39;s making it even easier with... Kinect Interaction with WPF Part II: Getting Started Easier [KinectChooserEx]In the previous post of this series, I have introduced the Kinect for Windows SDK 1.7, and the key controls and concepts within its Kinect Interactions toolkit. If you have followed through that post, you have seen all the work and code you need to get the basics running. Most of the initialization code was biolerplate, and code that you can easily copy and paste into your own project. I have packaged up the initialization code into a UserControl called KinectChooserEx, and wired up a couple of dependency properties. Note: I could have inherited from KinectChooser instead of packaging it into a user control. But I ran into some serious strong name issues, and wanted more consistent naming for the properties, so it was better to hide some internal workings. The NearMode property is a boolean value, and can be used to turn Near Mode on and off. Changing Near Mode also sets the EnableTrackingInNearRange of the SkeletonStream. You will probably want to keep NearMode as false if you are using a Kinect for XBox sensor instead of a Kinect for Windows one. Otherwise the interaction engine works better at close range, so I have set NearMode to be true by default. The other property is KinectSensor, which contains null if no sensor is initialized, or a KinectSensor object if one is. Both of these properties are bindable. With KinectChooserEx, you can finally get started with your own Kinect project purely in Blend, without writing a single line of code (at least for the interaction part). Here is a step by step tutorial on how to do this: Create a New Project and Add KinectChooserEx.xaml and KinectChooserEx.xaml.csCreate a new WPF project, and add the necessary references as described in my previous post. Drag and drop the KinectChooserEx.xaml and KinectChooserE</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/KinectChooserEx-Making-Kinect-Interactions-even-easier</link>
      <pubDate>Tue, 23 Apr 2013 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/KinectChooserEx-Making-Kinect-Interactions-even-easier</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/581230ae-d628-4eac-81e1-7f9b933e6829.png" height="67" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/0575cff4-06de-4a87-bd14-890ec354f78e.png" height="147" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/KinectChooserEx-Making-Kinect-Interactions-even-easier/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Expression Blend</category>
      <category>Kinect</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Push to Press with the Kinect for Windows SDK 1.7</title>
      <description><![CDATA[<p>We continue with our v1.7 week theme with today's project by Vuyiswa Maseko and take a different look at the Kinect Interactions...</p><h2><a title="How to do Push to Press with Kinect SDK 1.7" href="http://www.dotnetfunda.com/articles/article2214-how-to-do-push-to-press-with-kinect-sdk-17.aspx">How to do Push to Press with Kinect SDK 1.7</a></h2><blockquote><p>Microsoft officially released the 1.7 Kinect for Windows SDK. In this article I will demonstrate or explain what interest me most. The Push-to-Press functionality.</p><p><strong>Introduction</strong></p>Kinect 1.7 sdk has been released, when I first played around with the examples like ‘Interaction Gallery’ and the fact that I don’t to adjust the jittering anymore , I knew I had to stop whatever I was doing in my Kinect project to learn “Press to Push” and implement in my current project. Before with the help of Coding4Fun toolkit we would place a hand over a button and some nice animation cycling your hand will appear telling you that you are about to select something, I had to struggle teaching my 2 years old daughter to wait for you, I was teaching her un-natural user interface, with Kinect 1.7, we have a natural user interface gesture, because you push to press a button. I must say a struggled a bit to isolate this functionality. I hope it will help someone. <p>...</p><p><strong>Objective</strong></p>In this article I wanted to show you on how to create a basic navigation system in wpf that uses hand gestures to select menu items. This is an updated version from the one I created from Coding4Fun toolkit. This one uses the press to push. So this means to select a menu, you need to push the button to press it.&nbsp; <h4><strong>Code Explanation</strong></h4><p>Few things have changed from the way we used to do things in sdk 1.6. Well you can still choose to Coding4Fun toolkit to do hand gestures that interact with your controls, but in this article I will explain how you can use the nice things found in the new sdk. The first thing that is new is the Kinect Region.</p><ul><li><strong>KinectRegion</strong> </li><li><strong>KinectTileButton</strong> </li><li><strong>KinectScrollViewer</strong> </li><li><strong>UserViewer</strong> </li></ul><p><strong>Generic Class to store the KinectSensorChooser</strong></p><p><strong>...</strong></p></blockquote><p><strong>Project Information URL:</strong> <a href="http://www.dotnetfunda.com/articles/article2214-how-to-do-push-to-press-with-kinect-sdk-17.aspx">http://www.dotnetfunda.com/articles/article2214-how-to-do-push-to-press-with-kinect-sdk-17.aspx</a></p><p><strong>Project Download URL:</strong> <a href="http://www.dotnetfunda.com/UserFiles/ArticlesFiles/Vuyiswamb_Articles_635002285365123984_Sample.zip"><strong>How to do Push to Press with Kinect SDK 1.7</strong></a></p><p><strong>Project Source URL:</strong> <a href="http://www.dotnetfunda.com/UserFiles/ArticlesFiles/Vuyiswamb_Articles_635002285365123984_Sample.zip"><strong>How to do Push to Press with Kinect SDK 1.7</strong></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-239.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-236.png" alt="image" width="520" height="301" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B8%5D-75.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B2%5D-86.png" alt="image" width="511" height="384" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B5%5D-147.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B1%5D-156.png" alt="image" width="497" height="384" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:9633b9405bf049dba549a191015e920e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Push-to-Press-with-the-Kinect-for-Windows-SDK-17</comments>
      <itunes:summary>We continue with our v1.7 week theme with today&#39;s project by Vuyiswa Maseko and take a different look at the Kinect Interactions... How to do Push to Press with Kinect SDK 1.7Microsoft officially released the 1.7 Kinect for Windows SDK. In this article I will demonstrate or explain what interest me most. The Push-to-Press functionality. Introduction Kinect 1.7 sdk has been released, when I first played around with the examples like ‘Interaction Gallery’ and the fact that I don’t to adjust the jittering anymore , I knew I had to stop whatever I was doing in my Kinect project to learn “Press to Push” and implement in my current project. Before with the help of Coding4Fun toolkit we would place a hand over a button and some nice animation cycling your hand will appear telling you that you are about to select something, I had to struggle teaching my 2 years old daughter to wait for you, I was teaching her un-natural user interface, with Kinect 1.7, we have a natural user interface gesture, because you push to press a button. I must say a struggled a bit to isolate this functionality. I hope it will help someone. ... Objective In this article I wanted to show you on how to create a basic navigation system in wpf that uses hand gestures to select menu items. This is an updated version from the one I created from Coding4Fun toolkit. This one uses the press to push. So this means to select a menu, you need to push the button to press it.&amp;nbsp; Code ExplanationFew things have changed from the way we used to do things in sdk 1.6. Well you can still choose to Coding4Fun toolkit to do hand gestures that interact with your controls, but in this article I will explain how you can use the nice things found in the new sdk. The first thing that is new is the Kinect Region. KinectRegion KinectTileButton KinectScrollViewer UserViewer Generic Class to store the KinectSensorChooser ... Project Information URL: http://www.dotnetfunda.com/articles/article2214-how-to-do-push-to-press-with-</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Push-to-Press-with-the-Kinect-for-Windows-SDK-17</link>
      <pubDate>Thu, 04 Apr 2013 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Push-to-Press-with-the-Kinect-for-Windows-SDK-17</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/401c694e-cbfe-4646-a7fc-9b055472491b.png" height="56" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/b867b641-0105-456c-a069-2928aa6d5251.png" height="124" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Push-to-Press-with-the-Kinect-for-Windows-SDK-17/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Getting started with Kinect Interactions</title>
      <description><![CDATA[<p>Looks like it's going to be a v1.7 kind of week (I know, imagine that!). Today's post by András&nbsp; Velvárt is a great getting started guide for one of the cool new features in the Kinect for Windows SDK, v1.5, &quot;Kinect Interactions&quot;</p><h2><a href="http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx">Kinect Interactions with WPF - Part I: Getting Started</a></h2><blockquote><p>... <strong>Kinect Interactions</strong>. Kinect Interactions allow developers to create interactive applications with a new, well-designed and ergonomically friendlier interaction language than before. The Kinect SDK can now detect a “push towards the screen” gesture to activate buttons, and this is the recommended “activate” gesture now instead of the old “hover, wait until the circle fills and its pressed” gesture.</p><p>Browsing lists larger than a dozen or so items has been even more difficult using Kinect. The recommended solution was to implement a “swipe from side” gesture, which paged through items on the screen. Here is such a list, straight from my XBox:</p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-238.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-235.png" alt="image" width="473" height="301" border="0"></a></p><p>You can see that the list has 358 games, and 5 of them are visible at the same time. To get through even half of this list, you would have to perform the swipe gesture 36 times! This is extremely slow, frustrating and physically exhausting.</p><p>The latest K4W SDK solves this issue by differentiating between an open and a closed hand. When you close your hand, you “grip” whatever’s underneath it (such as a scrollviewer), and then you can move your hand to scroll. If you release the scroller while your hand is still moving, the scrolling keeps happening – similarly to the inertia scroll you are already used to on touch devices. You can close your hand again at any time, and stop the inertia – again, as you expected.</p><p>In this post, I will help you to get started with Kinect Interactions by creating a Hello World WPF app that uses the features mentioned above. In later posts, I will dive deeper into the Kinect Interactions SDK, show you how to customize the existing controls, create new ones and go deep into the lower levels of the InteractionStream to invent new ways of interacting with your app. But first, let’s see how you can get started with Kinect Interactions today!</p><p>Note: I am assuming that you are familiar with C# and WPF for this article series.</p><p>...</p><ul><li>First Things First – Download and Install the bits </li><li>Create the Project </li><li>Initializing the Kinect Sensor with KinectSensorChooser </li><li>Setting up the Kinect for Interactions </li><li>The Kinect Region </li><li>User Viewer </li><li>Interactive Controls <ul><li>The KinectTileButton </li><li>The KinectCircleButton </li></ul></li><li>They See Me Scrollin’ </li></ul><p>...</p><h3>Download</h3><p>You can download the demo project for this article <a href="http://sdrv.ms/10tWqi9">here</a>.</p><h3>Summary</h3><p>In this post, I’ve introduced you to the basics to get started with a Kinect Interactions application – getting the Kinect sensor up and running, defining a KinectRegion, adding buttons and scrollable areas to it.</p><p>In the next posts of this series, I will dive deeper into the world of Kinect Interactions. We will dive deeper into the – unfortunately very sparsely documented – controls I discussed above, and see the customization options they offer. And finally, going deeper into the rabbit hole, we will examine the low level Interaction Stream.</p></blockquote><p><strong>Project Information URL:</strong> <a title="http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx" href="http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx">http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx</a></p><p><strong>Project Source URL:</strong> <a title="http://sdrv.ms/10tWqi9" href="http://sdrv.ms/10tWqi9">http://sdrv.ms/10tWqi9</a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B5%5D-146.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B1%5D-155.png" alt="image" width="520" height="323" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B8%5D-74.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B2%5D-85.png" alt="image" width="520" height="321" border="0"></a></p><p>Contact Information:</p><ul><li>Blog: <a title="http://dotneteers.net/blogs/vbandi/archive/2013/03/25/kinect-interactions-with-wpf-part-i-getting-started.aspx" href="http://dotneteers.net/blogs/vbandi">http://dotneteers.net/blogs/vbandi</a> </li><li>Twitter: <a href="https://twitter.com/vbandi" target="_blank">@vbandi</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:3ac424f627f9463b9331a191015b0c88">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Getting-started-with-Kinect-Interactions</comments>
      <itunes:summary>Looks like it&#39;s going to be a v1.7 kind of week (I know, imagine that!). Today&#39;s post by Andr&#225;s&amp;nbsp; Velv&#225;rt is a great getting started guide for one of the cool new features in the Kinect for Windows SDK, v1.5, &amp;quot;Kinect Interactions&amp;quot; Kinect Interactions with WPF - Part I: Getting Started... Kinect Interactions. Kinect Interactions allow developers to create interactive applications with a new, well-designed and ergonomically friendlier interaction language than before. The Kinect SDK can now detect a “push towards the screen” gesture to activate buttons, and this is the recommended “activate” gesture now instead of the old “hover, wait until the circle fills and its pressed” gesture. Browsing lists larger than a dozen or so items has been even more difficult using Kinect. The recommended solution was to implement a “swipe from side” gesture, which paged through items on the screen. Here is such a list, straight from my XBox:  You can see that the list has 358 games, and 5 of them are visible at the same time. To get through even half of this list, you would have to perform the swipe gesture 36 times! This is extremely slow, frustrating and physically exhausting. The latest K4W SDK solves this issue by differentiating between an open and a closed hand. When you close your hand, you “grip” whatever’s underneath it (such as a scrollviewer), and then you can move your hand to scroll. If you release the scroller while your hand is still moving, the scrolling keeps happening – similarly to the inertia scroll you are already used to on touch devices. You can close your hand again at any time, and stop the inertia – again, as you expected. In this post, I will help you to get started with Kinect Interactions by creating a Hello World WPF app that uses the features mentioned above. In later posts, I will dive deeper into the Kinect Interactions SDK, show you how to customize the existing controls, create new ones and go deep into the lower levels of the Interactio</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Getting-started-with-Kinect-Interactions</link>
      <pubDate>Wed, 03 Apr 2013 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Getting-started-with-Kinect-Interactions</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f8e10ac7-f90e-4fa9-99b4-4df2fe8c77d4.png" height="60" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/bccad2d9-2283-43ed-801d-a7565cdb7fde.png" height="133" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Getting-started-with-Kinect-Interactions/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>WPF</category>
    </item>
  <item>
      <title>TWC9: Build 2013, Brew, Backbone, Git, YUI and more</title>
      <description><![CDATA[<p>This week on Channel 9, Brian and Clint discuss the week's top developer news, including;</p><ul><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=0m31s">[00:31]</a> <a href="http://www.buildwindows.com/">Build 2013</a> </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=1m04s">[01:04]</a> <a href="http://wpf.2000things.com/2013/03/27/785-using-the-visual-profiler-tool/">#785 – Using the Visual Profiler Tool</a>, <a href="http://wpf.2000things.com/2013/03/25/783-downloading-and-installing-the-wpf-performance-suite/">#783 – Downloading and Installing the WPF Performance Suite</a> (Sean Sexton), <a href="http://msdn.microsoft.com/en-us/library/aa969767.aspx">WPF Performance Suite</a> </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=1m45s">[01:45]</a> <a href="http://blog.shellscape.org/blog/2013/03/18/brew-1.0-has-arrived/">Brew 1.0 has arrived!</a> [Found Via: <a href="http://blog.cwa.me.uk/2013/03/22/the-morning-brew-1321/">The Morning Brew #1321</a>] </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=2m23s">[02:23]</a> <a href="http://ashkenas.com/backbonejs-1.0/">Backbone 1.0</a> (Jeremy Ashkenas) [Found Via: <a href="http://blog.cwa.me.uk/2013/03/22/the-morning-brew-1321/">The Morning Brew #1321</a>] </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=2m50s">[02:50]</a> <a href="http://refcardz.dzone.com/refcardz/git-patterns-and-anti-patterns">Git Patterns and Anti-Patterns</a> (Luca Milanesio) </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=4m03s">[04:03]</a> <a href="http://blogs.msdn.com/b/vcblog/archive/2013/03/26/developing-an-app-with-the-visual-studio-3d-starter-kit-part-1-of-3.aspx">Developing an app with the Visual Studio 3D Starter Kit, part 1 of 3</a> (Roberto Sonnino) </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=4m51s">[04:51]</a> <a href="http://code.msdn.microsoft.com/windowsapps/GDC-2013-Windows-Developer-8dd7abdf">GDC 2013 Windows Developer Content Direct3D Game Templates</a> </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=5m29s">[05:29]</a> <a href="http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/03/27/new-middleware-makes-porting-games-to-windows-phone-easy.aspx">New middleware makes porting games to Windows Phone easy</a> (Todd Brix) </li><li><a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=6m06s">[06:06]</a> <a href="http://www.dzone.com/articles/test-non-standard-scenarios">Windows Phone Apps - Watch Your Code for Hidden Activity</a> (Den Delimarsky) </li><li>Channel 9 Highlight:<a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=7m08s">[07:08]</a> <a href="http://channel9.msdn.com/posts/Title-Build-Windows-8-Apps-with-YUI">Build Windows 8 Apps with YUI</a> (Jeff Burtoft) </li></ul><p><strong>Picks of the Week!</strong></p><ul><li>Brian's Pick of the Week:<a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=7m40s">[07:40]</a> <a href="http://www.404techsupport.com/2013/03/arena-xlsm-an-rpg-built-using-excel/">Arena.Xlsm, an RPG built using Excel</a>, <a href="http://carywalkin.wordpress.com/2013/03/17/arena-xlsm-released/">carywalkin.wordpress.com</a>, <a href="http://carywalkin.wordpress.com/2013/03/27/arena-xlsm-version-1-1-preview/">Version 1.1</a>, <a href="http://arenaxlsm.wikia.com/">Arena.Xlsm wiki</a> </li><li>Clint's Pick of the Week:<a href="http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013#time=8m11s">[08:11]</a> <a href="http://channel9.msdn.com/coding4fun/articles/Dynamic-Lockscreen-Changer-for-Windows-Phone-8-Built-With-ASPNET-MVC-and-Azure-Mobile-Services">Dynamic Lockscreen Changer for Windows Phone 8, Built With ASP.NET MVC and Azure Mobile Services</a> (Clint Rutkas, Den Delimarsky) </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:c4fd57bca9a64142b182a18f0161a5a5">]]></description>
      <comments>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013</comments>
      <itunes:summary>This week on Channel 9, Brian and Clint discuss the week&#39;s top developer news, including; [00:31] Build 2013 [01:04] #785 – Using the Visual Profiler Tool, #783 – Downloading and Installing the WPF Performance Suite (Sean Sexton), WPF Performance Suite [01:45] Brew 1.0 has arrived! [Found Via: The Morning Brew #1321] [02:23] Backbone 1.0 (Jeremy Ashkenas) [Found Via: The Morning Brew #1321] [02:50] Git Patterns and Anti-Patterns (Luca Milanesio) [04:03] Developing an app with the Visual Studio 3D Starter Kit, part 1 of 3 (Roberto Sonnino) [04:51] GDC 2013 Windows Developer Content Direct3D Game Templates [05:29] New middleware makes porting games to Windows Phone easy (Todd Brix) [06:06] Windows Phone Apps - Watch Your Code for Hidden Activity (Den Delimarsky) Channel 9 Highlight:[07:08] Build Windows 8 Apps with YUI (Jeff Burtoft) Picks of the Week! Brian&#39;s Pick of the Week:[07:40] Arena.Xlsm, an RPG built using Excel, carywalkin.wordpress.com, Version 1.1, Arena.Xlsm wiki Clint&#39;s Pick of the Week:[08:11] Dynamic Lockscreen Changer for Windows Phone 8, Built With ASP.NET MVC and Azure Mobile Services (Clint Rutkas, Den Delimarsky) </itunes:summary>
      <itunes:duration>585</itunes:duration>
      <link>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013</link>
      <pubDate>Sat, 30 Mar 2013 00:40:39 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013</guid>
      <media:thumbnail url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_100.jpg" height="56" width="100"></media:thumbnail>
      <media:thumbnail url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_220.jpg" height="123" width="220"></media:thumbnail>
      <media:thumbnail url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_512.jpg" height="288" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.mp3" expression="full" duration="585" fileSize="9372315" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.mp4" expression="full" duration="585" fileSize="56551308" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.webm" expression="full" duration="585" fileSize="20965213" type="video/webm" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.wma" expression="full" duration="585" fileSize="4742339" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.wmv" expression="full" duration="585" fileSize="33617939" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_high.mp4" expression="full" duration="585" fileSize="123616381" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_mid.mp4" expression="full" duration="585" fileSize="86526837" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9_Source.wmv" expression="full" duration="585" fileSize="134187967" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://smooth.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.ism/manifest" expression="full" duration="585" fileSize="6036" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://media.ch9.ms/ch9/e4cb/f9cef35c-7371-4fb2-8191-245e460de4cb/20130329TWC9.wmv" length="33617939" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Brian Keller, Clint Rutkas, Greg Duncan</dc:creator>
      <itunes:author>Brian Keller, Clint Rutkas, Greg Duncan</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-March-29-2013/RSS</wfw:commentRss>
      <category>ALM</category>
      <category>ASP.NET MVC</category>
      <category>DirectX</category>
      <category>JavaScript</category>
      <category>Visual Studio</category>
      <category>Windows Phone</category>
      <category>WPF</category>
      <category>Game Development</category>
      <category>GDC</category>
      <category>Web Development</category>
      <category>Build</category>
      <category>Windows 8</category>
      <category>Windows Store App</category>
    </item>
  <item>
      <title>&quot;Basic Navigation in Kinect using WPF&quot;</title>
      <description><![CDATA[<p>Vuyiswa Maseko is back (we missed you) and continues his series of Kinect Development series...</p><h3>Basic Navigation in Kinect using WPF</h3><blockquote><p>Navigation in Kinect applications cannot be the same as other traditional applications with small buttons that are made to save safe and also Tabs that can allow a user to navigate with the application. Kinect approach is different and if you are new to Kinect, you probably came across the UI navigation problem as I did before, but was able to resolve the problem through friends who are also doing Kinect for Windows Development.</p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-228.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-225.png" alt="image" width="520" height="249" border="0"></a></p></blockquote><p><strong>Project Information URL:</strong> <a title="http://www.dotnetfunda.com/articles/article2168-basic-nagivation-in-kinect-using-wpf.aspx" href="http://www.dotnetfunda.com/articles/article2168-basic-nagivation-in-kinect-using-wpf.aspx">http://www.dotnetfunda.com/articles/article2168-basic-nagivation-in-kinect-using-wpf.aspx</a></p><p><strong>Project Source URL:</strong> <a href="http://www.dotnetfunda.com/UserFiles/ArticlesFiles/Vuyiswamb_Articles_634959886755371172_WpfApplication1.zip">http://www.dotnetfunda.com/UserFiles/ArticlesFiles/Vuyiswamb_Articles_634959886755371172_WpfApplication1.zip</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:8cf31ac6ff23442e850aa16e0181669f">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Basic-Navigation-in-Kinect-using-WPF</comments>
      <itunes:summary>Vuyiswa Maseko is back (we missed you) and continues his series of Kinect Development series... Basic Navigation in Kinect using WPFNavigation in Kinect applications cannot be the same as other traditional applications with small buttons that are made to save safe and also Tabs that can allow a user to navigate with the application. Kinect approach is different and if you are new to Kinect, you probably came across the UI navigation problem as I did before, but was able to resolve the problem through friends who are also doing Kinect for Windows Development.  Project Information URL: http://www.dotnetfunda.com/articles/article2168-basic-nagivation-in-kinect-using-wpf.aspx Project Source URL: http://www.dotnetfunda.com/UserFiles/ArticlesFiles/Vuyiswamb_Articles_634959886755371172_WpfApplication1.zip </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Basic-Navigation-in-Kinect-using-WPF</link>
      <pubDate>Tue, 26 Feb 2013 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Basic-Navigation-in-Kinect-using-WPF</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/8b71194a-6440-4cfd-8113-a349dc3e6abc.png" height="46" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/0c958066-1414-4ac3-a8cc-24c34d8e1688.png" height="101" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Basic-Navigation-in-Kinect-using-WPF/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Kegerator + Kegduino + KegMonitor = KegManager!</title>
      <description><![CDATA[<p>I was looking for something different for today's Hardware Friday post and I think I found it. It's a little dated, and I'm not sure how finished it is, and there's no hardware schematic, but none-the-less, mixing beer, Netduino, Windows 8 (and twitter and facial recognition) was just too hard to pass up!</p><h2><a href="http://kegmanager.codeplex.com/" target="_blank">KegManager</a></h2><blockquote><p><strong>Project Description</strong><br>KegManager is a software package designed to collect, interpret and display relevant data collected from a kegerator. Each level of this project uses a Microsoft technology, from the .Net micro framework on the hardware to using the new Windows 8 Immersive UI for the frontend.</p><p><strong>&quot;Kegduino&quot; - the hardware</strong><br>This consists of the hardware and software that is actually collecting the data. Everything is built around a Netduino device running the .Net micro framework and connected to a series of sensors that will report information like: flow volume (for pouring), temperature, gas (CO2 or N) pressure etc. This data is then sent over a bluetooth connection to a nearby PC.</p><p><strong>&quot;KegMonitor&quot; - The data logger</strong><br>This software listens to the kegduino, interprets the packets, and writes the data to a datasource for posterity.</p><p><strong>&quot;KegManager&quot; - The display<br></strong>Using the new Windows 8 SDK, this immersive application will display the current status of the kegerator, including what beers are on tap, the current temperature, and will even support facial recognition of users.</p></blockquote><p>Here's a snap of the the main project in the solution...</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-33.png" alt="image" width="249" height="384" border="0"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B10%5D-35.png" alt="image" width="249" height="384" border="0"></p><p>You get DB diagrams;</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B22%5D-11.png" alt="image" width="500" height="297" border="0"></p><p>WPF Controls...</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B16%5D-25.png" alt="image" width="500" height="227" border="0"></p><p>To even KegReader and KegWriters!</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B19%5D-15.png" alt="image" width="500" height="292" border="0"></p><p>Now how can you go wrong with that? If nothing else, it's an interesting project to &quot;drink in&quot;&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-8.gif?v=c9' alt='Expressionless' /></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:f5a5809e9b5b491fbd80a1600168e9e5">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Kegerator--Kegduino--KegMonitor--KegManager</comments>
      <itunes:summary>I was looking for something different for today&#39;s Hardware Friday post and I think I found it. It&#39;s a little dated, and I&#39;m not sure how finished it is, and there&#39;s no hardware schematic, but none-the-less, mixing beer, Netduino, Windows 8 (and twitter and facial recognition) was just too hard to pass up! KegManagerProject DescriptionKegManager is a software package designed to collect, interpret and display relevant data collected from a kegerator. Each level of this project uses a Microsoft technology, from the .Net micro framework on the hardware to using the new Windows 8 Immersive UI for the frontend. &amp;quot;Kegduino&amp;quot; - the hardwareThis consists of the hardware and software that is actually collecting the data. Everything is built around a Netduino device running the .Net micro framework and connected to a series of sensors that will report information like: flow volume (for pouring), temperature, gas (CO2 or N) pressure etc. This data is then sent over a bluetooth connection to a nearby PC. &amp;quot;KegMonitor&amp;quot; - The data loggerThis software listens to the kegduino, interprets the packets, and writes the data to a datasource for posterity. &amp;quot;KegManager&amp;quot; - The displayUsing the new Windows 8 SDK, this immersive application will display the current status of the kegerator, including what beers are on tap, the current temperature, and will even support facial recognition of users. Here&#39;s a snap of the the main project in the solution...  You get DB diagrams;  WPF Controls...  To even KegReader and KegWriters!  Now how can you go wrong with that? If nothing else, it&#39;s an interesting project to &amp;quot;drink in&amp;quot;&amp;nbsp;  </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Kegerator--Kegduino--KegMonitor--KegManager</link>
      <pubDate>Fri, 15 Feb 2013 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Kegerator--Kegduino--KegMonitor--KegManager</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/b8c7ccb1-e6f5-45cc-b4f9-71182706de3d.png" height="100" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f5afbee6-ba02-46a4-aa6e-94235f53234d.png" height="220" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Kegerator--Kegduino--KegMonitor--KegManager/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Fluent WPF App Building, Xaml and Data Temples, need not apply...</title>
      <description><![CDATA[<p>Today's wild WPF(ish) Wednesday project by Bryan Prendergast is one that might make the WPF purest cringe, might cause you to lift an eyebrow or three, but provides a very unique way of thinking about building WPF applications. If you're looking for a &quot;think outside of the box&quot; for building WPF applications...</p><h2><a href="http://wpfcomposites.codeplex.com/">WPF Composites</a></h2><blockquote><p><strong>&quot;WPF Composites makes WPF so easy that a baby could do it. Think of building blocks . . .&quot;</strong></p><p><strong>WPF Composites</strong> is a project designed to provide an alternative, concise, C# code-behind approach to managing UI Element composites. Composites are normally managed via WPF Databinding and DataTemplates but this library uses <u>ID's and X-Y Coordinates</u> instead to position elements on the screen. This is currently for synchronous apps only or apps that invoke on the UI Thread when working with Composites. This library is still alpha and under-construction. However, I welcome volunteers! NO XAML. NO DATATEMPLATES REQUIRED!</p><p>...</p><p><strong>BEGIN COMPOSITE . . . END COMPOSITE</strong><br>Below is an example for creating a new composite, adding a new Rectangle (automagically instantiating it) to the composite, followed by adding two Textblocks underneath the Rectangle (all in column 0):</p><pre><pre class="brush: csharp">myDockPanel.BeginComposite(myGuid)
.AddAnything&lt;Rectangle, DockPanel(0,0)                
.AddText(1,0, &quot;Hello World 1&quot;)                
.AddText(2,0, &quot;This is text at Row 2 Column 0 in the composite&quot;)                
.EndComposite(new DockArgs(Dock.Left)); </pre></pre><p>The entire composite is then added to myDockPanel at Dock.Left.<br>Typically, objects retrieved from or saved to a SQL database will have a record ID associated with them, either a GUID or a basic IDENTITY number (1-...). It follows then that composites of UI Elements on the screen may also readily be associated with this same ID, the same ID as that used in the database. However, a GUID is not required (as one can be created automatically behind the scenes.)</p><p>This can be an effective way of binding and retrieving a composite set of UI Elements (which may correspond to properties within a C# Class.) Within a single composite tied to an ID, identify X-Y Coordinates for positioning child elements within a Grid within a parent container.</p></blockquote><p>Examples?</p><blockquote><p>I started with a working example of this code-behind approach via <strong>extensions to the WPF ListBox</strong>. I used extension methods because I didn't want developers to have to implement a new custom control.</p><p>This humble start has grown into fair support for 20 IParent controls:<br><strong>Code Examples</strong><br><a href="http://wpfcomposites.codeplex.com/wikipage?title=Grid%20Example&amp;referringTitle=Home">Grid Example</a><br><a href="http://wpfcomposites.codeplex.com/wikipage?title=Dock%20Panel%20Example&amp;referringTitle=Home">Dock Panel Example</a><br><a href="http://wpfcomposites.codeplex.com/wikipage?title=Combo%20Example&amp;referringTitle=Home">Combo Example</a><br><a href="http://wpfcomposites.codeplex.com/wikipage?title=Menu%20Example&amp;referringTitle=Home">Menu Example</a><br><a href="http://wpfcomposites.codeplex.com/wikipage?title=Tree%20View%20Example&amp;referringTitle=Home">Tree View Example</a></p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-109.png" alt="image" width="500" height="305" border="0"></p></blockquote><p>Want to see more?</p><blockquote><p>See C# Demo App Screenshots here: <a href="http://wpfcomposites.codeplex.com/wikipage?title=Demo%20App%20Screenshots&amp;referringTitle=Home">Demo App Screenshots</a><br>This library isn't limited to C#. See an IronPython example here: <a href="http://wpfcomposites.codeplex.com/wikipage?title=Iron%20Python%20Example&amp;referringTitle=Home">Iron Python Example</a><br>Remaining To-Do Items: <a href="http://wpfcomposites.codeplex.com/wikipage?title=To-Do%20List&amp;referringTitle=Home">To-Do List</a><br>Tutorials and Details: <a href="http://wpfcomposites.codeplex.com/wikipage?title=Dictionaries&amp;referringTitle=Home">Dictionaries</a>, <a href="http://wpfcomposites.codeplex.com/wikipage?title=Easy%20as%201-2-3-4-5&amp;referringTitle=Home">Easy as 1-2-3-4-5</a>, <a href="http://wpfcomposites.codeplex.com/wikipage?title=Selectors&amp;referringTitle=Home">Selectors</a></p></blockquote><h2><strong><a href="http://wpfcomposites.codeplex.com/wikipage?title=Demo%20App%20Screenshots&amp;referringTitle=Home">Demo App Screenshots</a></strong></h2><blockquote><p>These screenshots are taken in 1280x1024 screen resolution. The demo app should scale up fine to higher resolutions as long as they maintain this same aspect ratio (better choices could be made in terms of layout and relative positioning in a live production app.)</p><p>A key thing to focus on in these screenshots is the fine-grained control over colors/styles . . . note how many little pieces are exposed for styling via code-behind with no XAML required by the developer.</p><p>In other words, my color choice may be hideous, my design skills old-school or flat, but it's just to show off what is possible, how many items you can change/modify/override?</p><p>In this first shot, I showcase the Grid, TabControl, ListBox, DockPanel, TreeView, DataGrid (with Composites), GroupBox, ComboBox, Dialog, and multiple ScrollViewers.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-53.png" alt="image" width="455" height="364" border="0"></p><p>...</p></blockquote><p>A new, very different means to build WPF applications, one that might appeal to those in the WinForm world.</p><p>Oh and you get the entire source behind this approach too!</p><p><a title="http://wpfcomposites.codeplex.com/SourceControl/BrowseLatest" href="http://wpfcomposites.codeplex.com/SourceControl/BrowseLatest">http://wpfcomposites.codeplex.com/SourceControl/BrowseLatest</a></p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B12%5D-38.png" alt="image" width="445" height="364" border="0"></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:c9153b694d8f49939353a152016b73b8">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Fluent-WPF-App-Building-Xaml-and-Data-Temples-need-not-apply</comments>
      <itunes:summary>Today&#39;s wild WPF(ish) Wednesday project by Bryan Prendergast is one that might make the WPF purest cringe, might cause you to lift an eyebrow or three, but provides a very unique way of thinking about building WPF applications. If you&#39;re looking for a &amp;quot;think outside of the box&amp;quot; for building WPF applications... WPF Composites&amp;quot;WPF Composites makes WPF so easy that a baby could do it. Think of building blocks . . .&amp;quot; WPF Composites is a project designed to provide an alternative, concise, C# code-behind approach to managing UI Element composites. Composites are normally managed via WPF Databinding and DataTemplates but this library uses ID&#39;s and X-Y Coordinates instead to position elements on the screen. This is currently for synchronous apps only or apps that invoke on the UI Thread when working with Composites. This library is still alpha and under-construction. However, I welcome volunteers! NO XAML. NO DATATEMPLATES REQUIRED! ... BEGIN COMPOSITE . . . END COMPOSITEBelow is an example for creating a new composite, adding a new Rectangle (automagically instantiating it) to the composite, followed by adding two Textblocks underneath the Rectangle (all in column 0): myDockPanel.BeginComposite(myGuid)
.AddAnything&amp;lt;Rectangle, DockPanel(0,0)                
.AddText(1,0, &amp;quot;Hello World 1&amp;quot;)                
.AddText(2,0, &amp;quot;This is text at Row 2 Column 0 in the composite&amp;quot;)                
.EndComposite(new DockArgs(Dock.Left)); The entire composite is then added to myDockPanel at Dock.Left.Typically, objects retrieved from or saved to a SQL database will have a record ID associated with them, either a GUID or a basic IDENTITY number (1-...). It follows then that composites of UI Elements on the screen may also readily be associated with this same ID, the same ID as that used in the database. However, a GUID is not required (as one can be created automatically behind the scenes.) This can be an effective way of binding and retrieving</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Fluent-WPF-App-Building-Xaml-and-Data-Temples-need-not-apply</link>
      <pubDate>Wed, 30 Jan 2013 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Fluent-WPF-App-Building-Xaml-and-Data-Temples-need-not-apply</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/cf1ecaf4-e96d-45c0-bb16-c94dc4d37547.png" height="80" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/4ce6638c-2f67-41c9-9bb5-6cdd1bdb69ed.png" height="176" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Fluent-WPF-App-Building-Xaml-and-Data-Temples-need-not-apply/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>WPF</category>
    </item>
  <item>
      <title>AvalonDock v2</title>
      <description><![CDATA[<p>Today's project by Adolfo Marinucci is one that you might of seen and not even known it. It's used in a number of places/app's and lets you create professional looking and interacting applications without you having to break open your piggy bank...</p><p>Like Visual Studio's docking behavior? It's Window Management? It's auto-hiding areas? Want a free [New BSD License (BSD)] WPF control that lets you build the same kind of thing?</p><h2><a href="http://avalondock.codeplex.com/" target="_blank">AvalonDock</a></h2><blockquote><p><strong>Project Description</strong><br>AvalonDock is a WPF controls library which can be used to create a docking layout system like that is present in VisualStudio.</p><p><strong>Features</strong></p><ul><li>Supports MVVM design </li><li>Almost everything can be restyled </li><li>Support for Windows Forms controls </li></ul><p>...</p></blockquote><h2><a href="http://avalondock.codeplex.com/wikipage?title=AvalonDock%202.0%20Getting%20Start%20Guide&amp;referringTitle=Documentation" target="_blank">AvalonDock 2.0 getting started guide PART 1</a></h2><blockquote><p>AvalonDock 2.0 allows to create an interface for WPF very similar to Visual Studio GUI. It's important to understand that has been developed with this in mind so it's most suited for projects that have documents and tools.</p><p>In this tutorial I'll show you how to start using with AvalonDock. Below information are relative to version 2.0 and connot be valid for earlier versions.</p><p>AvalonDock is composed of a layout model, a series of controls representing the views and a DockingManager class which represents the docking area where user can drag and drop documents and tools.</p><p>Looking at the below screenshot we can identify the AvalonDock components.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-106.png" alt="image" width="500" height="334" border="0"></p><ul><li><strong>DockingManager</strong> This is the core control in AvalonDock. It arranges contained panes, handles fly out panes and floating windows. In the above image the DockingManager object contains everything (in WPF terms) from the toolbar on top and the status bar on bottom. DockingManager class also handles saving and restoring layout. </li><li><strong>LayoutPanel</strong> This panel arranges children panes along a direction (selected with property Orientation) adding a resizer between them. Above a LayoutPanel with horizontal orientation arranges three panes: a LayoutAnchorablePane on left, a LayoutDocumentPane in the central area, and a LayoutDockablePane on right. </li><li><strong>LayoutAnchorablePane</strong> This layout element contains a collection of LayoutAnchorable obiects. Usually it arranges contents like a tabcontrol. In the above screenshot LayoutDockablePanes are the container of contents 'Strumenti' and 'Progetti' (Tools and Projects in English) on the left and the container of 'Classi' and 'Proprieta'' (Classes and Properties in English) on the right. A LayoutDockablePane can be auto-hidden (like that containing contents 'Errori'(errors), 'Lista Azioni'(action list) and 'Uscita'(output)) and can be dragged over the DockingManager as floating window or anchored to a border of the parent DockingManager. </li><li><strong>LayoutDocumentPane</strong> A pane of this type contains usually documents (object of type DocumentContent) but optionally can also contain DockableContents object like the above 'Tools' or 'Classes' contents. Above a document content is placed inside a ResizingPanel (horizontally orienteted) in the central area between the too DockablePane object just mentioned. A document pane can't be moved. </li><li><strong>LayoutAnchorable</strong> A anchorable content is the container of application controls. It's always contained in a pane (LayoutAnchorablePane or LayoutDocumentPane). In the above screen shot, LayoutAnchorable objects are the 'classi'(classes) object (which contains a SharpDevelop object), the 'strumenti'(tools) object but also the 'Errori' (errors) (which is in the AutoHidden state and is contained in a autohidden pane). A LayoutAnchorable as name suggests can be dragged away from its container pane and be repositioned into another esisting pane, or to a border of the parent DockingManager or left in a floating window (LayoutAnchorableFloatingWindow). </li><li><strong>LayoutDocument</strong> is a content that can be hosted only in a LayoutDocumentPane. It's a particular content because can't be anchored to a border but can be positioned only into a LayoutDocumentPane or floated in a LayoutDocumentFloatingWindow. Above LayoutDocument objects are the 'program.cs' or 'MainForm.cs' files. </li><li><strong>LayoutFloatingWindow</strong> It's a window that contains contents when are dragged or moved over a DockingManager. A LayoutFloatingWindow (and its specializations LayoutAnchorableFloatingWindow and LayoutDocumentFloatingWindow) derives from Window, and always contains a pane (LayoutAnchorablePane or LayoutDocumentPane) which in turn contains one or more contents (LayoutAnchorable or LayoutDocument). The LayoutFloatingWindow object is created directly from the DockingManager when user start a dragging operation for a content or a DockablePane or manually by code calling the LayoutContent.Float() method. </li><li><strong>LayoutPane</strong> It's a base class for LayoutDockablePane and LayoutDocumentPane. It provides common properties and methods for both. </li><li><strong>LayoutContent</strong> It's a base class for LayoutAnchorable and LayoutDocument. It provides common properties and methods for both. </li></ul><p>...</p></blockquote><p>Here's some snaps from the Dec 4,2012 samples release;</p><p>In firing up the MVVM code sample, there's a couple references you might have to fix up.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B6%5D-61.png" alt="image" width="333" height="265" border="0"></p><p>Just <a href="http://nuget.org/packages/AvalonDock" target="_blank">Nuget for AvalonDock</a>, install and you're good to go. Matter of fact, if you install it via nuget you get a couple additional themes too.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B10%5D-34.png" alt="image" width="329" height="226" border="0"></p><p>The MVVM sample is simple, but that's just fine. Here's a snap of it</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B13%5D-22.png" alt="image" width="500" height="296" border="0"></p><p>And here's a couple snaps of it using the different themes.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B16%5D-23.png" alt="image" width="500" height="333" border="0"></p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B19%5D-14.png" alt="image" width="475" height="364" border="0"></p><p>How hard is it to change a theme? Less than one line of code.</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B22%5D-10.png" alt="image" width="500" height="297" border="0"></p><p>...</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B26%5D-12.png" alt="image" width="347" height="169" border="0"></p><p>Okay, you're a diehard WinForm dev? Feel left out? Don't! There's WinForm support for you too!</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B29%5D-8.png" alt="image" width="500" height="361" border="0"></p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B32%5D-8.png" alt="image" width="500" height="270" border="0"></p><p>So get Docking!</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:2d70ec0652dd42cbba78a14b0155c97e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/AvalonDock-v2</comments>
      <itunes:summary>Today&#39;s project by Adolfo Marinucci is one that you might of seen and not even known it. It&#39;s used in a number of places/app&#39;s and lets you create professional looking and interacting applications without you having to break open your piggy bank... Like Visual Studio&#39;s docking behavior? It&#39;s Window Management? It&#39;s auto-hiding areas? Want a free [New BSD License (BSD)] WPF control that lets you build the same kind of thing? AvalonDockProject DescriptionAvalonDock is a WPF controls library which can be used to create a docking layout system like that is present in VisualStudio. Features Supports MVVM design Almost everything can be restyled Support for Windows Forms controls ... AvalonDock 2.0 getting started guide PART 1AvalonDock 2.0 allows to create an interface for WPF very similar to Visual Studio GUI. It&#39;s important to understand that has been developed with this in mind so it&#39;s most suited for projects that have documents and tools. In this tutorial I&#39;ll show you how to start using with AvalonDock. Below information are relative to version 2.0 and connot be valid for earlier versions. AvalonDock is composed of a layout model, a series of controls representing the views and a DockingManager class which represents the docking area where user can drag and drop documents and tools. Looking at the below screenshot we can identify the AvalonDock components.  DockingManager This is the core control in AvalonDock. It arranges contained panes, handles fly out panes and floating windows. In the above image the DockingManager object contains everything (in WPF terms) from the toolbar on top and the status bar on bottom. DockingManager class also handles saving and restoring layout. LayoutPanel This panel arranges children panes along a direction (selected with property Orientation) adding a resizer between them. Above a LayoutPanel with horizontal orientation arranges three panes: a LayoutAnchorablePane on left, a LayoutDocumentPane in the central area, and a LayoutDocka</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/AvalonDock-v2</link>
      <pubDate>Wed, 23 Jan 2013 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/AvalonDock-v2</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f6b3f210-d097-4b5f-9f39-b02568c65bcd.png" height="67" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/14f20fb2-495c-439a-98cd-23a9cbe6d03c.png" height="147" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/AvalonDock-v2/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>MVVM</category>
      <category>WinForms</category>
      <category>WPF</category>
    </item>
  <item>
      <title>TWC9: Skin Switching, Maps, Entity Framework, Mocks and more</title>
      <description><![CDATA[<p>This week on Channel 9, Clint and Dan discuss the week's top developer news, including;</p><ul><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=42s">[0:42]</a>&nbsp;<a href="http://vdcruijsen.net/2013/01/windows-phone-8-emulator-skin-switcher-1-0-released-on-codeplex/">Windows Phone 8 Emulator Skin Switcher 1.0 released on codeplex</a> (Geert van der Cruijsen ) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=1m43s">[1:43]</a>&nbsp;<a href="http://wp.qmatteoq.com/maps-in-windows-phone-8-and-phone-toolkit-a-winning-team-part-1/">Maps in Windows Phone 8 and Phone toolkit: a winning team – Part 1</a> (Matteo Pagani) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=2m35s">[2:35]</a>&nbsp;<a href="http://www.infragistics.com/community/blogs/marketing/archive/2013/01/16/what-is-new-in-wpf-4-5.aspx">What Is New In WPF 4.5</a> (DevToolsGuy) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=3m36s">[3:36]</a>&nbsp;<a href="http://dotnetsurfers.com/blog/2013/01/15/developer-tools-screencast-linqpad-part-1/">Developer Tools Screencast: LINQPad - Part 1</a> (Latish Sehgal) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=4m46s">[4:46]</a>&nbsp;<a href="http://blogs.msdn.com/b/nishasingh/archive/2013/01/15/integrating-search-with-odata-service-for-team-foundation-server-in-a-windows-store-app.aspx">Integrating Search with OData Service for Team Foundation Server in a Windows Store App</a> (Nisha Singh) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=5m37s">[5:37]</a>&nbsp;<a href="http://blogs.msdn.com/b/lindsay/archive/2013/01/14/part-1-of-9-creating-a-complete-windows-8-game-minus-the-game.aspx">Part 1 of 9: Creating a Complete Windows 8 Game (minus the game)</a> (Lindsay Lindstrom) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=6m34s">[6:34]</a>&nbsp;<a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=855">Introducing Blend for Visual Studio 2012 – Build a simple Windows 8 Store App</a> (Pravinkumar Dabade) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=8m10s">[8:10]</a>&nbsp;<a href="http://blogs.microsoft.co.il/blogs/bnaya/archive/2013/01/13/entity-framework-pro-and-con.aspx">Entity Framework - Pro and Con</a> (Bnaya Eshet) </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=9m18s">[9:18]</a>&nbsp;<a href="http://www.codetails.com/punitganshani/understanding-mock-and-frameworks-part-3-of-n/20130101">Understanding Mock and frameworks – Part 3 of N</a> (Punit Ganshani) </li></ul><p><strong>Picks of the Week!</strong></p><ul><li>Clint's Pick of the Week:<a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=10m38s">[10:38]</a> <a href="http://defensetech.org/2013/01/14/obama-crushes-death-star-dreams/">Obama crushes Death Star dreams</a> (Mike Hoffman) </li><li>Dan's Pick of the Week:<a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-January-18-2013#time=11m41s">[11:41]</a> <a href="http://channel9.msdn.com/coding4fun/kinect/Creating-your-own-Kinect-Night-Vision-with-help-from-the-IR-Stream-IR-Emitter-and-Abhijit" target="_blank">Creating your own Kinect Night Vision with help from the IR Stream, IR Emitter and Abhijit</a> (Abhijit Jana) </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:b5fea4e984f642bab371a149018251fd">]]></description>
      <comments>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-January-18-2013</comments>
      <itunes:summary>This week on Channel 9, Clint and Dan discuss the week&#39;s top developer news, including; [0:42]&amp;nbsp;Windows Phone 8 Emulator Skin Switcher 1.0 released on codeplex (Geert van der Cruijsen ) [1:43]&amp;nbsp;Maps in Windows Phone 8 and Phone toolkit: a winning team – Part 1 (Matteo Pagani) [2:35]&amp;nbsp;What Is New In WPF 4.5 (DevToolsGuy) [3:36]&amp;nbsp;Developer Tools Screencast: LINQPad - Part 1 (Latish Sehgal) [4:46]&amp;nbsp;Integrating Search with OData Service for Team Foundation Server in a Windows Store App (Nisha Singh) [5:37]&amp;nbsp;Part 1 of 9: Creating a Complete Windows 8 Game (minus the game) (Lindsay Lindstrom) [6:34]&amp;nbsp;Introducing Blend for Visual Studio 2012 – Build a simple Windows 8 Store App (Pravinkumar Dabade) [8:10]&amp;nbsp;Entity Framework - Pro and Con (Bnaya Eshet) [9:18]&amp;nbsp;Understanding Mock and frameworks – Part 3 of N (Punit Ganshani) Picks of the Week! Clint&#39;s Pick of the Week:[10:38] Obama crushes Death Star dreams (Mike Hoffman) Dan&#39;s Pick of the Week:[11:41] Creating your own Kinect Night Vision with help from the IR Stream, IR Emitter and Abhijit (Abhijit Jana) </itunes:summary>
      <itunes:duration>794</itunes:duration>
      <link>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-January-18-2013</link>
      <pubDate>Fri, 18 Jan 2013 21:17:16 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-January-18-2013</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/e2d8aab9-3954-4782-9c3c-ce270965f7d7.png" height="56" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/dbdb59ab-089b-4dc7-90c5-1cda0b9222d5.png" height="123" width="220"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/b1caa04b-4b38-4d16-be1d-6d33f8f01d3e.png" height="288" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.mp3" expression="full" duration="794" fileSize="12707631" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.mp4" expression="full" duration="794" fileSize="75595418" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.webm" expression="full" duration="794" fileSize="29331708" type="video/webm" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.wma" expression="full" duration="794" fileSize="6427583" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.wmv" expression="full" duration="794" fileSize="50393819" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9_high.mp4" expression="full" duration="794" fileSize="165036905" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9_mid.mp4" expression="full" duration="794" fileSize="115419939" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9_Source.wmv" expression="full" duration="794" fileSize="153496869" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://smooth.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.ism/manifest" expression="full" duration="794" fileSize="6036" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://media.ch9.ms/ch9/191b/aeda3c9a-faef-4689-98fe-6d5be8da191b/20130118TWC9.wmv" length="50393819" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Clint Rutkas, Dan Fernandez, Greg Duncan</dc:creator>
      <itunes:author>Clint Rutkas, Dan Fernandez, Greg Duncan</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/This+Week+On+Channel+9/TWC9-January-18-2013/RSS</wfw:commentRss>
      <category>Blend</category>
      <category>Entity Framework</category>
      <category>LINQ</category>
      <category>Odata</category>
      <category>Team Foundation Server</category>
      <category>Visual Studio</category>
      <category>WPF</category>
      <category>Game Development</category>
      <category>Windows Store App</category>
    </item>
  <item>
      <title>Kinecting to Google Maps</title>
      <description><![CDATA[<p>Today's project provides a good bit of code to look at and play with. The project's description really undersells all you can learn from it...</p><h2>Using the Microsoft Kinect to control GoogleMap</h2><blockquote><p>The project is a WPF application that uses Microsoft Kinect to control google maps.</p><p>Feel free to learn <strong>WPF MVVM</strong> pattern and <strong>Kinect development</strong> from it!</p></blockquote><p><strong>Project Information URL:</strong> <a title="http://kinectmap.codeplex.com/" href="http://kinectmap.codeplex.com/">http://kinectmap.codeplex.com/</a></p><p><strong>Project Source URL:</strong> <a title="http://kinectmap.codeplex.com/SourceControl/changeset/view/15754" href="http://kinectmap.codeplex.com/SourceControl/changeset/view/15754">http://kinectmap.codeplex.com/SourceControl/changeset/view/15754</a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-201.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-198.png" alt="image" width="320" height="384" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B8%5D-69.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B2%5D-79.png" alt="image" width="313" height="372" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B5%5D-132.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb%5B1%5D-140.png" alt="image" width="520" height="290" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML153a79e4%5B4%5D.png" target="_blank"><img title="SNAGHTML153a79e4" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML153a79e4_thumb%5B1%5D.png" alt="SNAGHTML153a79e4" width="500" height="257" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:6d7a965a171c41fba1c2a1220146577e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Kinecting-to-Google-Maps</comments>
      <itunes:summary>Today&#39;s project provides a good bit of code to look at and play with. The project&#39;s description really undersells all you can learn from it... Using the Microsoft Kinect to control GoogleMapThe project is a WPF application that uses Microsoft Kinect to control google maps. Feel free to learn WPF MVVM pattern and Kinect development from it! Project Information URL: http://kinectmap.codeplex.com/ Project Source URL: http://kinectmap.codeplex.com/SourceControl/changeset/view/15754     </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Kinecting-to-Google-Maps</link>
      <pubDate>Fri, 14 Dec 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Kinecting-to-Google-Maps</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/87b60341-4590-4383-9f1e-db7486d834b8.png" height="54" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f2e534c8-6f6d-46b2-b118-40739042e428.png" height="119" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Kinecting-to-Google-Maps/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>MVVM</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Kinect + OpenCV + WPF = Blob Tracking</title>
      <description><![CDATA[<p>Today's project by Erik Klimczak provides a great example of blending a couple different things together gives us something very yummy and tasty...</p><h2><a href="http://blogs.claritycon.com/blog/2012/11/blob-tracking-kinect-opencv-wpf/">Blob Tracking: Kinect &#43; OpenCV &#43; WPF</a></h2><blockquote><p>With the latest SDK release, the Kinect platform has become pretty robust – skeleton tracking, gesture support, and access to the raw infrared stream all come “out-of-the-box”. Which is great, because if you’ve ever used any of the opensource equivalents, things can get pretty hairy.</p><p>Hands and skeletons are cool and all, but unfortunately <strong>there isn’t an *easy* way to do blob or generic object detection.</strong>. Right now, we’re working on a fun project and ultra fast blob detection is one of the major tech hurdles we’re working through.</p><p>After googlin’ around for blob-tracking with Kinect I came up empty handed. So I decided to look into <a>OpenCV</a> for doing blob detection. Many curse words later, I finally got things working the way I wanted. Along the way I noticed a handful of forums with people looking to do similar object tracking with Kinect, so I figured I would share how I cobbled things together.</p><h4>Demo Overview &amp; Source Code</h4><p>The demo below is showing a couple of key things:</p><ul><li>Consuming the raw Depth image from the Kinect sdk </li><li>Slicing the Depth image to a particular range </li><li>Using OpenCV to perform object/blob tracking </li><li>Rendering OpenCV output with WPF </li></ul><p>...</p><h4>Ok, so what?</h4><p>I know what you’re thinking…so you have some blobs, big deal. And you might be wondering what else you can do with blobs. Well, let me tell you. By using generic blob detection you can not only detect when objects are present, you can also <u>track their size, shape and rotation</u>. For example, its possible to track an open hand transitioning to a closed fist for a grab gesture, or a user holding a wand or prop. Or in our case, we want to very efficiently capture the position of small, fast moving objects that penetrate an “invisible” IR plane. There are a ton of uses for blob detection including <a href="https://www.youtube.com/watch?v=LoJJslLFGd0">surveillance</a>, <a href="https://www.youtube.com/watch?v=8A4416RvAT8">card counting</a>, and even <a href="https://www.youtube.com/watch?v=FnulH8TrZVo">real-time projection mapping</a>.</p><h4>What’s Next</h4><p>While I’m pretty happy with the performance of this solution, I’m curious if it would be better/faster if I rewrote everything with the C&#43;&#43; flavor of the Kinect sdk and coupled it with DirectWrite or XAML to render the UI. Anybody out there do anything like this yet? If so, shoot me a tweet or email.</p><p>We’re currently rolling this stuff into a fun side project that I’ll post about shortly…stay tuned.</p></blockquote><p><strong>Project Information URL:</strong> <a title="http://blogs.claritycon.com/blog/2012/11/blob-tracking-kinect-opencv-wpf/" href="http://blogs.claritycon.com/blog/2012/11/blob-tracking-kinect-opencv-wpf/">http://blogs.claritycon.com/blog/2012/11/blob-tracking-kinect-opencv-wpf/</a></p><p><strong>Project Download URL:</strong> <a title="https://github.com/eklimcz/OpenCV-WPF-Kinect" href="https://github.com/eklimcz/OpenCV-WPF-Kinect">https://github.com/eklimcz/OpenCV-WPF-Kinect</a></p><p><strong>Project Source URL:</strong> <a title="https://github.com/eklimcz/OpenCV-WPF-Kinect" href="https://github.com/eklimcz/OpenCV-WPF-Kinect">https://github.com/eklimcz/OpenCV-WPF-Kinect</a></p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/6hHow9B5obI&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/6hHow9B5obI&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image%5B2%5D-197.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/image_thumb-194.png" alt="image" width="520" height="367" border="0"></a></p><p>Contact Information:</p><ul><li>Blog: <a title="http://blogs.claritycon.com/blog/author/eklimczak/" href="http://blogs.claritycon.com/blog/author/eklimczak/">http://blogs.claritycon.com/blog/author/eklimczak/</a> </li><li>Twitter: <a href="https://twitter.com/#!/eklimcz" target="_blank">@eklimcz</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:ff7e642d9e37451f8881a11301615210">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Kinect--OpenCV--WPF--Blob-Tracking</comments>
      <itunes:summary>Today&#39;s project by Erik Klimczak provides a great example of blending a couple different things together gives us something very yummy and tasty... Blob Tracking: Kinect &amp;#43; OpenCV &amp;#43; WPFWith the latest SDK release, the Kinect platform has become pretty robust – skeleton tracking, gesture support, and access to the raw infrared stream all come “out-of-the-box”. Which is great, because if you’ve ever used any of the opensource equivalents, things can get pretty hairy. Hands and skeletons are cool and all, but unfortunately there isn’t an *easy* way to do blob or generic object detection.. Right now, we’re working on a fun project and ultra fast blob detection is one of the major tech hurdles we’re working through. After googlin’ around for blob-tracking with Kinect I came up empty handed. So I decided to look into OpenCV for doing blob detection. Many curse words later, I finally got things working the way I wanted. Along the way I noticed a handful of forums with people looking to do similar object tracking with Kinect, so I figured I would share how I cobbled things together. Demo Overview &amp;amp; Source CodeThe demo below is showing a couple of key things: Consuming the raw Depth image from the Kinect sdk Slicing the Depth image to a particular range Using OpenCV to perform object/blob tracking Rendering OpenCV output with WPF ... Ok, so what?I know what you’re thinking…so you have some blobs, big deal. And you might be wondering what else you can do with blobs. Well, let me tell you. By using generic blob detection you can not only detect when objects are present, you can also track their size, shape and rotation. For example, its possible to track an open hand transitioning to a closed fist for a grab gesture, or a user holding a wand or prop. Or in our case, we want to very efficiently capture the position of small, fast moving objects that penetrate an “invisible” IR plane. There are a ton of uses for blob detection including surveillance, card counting, an</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Kinect--OpenCV--WPF--Blob-Tracking</link>
      <pubDate>Tue, 27 Nov 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Kinect--OpenCV--WPF--Blob-Tracking</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/407a8dba-5323-41d5-894f-fde1de23fd4f.png" height="70" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/8345570f-2f41-4c65-b285-1de22844606f.png" height="153" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Kinect--OpenCV--WPF--Blob-Tracking/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>WPF</category>
      <category>image manipulation</category>
      <category>OpenCV</category>
    </item>
  <item>
      <title>MJPEG Decoder v1.2 - Now with WinRT, Windows Phone 8 support and samples too</title>
      <description><![CDATA[<p><a href="http://channel9.msdn.com/Niners/BrianPeek">Brian Peek</a> let me know that his project MJPEG Decoder has hit a cool milestone in that it now supports both Windows Phone 8 and WinRT (x86 &amp; ARM). So if you're looking to build an app that decodes MJPEG for a Surface RT or WP8 device, say an app that provides cool touch based security camera features, then this is a library you're going to want to check out...</p><h2><a href="http://mjpeg.codeplex.com/releases/view/98065" target="_blank">MJPEG Decoder v1.2</a></h2><blockquote><h5>Release Notes</h5><ul><li>Added support for WinRT (ARM and x86/x64) </li><li>Added support for Windows Phone 8 </li><li>Added Error event to catch connection exceptions (thanks to Mirek Czerwinski for the idea) <ul><li>Note that the XNA and WP7 assemblies remain at v1.1 and do not contain this addition </li></ul></li><li>Samples for WinRT in C#/XAML and HTML/JavaScript (in source code repository) </li><li>Sample for Windows Phone 8 in C#/XAML (in source code repository) </li></ul></blockquote><h3><a href="http://mjpeg.codeplex.com/" target="_blank">MJPEG Decoder</a></h3><blockquote><p>Library to decode MJPEG streams. Sample code showing usage is included with the distribution. For more information, see the full <a href="http://channel9.msdn.com/coding4fun/articles/MJPEG-Decoder">Coding4Fun Article</a>.</p></blockquote><h3><a href="http://channel9.msdn.com/coding4fun/articles/MJPEG-Decoder" target="_blank">MJPEG Decoder</a></h3><blockquote><p>Last year the Coding4Fun/Channel 9 guys asked me to work on a few things for <a href="http://live.visitmix.com/">MIX10</a>.&nbsp; One of these items was a way to output a webcam stream to Windows Phone 7 for use with Clint's <a href="http://blogs.msdn.com/b/coding4fun/archive/2010/03/16/9979874.aspx">t-shirt cannon project</a> you may have read about.&nbsp; I figured the easiest way to accomplish this was by using a network/IP camera capable of sending a Motion-JPEG stream, which can be easily decoded and displayed that can display a JPEG image.&nbsp; Thus, this library was born.</p><p>It has gone through quite a few changes and I have expanded it to easily display MJPEG streams on a variety of platforms.&nbsp; The developer just references the assembly appropriate to their platform, adds a few lines of code, and away it goes</p><p>...</p></blockquote><p>Here's a snap of the Solution;</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-95.png" alt="image" width="325" height="305" border="0"></p><p>One important to note and that Brain mentions in the article, if you want to play with the test apps, you're going to need a MJPEG video source (which kind of makes sense, doesn't it?). If you've got one, then all you need to do is plug in the URI into the test apps, which as you can see there's a bunch, and off you go...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:c3034878912e4cdd96ffa11301533245">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/MJPEG-Decoder-v12-Now-with-WinRT-Windows-Phone-8-support-and-samples-too</comments>
      <itunes:summary>Brian Peek let me know that his project MJPEG Decoder has hit a cool milestone in that it now supports both Windows Phone 8 and WinRT (x86 &amp;amp; ARM). So if you&#39;re looking to build an app that decodes MJPEG for a Surface RT or WP8 device, say an app that provides cool touch based security camera features, then this is a library you&#39;re going to want to check out... MJPEG Decoder v1.2Release NotesAdded support for WinRT (ARM and x86/x64) Added support for Windows Phone 8 Added Error event to catch connection exceptions (thanks to Mirek Czerwinski for the idea) Note that the XNA and WP7 assemblies remain at v1.1 and do not contain this addition Samples for WinRT in C#/XAML and HTML/JavaScript (in source code repository) Sample for Windows Phone 8 in C#/XAML (in source code repository) MJPEG DecoderLibrary to decode MJPEG streams. Sample code showing usage is included with the distribution. For more information, see the full Coding4Fun Article. MJPEG DecoderLast year the Coding4Fun/Channel 9 guys asked me to work on a few things for MIX10.&amp;nbsp; One of these items was a way to output a webcam stream to Windows Phone 7 for use with Clint&#39;s t-shirt cannon project you may have read about.&amp;nbsp; I figured the easiest way to accomplish this was by using a network/IP camera capable of sending a Motion-JPEG stream, which can be easily decoded and displayed that can display a JPEG image.&amp;nbsp; Thus, this library was born. It has gone through quite a few changes and I have expanded it to easily display MJPEG streams on a variety of platforms.&amp;nbsp; The developer just references the assembly appropriate to their platform, adds a few lines of code, and away it goes ... Here&#39;s a snap of the Solution;  One important to note and that Brain mentions in the article, if you want to play with the test apps, you&#39;re going to need a MJPEG video source (which kind of makes sense, doesn&#39;t it?). If you&#39;ve got one, then all you need to do is plug in the URI into the test apps, which as you can </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/MJPEG-Decoder-v12-Now-with-WinRT-Windows-Phone-8-support-and-samples-too</link>
      <pubDate>Mon, 26 Nov 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/MJPEG-Decoder-v12-Now-with-WinRT-Windows-Phone-8-support-and-samples-too</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f565c2be-2d44-4782-9fe4-c7a9913dd29d.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/26c33b3b-656a-4182-ae8d-7a474a7ac1ae.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/MJPEG-Decoder-v12-Now-with-WinRT-Windows-Phone-8-support-and-samples-too/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>WinForms</category>
      <category>WPF</category>
      <category>video encoding</category>
      <category>WinRT</category>
    </item>
  <item>
      <title>&quot;MVVM Diagram Designer&quot;</title>
      <description><![CDATA[<p>Today's post is from the one and only Sacha Barber where he takes to not only a cool diagramming solution, but in&nbsp;building it&nbsp;with MVVM and, best of all, how we could reuse it in out own applications!</p><h2><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer" target="_blank">MVVM Diagram Designer</a></h2><blockquote><p>A while back a user called &quot;sucram (real name Marcus)&quot;&nbsp; posted a series of articles here about how to create a diagram designer using WPF. Sucrams original links are as follows:</p><ul><li><a href="http://www.codeproject.com/Articles/22952/WPF-Diagram-Designer-Part-1">http://www.codeproject.com/Articles/22952/WPF-Diagram-Designer-Part-1</a> </li><li><a href="http://www.codeproject.com/Articles/23265/WPF-Diagram-Designer-Part-2">http://www.codeproject.com/Articles/23265/WPF-Diagram-Designer-Part-2</a> </li><li><a href="http://www.codeproject.com/Articles/23871/WPF-Diagram-Designer-Part-3">http://www.codeproject.com/Articles/23871/WPF-Diagram-Designer-Part-3</a> </li><li><a href="http://www.codeproject.com/Articles/24681/WPF-Diagram-Designer-Part-4">http://www.codeproject.com/Articles/24681/WPF-Diagram-Designer-Part-4</a> </li></ul><p>I remember being truly blown away by this series of articles, as they showed you how to do the following things:</p><ul><li>Toolbox </li><li>Drag and Drop </li><li>Rubber band selection using Adorners </li><li>Resizing items using Adorners </li><li>Rotating items using Adorners </li><li>Connecting items </li><li>Scrollable designer surface, complete with zoombox </li></ul><p>WOW that sounds fantastic, sounds exactly like the sort of things you would need to create a fully functional diagram designer. Well Yeah, its was and still is, but........the thing is I have used WPF a lot, and trying to use the code attached to sucrams series of article in WPF just wasn't that great. He had taken a very control centric view, in that everything was geared around adding new controls and supplying static styles for said controls.</p><p>In reality it was more like working with a Win Forms application. Not that there is anything wrong with that, and I really truly do not mean to sound ungrateful, as that could not be further from the truth, without that original series of articles it would have taken me a lot longer to come up with a working diagram designer that I was happy with. So for that I am truly grateful, thanks sucram you rock.</p><p>Anyway as I say sucrams original codebase took a very control centric point of view, and added controls using code behind, and held collections of items directly in the diagram surface control. As I say if that is what you want cool, however, it was not what I wanted. What I wanted was</p><ul><li>All of the features of curams original code (actually I didn't want any rotating of items, or resizing of items) </li><li>A more MVVM driven approach, you know allow data binding of items, delete of items via <code>ICommand </code>etc. etc. </li><li>Allow me to control the creation of an entire diagram from within a single ViewModel </li><li>Allow for complex objects to be added to the diagram i.e. ViewModels that I could style using <code>DataTemplate</code>(s). Sucrams original code only allowed simply strings to be used as a <code>DataContext </code>which would control what <code>ImageSource </code>an <code>Image </code>would use to show for a diagram item. I needed my items to be quite rich and allow popups to be shown and associated with the diagram item, such that the data related to the diagram item could be manipulated </li><li>Allow me to save the diagram to some backing store </li><li>Allow me to load a previously saved diagram from some backing store </li></ul><p>To this end I have pretty much completely re-written sucrams original code, I think there is probably about 2 classes that stayed the same, there is now more code, a lot more, however from an end user experience, I think it is now dead easy to control the creation of diagrams from a centralized ViewModel, which allows a diagram to be created via well known WPF paradigms like <code>Binding</code>/<code>DataTemplating</code>.</p><p>For example this is how the attached DemoApp code creates a simple diagram that is shown when you first run the DemoApp:</p><p><pre class="brush: csharp">public partial class Window1 : Window
{
    private Window1ViewModel window1ViewModel;

    public Window1()
    {
        InitializeComponent();

        window1ViewModel = new Window1ViewModel();
        this.DataContext = window1ViewModel;
        this.Loaded &#43;= new RoutedEventHandler(Window1_Loaded);
    }


    /// &lt;summary&gt;
    /// This shows you how you can create diagram items in code
    /// &lt;/summary&gt;
    void Window1_Loaded(object sender, RoutedEventArgs e)
    {
        SettingsDesignerItemViewModel item1 = new SettingsDesignerItemViewModel();
        item1.Parent = window1ViewModel.DiagramViewModel;
        item1.Left = 100;
        item1.Top = 100;
        window1ViewModel.DiagramViewModel.Items.Add(item1);

        PersistDesignerItemViewModel item2 = new PersistDesignerItemViewModel();
        item2.Parent = window1ViewModel.DiagramViewModel;
        item2.Left = 300;
        item2.Top = 300;
        window1ViewModel.DiagramViewModel.Items.Add(item2);

        ConnectorViewModel con1 = new ConnectorViewModel(item1.RightConnector, item2.TopConnector);
        con1.Parent = window1ViewModel.DiagramViewModel;
        window1ViewModel.DiagramViewModel.Items.Add(con1);
    }
}
</pre></p><p>As the article progresses I will show you how to use the new MVVM driven diagram designer classes in your own applications, and you could leave it right there if you wanted to, but if you want to know how it all works that will be explained in the rest of the article.</p><p>...</p><ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Introduction">Introduction</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#What-Does-It-Look-Like">What Does It Look Like</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Attached-Codebase-Structure">Attached Codebase Structure</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#How-Do-I-Use-It-In-My-Own-Applications">How Do I Use It In My Own Applications</a> <ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-1-:-Creating-The-Raw-XAML">Use It Step 1 : Creating The Raw XAML</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-2-:-Creating-The-Main-ViewModel">Use It Step 2 : Creating The Main ViewModel</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-3-:-Creating-Toolbox-Item-DataTemplates">Use It Step 3 : Creating Toolbox Item DataTemplates</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-4-:-Creating-The-Diagram-Item-ViewModels">Use It Step 4 : Creating The Diagram Item ViewModels</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-5-:-Creating-Diagram-Item-Designer-Surface-DataTemplates">Use It Step 5 : Creating Diagram Item Designer Surface DataTemplates</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-6-:-Creating-Diagram-Item-Popup-DataTemplates">Use It Step 6 : Creating Diagram Item Popup DataTemplates</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Use-It-Step-7-:-Persistence">Use It Step 7 : Persistence</a> <ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#What-Are-The-Important-Things-To-Save">What Are The Important Things To Save</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Saving/Hydrating-A-Diagram">Saving/Hydrating A Diagram</a> </li></ul></li></ul></li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#How-Does-The-Diagram-Designer-Stuff-Actually-Work">How Does The Diagram Designer Stuff Actually Work</a> <ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Drag-And-Drop-To-The-Design-Surface">Drag And Drop To The Design Surface</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Binding-The-Items-Collection">Binding The Items Collection</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Adding-Connections">Adding Connections</a> <ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#ConnectorInfoBase/PartCreatedConnectorInfo">ConnectorInfoBase/PartCreatedConnectorInfo</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#FullyCreatedConnectorInfo">FullyCreatedConnectorInfo</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#ConnectorViewModel">ConnectorViewModel</a> </li></ul></li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Selection/Deselection">Selection/Deselection</a> <ul><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Flavour-1-:-Standard-Mouse-Down-Selection">Flavour 1 : Standard Mouse Down Selection</a> </li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Flavour-2-:-Rubberband-Selection">Flavour 2 : Rubberband Selection</a> </li></ul></li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#Deleting-Items">Deleting Items</a> </li></ul></li><li><a href="http://www.codeproject.com/Articles/484616/MVVM-Diagram-Designer#That's-It-For-Now">That's It For Now</a> </li></ul></blockquote><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-94.png" alt="image" width="500" height="281" border="0"></p><blockquote><h3>How Do I Use It In My Own Applications</h3><p>This section will talk you through how to create a diagram in your own application. It assumes the following</p><ul><li>That you want to use WPF things like Binding/DataTemplating/MVVM </li><li>You actually want to persist / hydrate diagrams to some backing store (Like I say I chose to use RavenDB which is a no sql document database, but if this is not for you, it should be pretty easy for you to craft your own data access layer talking to your preferred SQL backend) </li></ul><p>If you want to create your own MVVM style diagram designer, I have broken it down into 7 easy steps, as long as you follow these 7 steps to the letter you should be just fine. There is also a working example of these 7 steps by way of the attached <code>DemoApp </code>project code, so you can examine that whilst reading this text, so hopefully you will be ok.</p><p>...</p></blockquote><p>I love that he takes the time to share how we can use this in our own app's.</p><p>Here's a snap of it running on my system (which was easy and painless)</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-47.png" alt="image" width="500" height="298" border="0"></p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-28.png" alt="image" width="295" height="384" border="0"></p><p>One other thing of note is how RavenDB is used as the data store. If you've been hearing about NoSQL but haven't had a chance to see it in use, well here's you chance! It's all here in the download, nothing extra needed.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:8cc57eba6b6849728666a10c0164b7db">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/MVVM-Diagram-Designer</comments>
      <itunes:summary>Today&#39;s post is from the one and only Sacha Barber where he takes to not only a cool diagramming solution, but in&amp;nbsp;building it&amp;nbsp;with MVVM and, best of all, how we could reuse it in out own applications! MVVM Diagram DesignerA while back a user called &amp;quot;sucram (real name Marcus)&amp;quot;&amp;nbsp; posted a series of articles here about how to create a diagram designer using WPF. Sucrams original links are as follows: http://www.codeproject.com/Articles/22952/WPF-Diagram-Designer-Part-1 http://www.codeproject.com/Articles/23265/WPF-Diagram-Designer-Part-2 http://www.codeproject.com/Articles/23871/WPF-Diagram-Designer-Part-3 http://www.codeproject.com/Articles/24681/WPF-Diagram-Designer-Part-4 I remember being truly blown away by this series of articles, as they showed you how to do the following things: Toolbox Drag and Drop Rubber band selection using Adorners Resizing items using Adorners Rotating items using Adorners Connecting items Scrollable designer surface, complete with zoombox WOW that sounds fantastic, sounds exactly like the sort of things you would need to create a fully functional diagram designer. Well Yeah, its was and still is, but........the thing is I have used WPF a lot, and trying to use the code attached to sucrams series of article in WPF just wasn&#39;t that great. He had taken a very control centric view, in that everything was geared around adding new controls and supplying static styles for said controls. In reality it was more like working with a Win Forms application. Not that there is anything wrong with that, and I really truly do not mean to sound ungrateful, as that could not be further from the truth, without that original series of articles it would have taken me a lot longer to come up with a working diagram designer that I was happy with. So for that I am truly grateful, thanks sucram you rock. Anyway as I say sucrams original codebase took a very control centric point of view, and added controls using code behind, and held collec</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/MVVM-Diagram-Designer</link>
      <pubDate>Wed, 21 Nov 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/MVVM-Diagram-Designer</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/8eb3411b-20f4-42b6-8b1d-5078ff043e38.png" height="56" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/94ba90ca-19b4-4604-b612-22af4bbc1ce7.png" height="124" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/MVVM-Diagram-Designer/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>MVVM</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Boxing Bots: An Overview</title>
      <description><![CDATA[<h2>Introduction</h2><p>In early January, we were tasked with creating a unique, interactive experience for the <a href="http://sxsw.com/interactive">SXSW Interactive</a> launch party with <a href="http://www.frogdesign.com/">Frog Design</a>. We bounced around many ideas, and finally settled on a project that Rick suggested during our first meeting: boxing robots controlled via Kinect.</p><p>The theme of the opening party was Retro Gaming, so we figured creating a life size version of a classic tabletop boxing game mashed up with a &quot;Real Steel&quot;-inspired Kinect experience would be a perfect fit. Most importantly, since this was going to be the first big project of the new Coding4Fun team, we wanted to push ourselves to create an experience that needed each of us to bring our unique blend of hardware, software, and interaction magic to the table under an aggressively tight deadline.</p><h2>Hardware</h2><p>The BoxingBots had to be fit a few requirements:</p><ol><li>They had to be fun </li><li>They had to survive for 4 hours, the length of the SXSW opening party </li><li>Each robot had to punch for 90 seconds at a time, the length of a round </li><li>They had to be life-size </li><li>They had to be Kinect-drivable </li><li>They had to be built, shipped, and reassembled for SXSW </li></ol><p>Creating a robot that could be beaten up for 4 hours and still work proved to be an interesting problem. After doing some research on different configurations and styles, it was decided we should leverage a prior project to get a jump start to meet the deadline. We repurposed sections of our Kinect drivable lounge chair, <a href="http://channel9.msdn.com/coding4fun/articles/Jellybean-the-Kinect-Drivable-Lounge-Chair">Jellybean</a>! This was an advantage because it contained many known items, such as the motors, motor controllers, and chassis material.&nbsp; Additionally, it was strong and fast, it was modular, and the code to drive it was already written.</p><p>Jellybean would only get us part of the way there, however.&nbsp; We also had to do some retrofitting to get it to work for our new project. The footprint of the base needed to shrink from 32x50 inches to 32x35 inches, while still allowing space to contain all of the original batteries, wheels, motors, motor controllers, switches, voltage adapters. We also had to change how the motors were mounted with this new layout, as well as provide for a way to easily &quot;hot swap&quot; the batteries out during the event. Finally, we had to mount an upper body section that looked somewhat human, complete with a head and punching arms.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0087%5B4%5D.jpg"><img title="IMG_0087" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0087_thumb%5B1%5D.jpg" alt="IMG_0087" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0089%5B9%5D.jpg"><img title="IMG_0089" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0089_thumb%5B4%5D.jpg" alt="IMG_0089" width="240" height="180" border="0"></a><br><strong>Experimenting with possible layouts</strong></p><p>The upper body had its own challenges, as it had to support a ton of equipment, including:</p><ul><li>Punching arms </li><li>Popping head </li><li>Pneumatic valves </li><li>Air manifold </li><li>Air Tank(s) </li><li>Laptop </li><li>Phidget interface board </li><li>Phidget relay boards </li><li>Phidget LED board </li><li>Xbox wireless controller PC transmitter / receiver </li><li>Chest plate </li><li>LEDs </li><li>Sensors to detect a punch </li></ul><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0113%5B5%5D.jpg"><img title="IMG_0113" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0113_thumb%5B2%5D.jpg" alt="IMG_0113" width="500" height="667" border="0"></a><br><strong>Brian and Rick put together one of the upper frames</strong></p><h3>Punching and Air Tanks</h3><p>We had to solve the problem of getting each robot to punch hard enough to register a hit on the opponent bot while not breaking the opponent bot (or itself). Bots also had to withstand a bit of side load in case the arms got tangled or took a side blow. Pneumatic actuators provided us with a lot of flexibility over hydraulics or an electrical solution since they are fast, come in tons of variations, won't break when met with resistance, and can fine tuned with a few onsite adjustments.</p><p>To provide power to the actuators, the robots had two 2.5 gallon tanks pressurized to 150psi, with the actuators punching at ~70psi.&nbsp; We could punch for about five 90-second rounds before needing to re-pressurize the tanks.&nbsp; Pressurizing the onboard tanks was taken care of by a pair of off-the-shelf DeWalt air compressors.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0134%5B4%5D.jpg"><img title="IMG_0134" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0134_thumb%5B1%5D.jpg" alt="IMG_0134" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0184%5B4%5D.jpg"><img title="IMG_0184" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0184_thumb%5B1%5D.jpg" alt="IMG_0184" width="240" height="180" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0279%5B4%5D.jpg"><img title="IMG_0279" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0279_thumb%5B1%5D.jpg" alt="IMG_0279" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0172%5B4%5D.jpg"><img title="IMG_0172" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0172_thumb%5B1%5D.jpg" alt="IMG_0172" width="240" height="180" border="0"></a></p><h3>The Head</h3><p>It wouldn’t be a polished game if the head didn’t pop up on the losing bot, so we added another pneumatic actuator to raise and lower the head, and some extra red and blue LEDs. This pneumatic is housed in the chest of the robot and is triggered only when the game has ended.</p><p>To create the head, we first prototyped a concept with cardboard and duct tape. A rotated welding mask just happened to provide the shape we were going for on the crown, and we crafted each custom jaw with a laser cutter.&nbsp; We considered using a mold and vacuum forming to create something a bit more custom, but had to scrap the idea due to time constraints.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0169%5B4%5D.jpg"><img title="IMG_0169" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0169_thumb%5B1%5D.jpg" alt="IMG_0169" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0201%5B4%5D.jpg"><img title="IMG_0201" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0201_thumb%5B1%5D.jpg" alt="IMG_0201" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0268%5B4%5D.jpg"><img title="IMG_0268" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0268_thumb%5B1%5D.jpg" alt="IMG_0268" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0291%5B4%5D.jpg"><img title="IMG_0291" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0291_thumb%5B1%5D.jpg" alt="IMG_0291" width="240" height="180" border="0"></a></p><h3>Sensors</h3><p>Our initial implementation for detecting punches failed due to far too many false positives. We thought using IR distance sensors would be a good solution since we could detect a “close” punch and tell the other robot to retract the arm before real contact. The test looked promising, but in practice, when the opposite sensors were close, we saw a lot of noise in the data. The backup and currently implemented solution was to install simple push switches in the chest and detect when those are clicked by the chest plate pressing against them.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0200%5B4%5D.jpg"><img title="IMG_0200" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0200_thumb%5B1%5D.jpg" alt="IMG_0200" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0205%5B4%5D.jpg"><img title="IMG_0205" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0205_thumb%5B1%5D.jpg" alt="IMG_0205" width="240" height="180" border="0"></a></p><h3>Power</h3><p>Different items required different voltages. The motors and pneumatic valves required 24V, the LEDs required 12V and the USB hub required 5V. We used Castle Pro BEC converters to step down the voltages. These devices are typically used in RC airplanes and helicopters.</p><h3>Shipping</h3><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0278%5B4%5D.jpg"><img title="IMG_0278" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0278_thumb%5B1%5D.jpg" alt="IMG_0278" width="240" height="180" border="0"></a>&nbsp;<a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0280%5B4%5D.jpg"><img title="IMG_0280" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0280_thumb%5B1%5D.jpg" alt="IMG_0280" width="240" height="180" border="0"></a></p><p>So how does someone ship two 700lb robots from Seattle to Austin? We did it in 8 crates. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />. The key thing to note is that the tops and bottoms of each robot were separated. Any wire that connected the two parts had to be able to be disconnected in some form. This affected the serial cords and the power cords (5V, 12V, 24V).</p><h2>Software</h2><p>The software and architecture went through a variety of iterations during development. The final architecture used 3 laptops, 2 desktops, an access point, and a router. It's important to note that the laptops of Robot 1 and Robot 2 are physically mounted on the backs of each Robot body, communicating through WiFi to the Admin console. The entire setup looks like the following diagram:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/network%5B4%5D.png"><img title="network" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/network_thumb%5B2%5D.png" alt="network" width="387" height="426" border="0"></a></p><h3><strong>Admin Console</strong></h3><p>The heart of the infrastructure is the Admin Console. Originally, this was also intended to be a scoreboard to show audience members the current stats of the match, but as we got further into the project, we realized this wouldn't be necessary. The robots are where the action is, and people's eyes focus there. Additionally, the robots themselves display their current health status via LEDs, so duplicating this information isn't useful. However, the admin side of this app remains.</p><h3><strong>Sockets</strong></h3><p>The admin console is the master controller for the game state and utilizes socket communication between it, the robots, and the user consoles. A generic socket handler was written to span each computer in the setup. The <strong>SocketListener</strong> object allows for incoming connections to be received, while the <strong>SocketClient</strong> allows clients to connect to those <strong>SocketListeners</strong>. These are generic objects, which must specify objects of type <strong>GamePacket</strong> to send and receive:</p><p><pre class="brush: csharp">
public class SocketListener&lt;TSend, TReceive&gt; where TSend : GamePacket                                                
                                             where TReceive : GamePacket, new()
</pre></p><p><br>&nbsp;</p><p><strong>GamePacket</strong> is a base class from which specific packets inherit:</p><p><pre class="brush: csharp">
public abstract class GamePacket
{
    public byte[] ToByteArray() 
    {   
        MemoryStream ms = new MemoryStream();           
        BinaryWriter bw = new BinaryWriter(ms);
                
        try
        {           
            WritePacket(bw);
        }
        catch(IOException ex)
        {
            Debug.WriteLine(&quot;Error writing packet: &quot; &#43; ex);
        }
        
        return ms.ToArray();
    }
        
    public void FromBinaryReader(BinaryReader br)
    {        
        try
        {    
            ReadPacket(br);       
        }
        catch(IOException ex)       
        {
            Debug.WriteLine(&quot;Error reading packet: &quot; &#43; ex);
        }
    }
    
    public abstract void WritePacket(BinaryWriter bw);
    public abstract void ReadPacket(BinaryReader br);
}
</pre></p><p>For example, in communication between the robots and the admin console, <strong>GameStatePacket</strong> and <strong>MovementDescriptorPacket</strong> are sent and received. Each <strong>GamePacket</strong> must implement its own <strong>ReadPacket</strong> and <strong>WritePacket</strong> methods to serialize itself for sending across the socket.</p><p>Packets are sent between machines every &quot;frame&quot;. We need the absolute latest game state, robot movement, etc. at all times to ensure the game is functional and responsive.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B20%5D-2.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B12%5D-3.png" alt="image" width="640" height="278" border="0"></a></p><p>As is quite obvious, absolutely no effort was put into making the console &quot;pretty&quot;. This is never seen by the end users and just needs to be functional. Once the robot software and the user consoles are started, the admin console initiates connections to each of those four machines. Each machine runs the <strong>SocketListener</strong> side of the socket code, while the Admin console creates four <strong>SocketClient</strong> objects to connect to each those. Once connected, the admin has control of the game and can start, stop, pause, and reset a match by sending the appropriate packets to everyone that is connected.</p><h3><strong>Robot</strong></h3><p>The robot UI is also never intended to be seen by an end user, and therefore contains only diagnostic information.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B19%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B11%5D-1.png" alt="image" width="640" height="361" border="0"></a></p><p>Each robot has a wireless Xbox 360 controller connected to it so it can be manually controlled. The UI above reflects the positions of the controller sticks and buttons. During a match, it's possible for a bot to get outside of our &quot;safe zone&quot;. One bot might be pushing the other, or the user may be moving the bot toward the edge of the ring. To counter this, the player's coach can either temporarily move the bot, turning off Kinect input, or force the game into &quot;referee mode&quot; which pauses the entire match and turns off Kinect control on both sides. In either case, the robots can be driven with the controllers and reset to safe positions. Once both coaches signal that the robots are reset, the admin can then resume the match.</p><h3>Controlling Hardware</h3><p>Phidget hardware controlled our LEDs, relays, and sensors. Getting data out of a Phidget along with actions, such as opening and closing a relay, is shockingly easy as they have pretty straightforward C# APIs and samples, which is why they typically are our go-to product for projects like this.</p><p>Below are some code snippets for the LEDs, relays, and sensor.</p><p><strong>LEDs – from LedController.cs</strong></p><p>This is the code that actually updates the health LEDs in the robot's chest. The LEDs were put on the board in a certain order to allow this style of iteration. We had a small issue of running out of one color of LEDs so we used some super bright ones and had to reduce the power levels to the non-super bright LEDs to prevent possible damage:</p><p><pre class="brush: csharp">
private void UpdateLedsNonSuperBright(int amount, int offset, int brightness)
{
    for (var i = offset; i &lt; amount &#43; offset; i&#43;&#43;)
    {
        _phidgetLed.leds[i] = brightness / 2;
    }
}

private void UpdateLedsSuperBright(int amount, int offset, int brightness)
{
    for (var i = offset; i &lt; amount &#43; offset; i&#43;&#43;)
    {
        _phidgetLed.leds[i] = brightness;
    }
}
</pre></p><p>&nbsp;</p><p><strong>Sensor data – from SensorController.cs</strong></p><p>This code snippet shows how we obtain the digital and analog inputs from the Phidget 8/8/8 interface board:</p><p><pre class="brush: csharp">
public SensorController(InterfaceKit phidgetInterfaceKit) : base(phidgetInterfaceKit)
{    
    PhidgetInterfaceKit.ratiometric = true;
}

public int PollAnalogInput(int index)
{
    return PhidgetInterfaceKit.sensors[index].Value;
}

public bool PollDigitalInput(int index)
{
    return PhidgetInterfaceKit.inputs[index];
}
</pre></p><p>&nbsp;</p><p><strong>Relays – from RelayController.cs</strong></p><p>Electrical relays fire our pneumatic valves. These control the head popping and the arms punching. For our application, we wanted the ability to reset the relay automatically. When the relay is opened, an event is triggered and we create an actively polled thread to validate whether we should close the relay. The reason why we actively poll is someone could be quickly toggling the relay. We wouldn't want to close it on accident. The polling and logic does result in a possible delay or early trigger for closing the relay, but for the BoxingBots the difference of 10ms for a relay closing is acceptable:</p><p><pre class="brush: csharp">
public void Open(int index, int autoCloseDelay)
{   
    UseRelay(index, true, autoCloseDelay);
}

public void Close(int index)
{
    UseRelay(index, false, 0);
}

private void UseRelay(int index, bool openRelay, int autoCloseDelay)
{
    AlterTimeDelay(index, autoCloseDelay);
    PhidgetInterfaceKit.outputs[index] = openRelay;
}

void _relayController_OutputChange(object sender, OutputChangeEventArgs e)
{
    // closed
    if (!e.Value)
        return;

    ThreadPool.QueueUserWorkItem(state =&gt;
    {                                          
        if (_timeDelays.ContainsKey(e.Index))
        {                                              
            while (_timeDelays[e.Index] &gt; 0)                       
            {
                Thread.Sleep(ThreadTick);           
                _timeDelays[e.Index] -= ThreadTick;
            }                                            
        }
                                            
        Close(e.Index);
                                        
    });
}

public int GetTimeDelay(int index)
{
    if (!_timeDelays.ContainsKey(index))
        return 0;
    return _timeDelays[index];
}

public void AlterTimeDelay(int index, int autoCloseDelay)
{
    _timeDelays[index] = autoCloseDelay;
}
</pre></p><p>&nbsp;</p><h3><strong>User Console</strong></h3><p>&nbsp;</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0297%5B5%5D.jpg"><img title="IMG_0297" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0297_thumb%5B2%5D.jpg" alt="IMG_0297" width="500" height="375" border="0"></a></p><p>Since the theme of the party was Retro Gaming, we wanted to go for an early 80's Sci-fi style interface, complete with starscape background and solar flares! We wanted to create actual interactive elements, though, to maintain the green phosphor look of early monochrome monitors. Unlike traditional video games, however, the screens are designed not as the primary focus of attention, but rather to help calibrate the player before the round and provide secondary display data during the match. The player should primarily stay focused on the boxer during the match, so the interface is designed to sit under the players view line and serve as more of a dashboard during each match.</p><p>However, during calibration before each round, it is important to have the player understand how their core body will be used to drive the Robot base during each round. To do this, we needed to track an average of the joints that make up each fighter's body core. We handled the process by creating a list of core joints and a variable that normalizes the metric distances returned from the Kinect sensor into a human-acceptable range of motion:</p><p><pre class="brush: csharp">
private static List&lt;JointType&gt; coreJoints = newList&lt;JointType&gt;( 
    newJointType[] {
        JointType.AnkleLeft,
        JointType.AnkleRight,
        JointType.ShoulderCenter,
        JointType.HipCenter
    });
private const double RangeNormalizer = .22;
private const double NoiseClip = .05;
</pre></p><p>And then during each skeleton calculation called by the game loop, we average the core positions to determine the averages of the players as they relate to their playable ring boundary:</p><p><pre class="brush: csharp">
public staticMovementDescriptorPacket AnalyzeSkeleton(Skeleton skeleton)
{           
    // ...

    CoreAverageDelta.X = 0.0;
    CoreAverageDelta.Z = 0.0;
    foreach (JointType jt in CoreJoints)
    {
        CoreAverageDelta.X &#43;= skeleton.Joints[jt].Position.X - RingCenter.X;
        CoreAverageDelta.Z &#43;= skeleton.Joints[jt].Position.Z - RingCenter.Z;
    }

    CoreAverageDelta.X /= CoreJoints.Count * RangeNormalizer;
    CoreAverageDelta.Z /= CoreJoints.Count * RangeNormalizer;

    // ...

    if (CoreAverageDelta.Z &gt; NoiseClip || CoreAverageDelta.Z &lt; -NoiseClip)
    {
        packet.Move = -CoreAverageDelta.Z;
    }

    if (CoreAverageDelta.X &gt; NoiseClip || CoreAverageDelta.X &lt; -NoiseClip)
    {
        packet.Strafe = CoreAverageDelta.X;
    }
}
</pre></p><p>In this way, we filter out insignificant data noise and allow the player's average core body to serve as a joystick for driving the robot around. Allowing them to lean at any angle, the move and strafe values are accordingly set to allow for a full 360 degrees of movement freedom, while at the same time not allowing any one joint to unevenly influence their direction of motion.</p><p>Another snippet of code that may be of interest is the WPF3D rendering we used to visualize the skeleton. Since the Kinect returns joint data based off of a center point, it is relatively easy to wire up a working 3D model in WPF3D off of the skeleton data, and we do this in the ringAvatar.xaml control.</p><p>In the XAML, we simply need a basic <strong>Viewport3D</strong> with camera, lights, and an empty <strong>ModelVisual3D</strong> container to hold or squares. The empty container looks like this:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p><p><pre class="brush: xml">
&lt;ModelVisual3D x:Name=&quot;viewportModelsContainer2&quot;&gt;                   
    &lt;ModelVisual3D.Transform&gt;
        &lt;Transform3DGroup&gt;           
            &lt;RotateTransform3D x:Name=&quot;bodyRotationCenter&quot; CenterX=&quot;0&quot; CenterY=&quot;0&quot; CenterZ=&quot;0&quot;&gt;      
                &lt;RotateTransform3D.Rotation&gt;             
                    &lt;AxisAngleRotation3D x:Name=&quot;myAngleRotation&quot; Axis=&quot;0,1,0&quot; Angle=&quot;-40&quot;/&gt;                 
                &lt;/RotateTransform3D.Rotation&gt;           
            &lt;/RotateTransform3D&gt; 
        &lt;/Transform3DGroup&gt; 
    &lt;/ModelVisual3D.Transform&gt;
&lt;/ModelVisual3D&gt;
</pre></p><p>In the code, we created a generic <strong>WPF3DModel</strong> that inherits from <strong>UIElement3D</strong> and is used to store the basic positioning properties of each square. In the constructor of the object, though, we can pass a reference key to a XAML file that defines the 3D mesh to use:</p><p><pre class="brush: csharp">
public WPF3DModel(string resourceKey)
{
    this.Visual3DModel = Application.Current.Resources[resourceKey] as Model3DGroup;
}
</pre></p><p>This is a handy trick when you need to do a fast WPF3D demo and require a certain level of flexibility. To create a 3D cube for each joint when ringAvatar is initialized, we simply do this:</p><p><pre class="brush: csharp">
private readonly List&lt;WPF3DModel&gt; _models = new List&lt;WPF3DModel&gt;();
private void CreateViewportModels()
{           
    for (int i = 0; i &lt; 20; i&#43;&#43;)
    { 
        WPF3DModel model = new WPF3DModel(&quot;mesh_cube&quot;);
        viewportModelsContainer2.Children.Add(model);

        // ...

        _models.Add(model);
    }

    // ...
}
</pre></p><p>And then each time we need to redraw the skeleton, we loop through the skeleton data and set the cube position like so:</p><p><pre class="brush: csharp">
if (SkeletonProcessor.RawSkeleton.TrackingState == SkeletonTrackingState.Tracked)
{
    int i = 0;  

    foreach (Joint joint in SkeletonProcessor.RawSkeleton.Joints)
    {
        if (joint.TrackingState == JointTrackingState.Tracked)
        {
                                        
            _models[i].Translate(                                        
                joint.Position.X * 8.0,                                    
                joint.Position.Y * 10.0,
                joint.Position.Z * -10.0);

            i&#43;&#43;;
        }
    }

    // ...

}
</pre></p><p>There are a few other areas in the User Console that you may want to further dig into, including the weighting for handling a punch as well dynamically generating arcs based on the position of the fist to the shoulder. However, for this experience, the User Console serves as a secondary display to support the playing experience and gives both the player and audience a visual anchor for the game.</p><h3>Making a 700lb Tank Drive like a First Person Shooter</h3><p>The character in a first person shooter (FPS) video game has an X position, a Y position, and a rotation vector. On an Xbox controller, the left stick controls the X,Y position. Y is the throttle (forward and backward), X is the strafing amount (left and right), and the right thumb stick moves the camera to change what you're looking at (rotation).&nbsp; When all three are combined, the character can do things such as run around someone while looking at them.</p><p>In the prior project, we had existing code that worked for controlling all 4 motors at the same time, working much like a tank does, so we only had throttle (forward and back) and strafing (left and right). Accordingly, we can move the motors in all directions, but there are still scenarios in which the wheels fight one another and the base won't move. By moving to a FPS style, we eliminate the ability to move the wheels in an non-productive way and actually make it a lot easier to drive.</p><p>Note that Clint had some wiring &quot;quirks&quot; with polarity and which motor was left VS right, he had to correct in these quirks in software <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />:</p><p><pre class="brush: csharp">
public Speed CalculateSpeed(double throttleVector, double strafeVector, double rotationAngle)
{
    rotationAngle = VerifyLegalValues(rotationAngle);
    rotationAngle = AdjustValueForDeadzone(rotationAngle, AllowedRotationAngle, _negatedAllowedRotationAngle);

    // flipped wiring, easy fix is here  
    throttleVector *= -1;
    rotationAngle *= -1;
    
    // miss wired, had to flip throttle and straff for calc
    return CalculateSpeed(strafeVector &#43; rotationAngle, throttleVector, strafeVector - rotationAngle, throttleVector);
}

protected Speed CalculateSpeed(double leftSideThrottle, double leftSideVectorMultiplier, double rightSideThrottle, double rightSideVectorMultiplier) 
{ /* code from Jellybean */ }
</pre></p><h2>Conclusion</h2><p>The Boxing Bots project was one of the biggest things we have built to date. It was also one of our most successful projects. Though it was a rainy, cold day and night in Austin when the bots were revealed, and we had to move locations several times during setup to ensure the bots and computers wouldn't be fried by the rain, they ran flawlessly for the entire event and contestants seemed to have a lot of fun driving them.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0302%5B5%5D.jpg"><img title="IMG_0302" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/IMG_0302_thumb%5B2%5D.jpg" alt="IMG_0302" width="500" height="375" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:247dcab61560403d8e5da04e01521034">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Boxing-Bots-An-Overview</comments>
      <itunes:summary>IntroductionIn early January, we were tasked with creating a unique, interactive experience for the SXSW Interactive launch party with Frog Design. We bounced around many ideas, and finally settled on a project that Rick suggested during our first meeting: boxing robots controlled via Kinect. The theme of the opening party was Retro Gaming, so we figured creating a life size version of a classic tabletop boxing game mashed up with a &amp;quot;Real Steel&amp;quot;-inspired Kinect experience would be a perfect fit. Most importantly, since this was going to be the first big project of the new Coding4Fun team, we wanted to push ourselves to create an experience that needed each of us to bring our unique blend of hardware, software, and interaction magic to the table under an aggressively tight deadline. HardwareThe BoxingBots had to be fit a few requirements: They had to be fun They had to survive for 4 hours, the length of the SXSW opening party Each robot had to punch for 90 seconds at a time, the length of a round They had to be life-size They had to be Kinect-drivable They had to be built, shipped, and reassembled for SXSW Creating a robot that could be beaten up for 4 hours and still work proved to be an interesting problem. After doing some research on different configurations and styles, it was decided we should leverage a prior project to get a jump start to meet the deadline. We repurposed sections of our Kinect drivable lounge chair, Jellybean! This was an advantage because it contained many known items, such as the motors, motor controllers, and chassis material.&amp;nbsp; Additionally, it was strong and fast, it was modular, and the code to drive it was already written. Jellybean would only get us part of the way there, however.&amp;nbsp; We also had to do some retrofitting to get it to work for our new project. The footprint of the base needed to shrink from 32x50 inches to 32x35 inches, while still allowing space to contain all of the original batteries, wheels, motors, m</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/Boxing-Bots-An-Overview</link>
      <pubDate>Thu, 04 Oct 2012 21:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Boxing-Bots-An-Overview</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/959a6e59-5e5d-4824-aff5-01cc0ea75b19.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/ecb530a9-ffa6-418d-a3e1-96fec970031b.png" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/48e5dab5-8103-4fc6-a3a6-9bd49223e294.jpg" height="288" width="512"></media:thumbnail>      
      <dc:creator>Brian Peek, Clint Rutkas, Dan Fernandez, Rick Barraza</dc:creator>
      <itunes:author>Brian Peek, Clint Rutkas, Dan Fernandez, Rick Barraza</itunes:author>
      <slash:comments>10</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/Boxing-Bots-An-Overview/RSS</wfw:commentRss>
      <category>Hardware</category>
      <category>Kinect</category>
      <category>WPF</category>
      <category>Phidgets</category>
    </item>
  <item>
      <title>Face Detection with Emgu CV in C# and WPF</title>
      <description><![CDATA[<p>Today's project by Junian Triajianto is simple on the outside but shows off something that's can be very complex, face detection look easy...</p><h2><a href="http://www.codeproject.com/Articles/462527/Camera-Face-Detection-in-Csharp-Using-Emgu-CV-Open">Camera Face Detection in C# Using Emgu CV (OpenCV in .NET) and WPF</a></h2><blockquote><p>Hi there, this is a new tutorial category in my blog. It's Computer Vision. In this blog, I'd like to show you something cool. It's how to perform <strong>Face Detection using your camera / Webcam</strong>. You'll see how your application can detect faces from a captured image. Curious about it? Let's take a look how to do that.</p><p>This what you need to follow this tutorial:</p><ol><li>Microsoft Visual Studio 2010. Or if you don't have one, you can use 2008 version </li><li>Emgu CV (OpenCV in .NET). You can download the latest version in this link: <a href="http://www.emgu.com/wiki/index.php/Main_Page">http://www.emgu.com/wiki/index.php/Main_Page</a> and follow the installation instruction </li><li>Basic Knowledge of C# Programming </li><li>Familiar in WPF Development </li></ol><p>After you've got what you need, it's time to rock!</p><ol><li>First thing you should do is installing Emgu CV. Your installation path should be like <em>C:\Emgu\emgucv-windows-x86 2.2.1.1150</em>. And you can see inside <em>C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin</em> some DLLs and sample programs. You can see a simple face detection app <em>Example.FaceDetection.exe</em> and you'll see something like the first picture in this post. </li></ol><p>...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-38.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-87.png" alt="image" width="520" height="377" border="0"></a></p><p>...</p><p>8. Here is the result of our work:</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-77.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-77.png" alt="image" width="268" height="384" border="0"></a></p><p>...</p><p><strong>Note </strong>: If you can't run your project, just build it and make sure all <em>opencv_xxxx.dll</em> files and <em>haarcascade_frontalface_alt_tree.xml</em> in the same directory with your executable file. You can find those files inside <em>C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin </em>.</p></blockquote><p>Take note of his note... Getting the OpenCV and EmguCV dependices were the hardest part of this project.</p><p>Also there there's been a file name change to the noted XML file, <em>haarcascade_frontalface_alt_tree.xml. </em>If you get the latest drop of emgucv-windows-x86 the file name's been changed to &quot;haarcascade_frontalface_default.xml&quot;. So you'll need to tweak the code to take that into account.</p><p>Here's the before;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B8%5D-39.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-72.png" alt="image" width="520" height="251" border="0"></a></p><p>And the after;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B11%5D-33.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-62.png" alt="image" width="520" height="184" border="0"></a></p><p>Once the dependences are in place and the file name fixed, this ran like a charm and really did make facial detection look easy...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML5a7d65c%5B3%5D.png" target="_blank"><img title="SNAGHTML5a7d65c" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML5a7d65c_thumb.png" alt="SNAGHTML5a7d65c" width="505" height="384" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML5a7f202%5B3%5D.png" target="_blank"><img title="SNAGHTML5a7f202" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML5a7f202_thumb.png" alt="SNAGHTML5a7f202" width="505" height="384" border="0"></a></p><p>If you've been wondering how to do face detection, this project is one you'll want to check out...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:60448845427a4fc6b212a0d4014a1038">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Face-Detection-with-Emgu-CV-in-C-and-WPF</comments>
      <itunes:summary>Today&#39;s project by Junian Triajianto is simple on the outside but shows off something that&#39;s can be very complex, face detection look easy... Camera Face Detection in C# Using Emgu CV (OpenCV in .NET) and WPFHi there, this is a new tutorial category in my blog. It&#39;s Computer Vision. In this blog, I&#39;d like to show you something cool. It&#39;s how to perform Face Detection using your camera / Webcam. You&#39;ll see how your application can detect faces from a captured image. Curious about it? Let&#39;s take a look how to do that. This what you need to follow this tutorial: Microsoft Visual Studio 2010. Or if you don&#39;t have one, you can use 2008 version Emgu CV (OpenCV in .NET). You can download the latest version in this link: http://www.emgu.com/wiki/index.php/Main_Page and follow the installation instruction Basic Knowledge of C# Programming Familiar in WPF Development After you&#39;ve got what you need, it&#39;s time to rock! First thing you should do is installing Emgu CV. Your installation path should be like C:\Emgu\emgucv-windows-x86 2.2.1.1150. And you can see inside C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin some DLLs and sample programs. You can see a simple face detection app Example.FaceDetection.exe and you&#39;ll see something like the first picture in this post. ...  ... 8. Here is the result of our work:  ... Note : If you can&#39;t run your project, just build it and make sure all opencv_xxxx.dll files and haarcascade_frontalface_alt_tree.xml in the same directory with your executable file. You can find those files inside C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin . Take note of his note... Getting the OpenCV and EmguCV dependices were the hardest part of this project. Also there there&#39;s been a file name change to the noted XML file, haarcascade_frontalface_alt_tree.xml. If you get the latest drop of emgucv-windows-x86 the file name&#39;s been changed to &amp;quot;haarcascade_frontalface_default.xml&amp;quot;. So you&#39;ll need to tweak the code to take that into account. Here&#39;s the before;  And</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Face-Detection-with-Emgu-CV-in-C-and-WPF</link>
      <pubDate>Wed, 26 Sep 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Face-Detection-with-Emgu-CV-in-C-and-WPF</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/221043ad-8011-4f61-83e9-23f315aab86f.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/d82d2abd-e3ce-482a-aa43-22ba39dde97d.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Face-Detection-with-Emgu-CV-in-C-and-WPF/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>WPF</category>
      <category>facial recognition</category>
    </item>
  <item>
      <title>Visual Studio 2012 Launch &quot;My Events&quot; sample modern application source</title>
      <description><![CDATA[<p>Containing with the Visual Studio 2012 Launch theme, in the keynotes (which you can see on-demand <a href="http://www.visualstudiolaunch.com/vs2012vle/Home" target="_blank">here</a>), you saw a number of demo's of the &quot;My Events&quot; application.</p><p>Think it was kind of cool and something you'd like to look see the source for?</p><h2><a href="http://code.msdn.microsoft.com/MY-EVENTS-Modern-Sample-9a42abc6" target="_blank">MY EVENTS - Sample Modern Application with Visual Studio 2012</a></h2><blockquote><p><em><em>The main goal of this sample modern application is to provide a sample app where you can see most of the new technologies related to Visual Studio 2012, in a practical way. </em><em><br></em></em><br><strong>Sample application context and scenarios</strong><br>This sample application shows most of the new technologies you can use with Visual Studio 2012 in order to build Modern Apps.</p><p>The context is about an events/conferences management system called “My Events”. <br>It is composed by:</p><ul><li><strong>Central Web API Services:</strong> </li><li><strong>Global Web-App (ASP.NET MVC4):</strong> </li><li><strong>Organizers WPF App (WPF):</strong> </li><li><strong>Organizers Windows 8 Store App (XAML/C#):</strong> </li><li><strong>Attendees Windows 8 Store App (HTML5/WinJS):</strong> </li></ul><p><strong>Goals</strong><br>This global system and the related client apps are highlighting the following points:</p><ul><li>Consumer end-user point of view with the latest UX technologies capabilities, typical of Modern-Apps. </li><li>Enterprise and LOB (Line of Business) point of view, when using a desktop application. </li><li>Cloud friendly. You can deploy very easily all the server assets (Web Api Services and Web app) into the Windows Azure cloud. </li><li>Extensible and open to more complex scenarios. Even though our scenario’s main goal is to ‘keep it simple’, we wanted to be able to leave it open for future extensions and complexity that is usually required when implementing a real production application. </li><li>Multiple technical approaches. We wanted to illustrate how multiple technical approaches can co-exist within the same solution (Web, mainstream-app, CRUD, etc.) </li><li>Easily deployable. The RI is easily deployable so that you can install it and experiment with it. </li></ul><p><em><em><em>The selected technologies and frameworks used are the following:</em></em></em></p><ul><li><em><em><em>Core</em></em></em> <ul><li><em><em><em>ASP.NET Web-API Services</em></em></em> </li><li><em><em><em>Entity Framework 5 (Code First)</em></em></em> </li><li><em><em><em>SQL Server LocalDB</em></em></em> </li></ul></li><li><em><em><em>Web App</em></em></em> <ul><li><em><em><em>ASP.NET MVC 4</em></em></em> </li><li><em><em><em>JavaScript &amp; </em><em>JQuery consuming Web Api Services</em></em></em> </li></ul></li><li><em><em><em>Windows 8 Store Apps</em></em></em> <ul><li><em><em><em>Windows 8 Store App using HTML5/WinJS</em></em></em> </li><li><em><em><em>Windows 8 Store Apps using XAML/C#</em></em></em> </li></ul></li><li><em><em><em>Desktop App</em></em></em> <ul><li><em><em><em>WPF (Windows Presentation Foundation) App</em></em></em> </li></ul></li></ul></blockquote><p>While this show's off allot...</p><blockquote><p><strong>What this sample application is NOT about</strong><br>This is not a production application and it is not intended as a guidance for complex scenarios/applications, as it mostly covers CRUD and Data-Driven scenarios, only. If you need guidance for complex scenarios, we recommend to check guidance material from the Microsoft Patterns &amp; Practices group like the ‘CQRS Journey guidance’, which shows a reference application with a related functional domain &amp; scope (Events/Conferences platform) but from a different point of view based on design-patterns and best architectural practices for complex scenarios, covering approaches like CQRS (Command &amp; Query Responsibility Segregation) &amp; DDD (Domain Driven Design).</p></blockquote><p>Ready to build it now?</p><blockquote><h3>Building the Sample</h3><p><em>Software required: </em></p><p><em>Visual Studio 2012, Windows 8, BingMaps JavaScript SDK [GD: which you can find here <a href="http://visualstudiogallery.msdn.microsoft.com/0c341dfb-4584-4738-949c-daf55b82df58" target="_blank">Bing Maps SDK for Metro style apps (Beta)</a>]</em></p><p><em>Check that you have the dependencies, open the solution and run it. The database will be generated for you using LocalDB and Entity Framework Initializers.</em></p></blockquote><p>If when running the web client for the first time, you get a runtime error here;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B8%5D-36.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-69.png" alt="image" width="520" height="118" border="0"></a></p><p>...that it can't find a file in the FakeImages folder, what I did was just copy the folder into the path it thought to find the images. Easier than tweaking code.</p><p>So I coping the FakeImages folder from <br>...\MY EVENTS - Sample Modern Application with Visual Studio 2012\C#,JavaScript\MyEvents\MyEvents.Web\FakeImages <br>to <br>...\MY EVENTS - Sample Modern Application with Visual Studio 2012\FakeImages</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-35.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-84.png" alt="image" width="520" height="332" border="0"></a></p><p>Then the app ran fine. Once run the first time, you can delete that extra copy if you want, it's only need the first time the app runs, when its building its data store.</p><p>Also note: When creating an Event, also make sure to add at least one Session to it. Otherwise the event won't show up in the in a few of the Clients (This had me wondering if something was busted. I could see the event in the Web and Desktop apps, but in none of the Windows Store apps... Adding a Session fixed that. Doh!)</p><p>Here's a snap of the Solution;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B11%5D-31.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-60.png" alt="image" width="364" height="335" border="0"></a></p><p>And some snaps of it running on my system.</p><p>Here's the Web app;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B17%5D-12.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B5%5D-44.png" alt="image" width="520" height="151" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B20%5D-12.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B6%5D-37.png" alt="image" width="520" height="258" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B14%5D-28.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-51.png" alt="image" width="520" height="176" border="0"></a></p><p>The WPF Desktop app;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9c8a535%5B3%5D.png" target="_blank"><img title="SNAGHTML9c8a535" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9c8a535_thumb.png" alt="SNAGHTML9c8a535" width="520" height="362" border="0"></a></p><p>As a Windows Store app;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9c920ce%5B3%5D.png" target="_blank"><img title="SNAGHTML9c920ce" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9c920ce_thumb.png" alt="SNAGHTML9c920ce" width="520" height="258" border="0"></a></p><blockquote><p><strong>Wrap up</strong><br>Therefore and as previously mentioned, our main objective is to highlight and show most of the new capabilities and technical possibilities offered by Visual Studio 2012 and all its related technologies in order to build <strong>Modern Apps</strong>.</p></blockquote><p>There's a bunch here to look in this source. From using a Solution wide version assembly file, to Portable Library projects, Windows Store apps, Facebook Integration, Twitter, Maps, MVC4, ASP.Net Web API, Json.Net, MVVM, unit testing the web backend and much, much more.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:e874edc18e104ed7b9cea0cd0140264c">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Visual-Studio-2012-Launch-My-Events-sample-modern-application-source</comments>
      <itunes:summary>Containing with the Visual Studio 2012 Launch theme, in the keynotes (which you can see on-demand here), you saw a number of demo&#39;s of the &amp;quot;My Events&amp;quot; application. Think it was kind of cool and something you&#39;d like to look see the source for? MY EVENTS - Sample Modern Application with Visual Studio 2012The main goal of this sample modern application is to provide a sample app where you can see most of the new technologies related to Visual Studio 2012, in a practical way. Sample application context and scenariosThis sample application shows most of the new technologies you can use with Visual Studio 2012 in order to build Modern Apps. The context is about an events/conferences management system called “My Events”. It is composed by: Central Web API Services: Global Web-App (ASP.NET MVC4): Organizers WPF App (WPF): Organizers Windows 8 Store App (XAML/C#): Attendees Windows 8 Store App (HTML5/WinJS): GoalsThis global system and the related client apps are highlighting the following points: Consumer end-user point of view with the latest UX technologies capabilities, typical of Modern-Apps. Enterprise and LOB (Line of Business) point of view, when using a desktop application. Cloud friendly. You can deploy very easily all the server assets (Web Api Services and Web app) into the Windows Azure cloud. Extensible and open to more complex scenarios. Even though our scenario’s main goal is to ‘keep it simple’, we wanted to be able to leave it open for future extensions and complexity that is usually required when implementing a real production application. Multiple technical approaches. We wanted to illustrate how multiple technical approaches can co-exist within the same solution (Web, mainstream-app, CRUD, etc.) Easily deployable. The RI is easily deployable so that you can install it and experiment with it. The selected technologies and frameworks used are the following: Core ASP.NET Web-API Services Entity Framework 5 (Code First) SQL Server LocalDB Web App A</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Visual-Studio-2012-Launch-My-Events-sample-modern-application-source</link>
      <pubDate>Wed, 19 Sep 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Visual-Studio-2012-Launch-My-Events-sample-modern-application-source</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/670d11ab-7446-404c-ac1d-933cdd7425db.png" height="53" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/e7b2e641-2647-4b12-8c00-1c5735dc0eb1.png" height="117" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Visual-Studio-2012-Launch-My-Events-sample-modern-application-source/RSS</wfw:commentRss>
      <category>.NET Framework</category>
      <category>ASP.NET</category>
      <category>ASP.NET MVC</category>
      <category>Coding4Fun</category>
      <category>Facebook</category>
      <category>HTML5</category>
      <category>MVVM</category>
      <category>Twitter</category>
      <category>Visual Studio</category>
      <category>WPF</category>
      <category>Windows 8</category>
    </item>
  <item>
      <title>The HP Printer Display Hack (with financial goodness)</title>
      <description><![CDATA[<p>The HP Printer Display Hack is a simple background application that periodically checks the current price of a selected stock and sends it to the display of HP (and compatible) laser printers.</p><h3>Introduction</h3><p>This app is based on an old hack from back to at least 1997 that uses the HP Job control language to change the text on the LCD status display. Some background on this hack can be found here: <a href="http://www.irongeek.com/i.php?page=security/networkprinterhacking.">http://www.irongeek.com/i.php?page=security/networkprinterhacking.</a>&nbsp;There are various versions of the hack code out there, and typically they all work the same way: you specify the address of the printer and the message to send, open a TCP connection to the printer over port 9100, and then send a command to update the display.</p><p>This app is a variation of that hack. It’s a tray application that periodically checks the stock price for a company and then sends a formatted message of the stock symbol and price to a specified printer.</p><p>To get the current stock price, we retrieve the data from Yahoo! through <a href="http://finance.yahoo.com/">finance.yahoo.com</a>. The data comes back in CSV format. To save a step in parsing the CSV columns, we use YQL, the Yahoo! Query Language. Yahoo! created YQL to provide a SQL-like API for querying data from various online web services. YQL! can return XML or JSON data, and we’ll take the XML and use LINQ to parse the data.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/2012-08-27_12-19-35_454%5B4%5D.jpg" rel="lightbox"><img title="2012-08-27_12-19-35_454" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/2012-08-27_12-19-35_454_thumb%5B1%5D.jpg" alt="2012-08-27_12-19-35_454" width="640" height="360" border="0"></a></p><h4>How to Use the App</h4><p>The first time you run the app, the main form will appear and you'll be able to enter in the stock symbol and the IP address of your printer. Click the “Get Printer” button to view a dialog listing the available printers connected on port 9100.</p><p>There are two checkboxes. The first one is labeled “Start with Windows”. When this setting is saved, the following code is executed to tell Windows whether to start the app when user logs in:</p><p><strong>C#<br></strong><pre class="brush: csharp">
private void StartWithWindows(bool start) 
{ 
    using (RegistryKey hkcu = Registry.CurrentUser) 
    { 
        using (RegistryKey runKey = hkcu.OpenSubKey(@&quot;Software\Microsoft\Windows\CurrentVersion\Run&quot;, true)) 
        { 
            if (runKey == null) 
                return;
 
            if (start) 
                runKey.SetValue(wpfapp.Properties.Resources.Code4FunStockPrinter, Assembly.GetEntryAssembly().Location); 
            else 
            { 
                if (runKey.GetValue(wpfapp.Properties.Resources.Code4FunStockPrinter) != null) 
                    runKey.DeleteValue(wpfapp.Properties.Resources.Code4FunStockPrinter); 
            } 
        } 
    } 
}
</pre></p><p><strong>VB</strong><br><pre class="brush: vb">
Private Sub StartWithWindows(ByVal start As Boolean)
    Using hkcu As RegistryKey = Registry.CurrentUser
        Using runKey As RegistryKey = hkcu.OpenSubKey(&quot;Software\Microsoft\Windows\CurrentVersion\Run&quot;, True)
            If runKey Is Nothing Then
                Return
            End If

            If start Then
                runKey.SetValue(My.Resources.Code4FunStockPrinter, System.Reflection.Assembly.GetEntryAssembly().Location)
            Else
                If runKey.GetValue(My.Resources.Code4FunStockPrinter) IsNot Nothing Then
                    runKey.DeleteValue(My.Resources.Code4FunStockPrinter)
                End If
            End If
        End Using
    End Using
End Sub
</pre></p><p>The enabled checkbox is used so that you can pause the sending of the stock price to the printer without having to exit the app. When you press the “Start” button, you are prompted to save any changed settings and the app hides the main form, leaving just the system tray icon. While the app is running, it will check the stock price every 5 minutes. If the price has changed, it tells the printer to display the stock symbol and price on the display.</p><p>A <a href="http://msdn.microsoft.com/en-us/library/System.Windows.Threading.DispatcherTimer.aspx">DispatcherTimer</a> object is used to determine when to check the stock price. It’s created when the main form is created and will only execute the update code when the settings have been defined and enabled.</p><p>If an unexpected error occurs, the <a href="http://msdn.microsoft.com/en-us/library/system.windows.application.dispatcherunhandledexception.aspx">DispatcherUnhandledException</a> event handler will log the error to a file and alert the user:</p><p><strong>C#<br></strong><pre class="brush: csharp">
void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) 
{ 
    // stop the timer 
    _mainWindow.StopPrinterHacking();

    // display the error 
    _mainWindow.LogText(&quot;Sending the stock prince to the printer was halted due to this error:&quot; &#43; e.Exception.ToString()); 

    // display the form 
    ShowMainForm(); 

    // Log the error to a file and notify the user 
    Exception theException = e.Exception; 
    string theErrorPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) &#43; &quot;\\PrinterDisplayHackError.txt&quot;; 

    using (System.IO.TextWriter theTextWriter = new System.IO.StreamWriter(theErrorPath, true)) 
    { 
        DateTime theNow = DateTime.Now; 
        theTextWriter.WriteLine(String.Format(&quot;The error time: {0} {1}&quot;, theNow.ToShortDateString(), theNow.ToShortTimeString())); 
        while (theException != null) 
        { 
            theTextWriter.WriteLine(&quot;Exception: &quot; &#43; theException.ToString()); 
            theException = theException.InnerException; 
        } 
    } 

    MessageBox.Show(&quot;An unexpected error occurred. A stack trace can be found at:\n&quot; &#43; theErrorPath); 
    e.Handled = true; 
}
</pre></p><p><strong>VB</strong><br><pre class="brush: vb">
Private Sub App_DispatcherUnhandledException(ByVal sender As Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)
    ' stop the timer
    _mainWindow.StopPrinterHacking()

    ' display the error
    _mainWindow.LogText(&quot;Sending the stock prince to the printer was halted due to this error:&quot; &amp; e.Exception.ToString())

    ' display the form
    ShowMainForm()

    ' Log the error to a file and notify the user
    Dim theException As Exception = e.Exception
    Dim theErrorPath As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) &amp; &quot;\PrinterDisplayHackError.txt&quot;
    Using theTextWriter As System.IO.TextWriter = New System.IO.StreamWriter(theErrorPath, True)
        Dim theNow As Date = Date.Now
        theTextWriter.WriteLine(String.Format(&quot;The error time: {0} {1}&quot;, theNow.ToShortDateString(), theNow.ToShortTimeString()))
        Do While theException IsNot Nothing
            theTextWriter.WriteLine(&quot;Exception: &quot; &amp; theException.ToString())
            theException = theException.InnerException
        Loop
    End Using
    MessageBox.Show(&quot;An unexpected error occurred.  A stack trace can be found at:&quot; &amp; vbLf &amp; theErrorPath)
    e.Handled = True
End Sub
</pre></p><p>&nbsp;</p><h4>The User Interface</h4><p>The application currently looks like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B8%5D-2.png" rel="lightbox"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B2%5D-5.png" alt="image" width="330" height="400" border="0"></a></p><p>Pressing the “Get Printer” button opens a dialog that looks like this:</p><p><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B1%5D-3.png" alt="image" width="480" height="320" border="0"></p><p>The UI was designed with WPF and uses the basic edit controls as well as a theme from the <a href="http://wpfthemes.codeplex.com/">WPF Themes project</a> on CodePlex. On the main form, the stock symbol, printer IP address, and the check boxes using data bindings to bind each control to a custom setting are defined in the <strong>PrinterHackSettings</strong> class.</p><p>The settings are defined in a class descended from <strong>ApplicationSettingsBase</strong>. The .NET runtime will read and write the settings based on the rules defined <a href="http://msdn.microsoft.com/en-us/library/ms379611.aspx">here</a>.</p><p>The big RichTextBog in the center of the form is used to display the last 10 stock price updates. The app keeps a queue of the stock price updates, and when the queue is updated it’s sent to the RichTextBox with the following code:</p><p><strong>C#<br></strong><pre class="brush: csharp">
public void UpdateLog(RichTextBox rtb) 
{ 
    int i = 0; 
    TextRange textRange = new TextRange(rtb.Document.ContentStart, rtb.Document.ContentEnd); 
    textRange.Text = string.Empty; 
    foreach (var lg in logs) 
    { 
        i&#43;&#43;; 
        TextRange tr = new TextRange(rtb.Document.ContentEnd, rtb.Document.ContentEnd) { Text = String.Format(&quot;{0} : &quot;, lg.LogTime.ToString(&quot;hh:mm:ss&quot;)) }; 
        tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.DarkRed); 
        tr = new TextRange(rtb.Document.ContentEnd, rtb.Document.ContentEnd) { Text = lg.LogMessage &#43; Environment.NewLine }; 
        tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Black); 
    } 
    if (i &gt; 10) 
        logs.Dequeue(); 

    rtb.ScrollToEnd(); 
}
</pre></p><p>&nbsp;</p><h4>VB<br><pre class="brush: vb">
Public Sub UpdateLog(ByVal rtb As RichTextBox)
    Dim i As Integer = 0

    For Each lg As LogEntry In logs
        i &#43;= 1
        Dim tr As New TextRange(rtb.Document.ContentEnd, rtb.Document.ContentEnd) With {.Text = String.Format(&quot;{0} : &quot;, lg.LogTime.ToString(&quot;hh:mm:ss&quot;))}
        tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Red)

        tr = New TextRange(rtb.Document.ContentEnd, rtb.Document.ContentEnd) With {.Text = lg.LogMessage &amp; Environment.NewLine}
        tr.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.White)
    Next lg

    If i &gt; 10 Then
        logs.Dequeue()
    End If

    rtb.ScrollToEnd()
End Sub
</pre></h4><h4>Displaying a notification trace icon</h4><p>WPF does not provide any functionality for running an app with just an icon in the notification area of the taskbar. We need to tap into some WinForms functionality. Add a reference to the <strong>System.Windows.Form</strong> namespace to the project. In the App.xaml file, add an event handler to the Startup event. Visual Studio will wire up an <a href="http://msdn.microsoft.com/en-us/library/system.windows.application.startup.aspx">Application.Startup</a> event in the code behind file. We can use that event to add a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.notifyicon.aspx">WinForms.NotifyIcon</a> and wireup a context menu to it:</p><p><strong>C#<br></strong><pre class="brush: csharp">
private void Application_Startup(object sender, StartupEventArgs e) 
{ 
    _notifyIcon = new WinForms.NotifyIcon(); 
    _notifyIcon.DoubleClick &#43;= notifyIcon_DoubleClick; 
    _notifyIcon.Icon = wpfapp.Properties.Resources.Icon; 
    _notifyIcon.Visible = true; 

    WinForms.MenuItem[] items = new[] 
    { 
        new WinForms.MenuItem(&quot;&amp;Settings&quot;, Settings_Click) { DefaultItem = true } , 
        new WinForms.MenuItem(&quot;-&quot;), 
        new WinForms.MenuItem(&quot;&amp;Exit&quot;, Exit_Click) 
    }; 

    _notifyIcon.ContextMenu = new WinForms.ContextMenu(items); 
    _mainWindow = new MainWindow(); 

    if (!_mainWindow.SettingsAreValid()) 
        _mainWindow.Show(); 
    else 
        _mainWindow.StartPrinterHacking(); 
}
</pre></p><p><strong>VB<br></strong><pre class="brush: vb">
Private Sub Application_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
    _notifyIcon = New System.Windows.Forms.NotifyIcon()
    AddHandler _notifyIcon.DoubleClick, AddressOf notifyIcon_DoubleClick

    _notifyIcon.Icon = My.Resources.Icon
    _notifyIcon.Visible = True

    Dim items() As System.Windows.Forms.MenuItem = {New System.Windows.Forms.MenuItem(&quot;&amp;Settings&quot;, AddressOf Settings_Click) With {.DefaultItem = True}, New System.Windows.Forms.MenuItem(&quot;-&quot;), New System.Windows.Forms.MenuItem(&quot;&amp;Exit&quot;, AddressOf Exit_Click)}

    _notifyIcon.ContextMenu = New System.Windows.Forms.ContextMenu(items)

    _mainWindow = New MainWindow()

    If Not _mainWindow.SettingsAreValid() Then
        _mainWindow.Show()
    Else
        _mainWindow.StartPrinterHacking()
    End If
End Sub
</pre></p><p>&nbsp;</p><h4>Getting the Stock Information</h4><p>From the Yahoo Financial site, you get can download a CSV file for any specified stock. Here's a web site that documents the format needed to get the right fields:&nbsp;<a href="http://www.gummy-stuff.org/Yahoo-data.htm">http://www.gummy-stuff.org/Yahoo-data.htm</a>. We want to return the stock symbol and the last traded price. That works out to be “s” and “l1”, respectively.</p><p>If you open the following URL with a browser, a file named quotes.csv will be returned:</p><p><a href="http://download.finance.yahoo.com/d/quotes.csv?s=MSFT&amp;f=sl1">http://download.finance.yahoo.com/d/quotes.csv?s=MSFT&amp;f=sl1</a></p><p>You should get a file like this:</p><p><img title="quotes_csv" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/quotes_csv_thumb.png" alt="quotes_csv" width="286" height="114" border="0"></p><p>The first field is the stock symbol and the second is the last recorded price. You could just read that data and parse out the fields, but we can get the data in more readable format.</p><p>Yahoo! has a tool called the <a href="http://developer.yahoo.com/yql/console/">YQL Console</a> that will you let you interactively query against Yahoo! and other web service providers. While it's overkill to use on a two column CSV file, it can be used to tie together data from multiple services.</p><p>To use our MSFT stock query with YQL, we format the query like this:</p><p><pre class="brush: sql">
select * from csv where url='http://download.finance.yahoo.com/d/quotes.csv?s=MSFT&amp;f=sl1' and columns='symbol,price'
</pre></p><p>You can see this query loaded into the YQL Console <a href="http://y.ahoo.it/ckoII">here</a>.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/yql%5B2%5D.png" rel="lightbox"><img title="yql" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/yql_thumb.png" alt="yql" width="640" height="404" border="0"></a></p><p>When you click the “TEST” button, the YQL query is executed and the results displayed in the lower panel. By default, the results are in XML, but you can also get the data back in JSON format.</p><p>Our result set has been transformed into the following XML:</p><p><pre class="brush: xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; 
&lt;query xmlns:yahoo=&quot;http://www.yahooapis.com/v1/base.rng&quot; yahoo:count=&quot;1&quot; yahoo:created=&quot;2012-08-23T02:36:06Z&quot; yahoo:lang=&quot;en-US&quot;&gt; 
    &lt;results&gt; 
        &lt;row&gt; 
            &lt;symbol&gt;MSFT&lt;/symbol&gt; 
            &lt;price&gt;30.54&lt;/price&gt; 
        &lt;/row&gt; 
    &lt;/results&gt; 
&lt;/query&gt;
</pre></p><p>&nbsp;</p><p>This XML document can be easily parsed in the application code. The URL listed below “THE REST QUERY” on the YQL page is the YQL query encoded so that it can be sent as a GET request. For this YQL query, we use the following URL:</p><p><a href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3DMSFT%26f%3Dsl1'%20and%20columns%3D'symbol%2Cprice'">http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3D<strong>MSFT</strong>%26f%3Dsl1'%20and%20columns%3D'symbol%2Cprice'</a></p><p>This is the URL that our application uses to get the stock price. Notice the MSFT in bold face—we replace that hard coded stock symbol with a format item and just use String.Format() to generate the URL at run time.</p><p>To get the stock price from our code, we can wrap this with the following method:</p><p><strong>C#<br></strong><pre class="brush: csharp">
public string GetPriceFromYahoo(string tickerSymbol) 
{ 
    string price = string.Empty; 
    string url = string.Format(&quot;http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3D{0}%26f%3Dsl1'%20and%20columns%3D'symbol%2Cprice'&quot;, tickerSymbol); 

    try 
    { 
        Uri uri = new Uri(url); 
        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri); 
        HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); 
        XDocument doc = XDocument.Load(resp.GetResponseStream()); 
        resp.Close(); 
        var ticker =    from query in doc.Descendants(&quot;query&quot;) 
                        from results in query.Descendants(&quot;results&quot;) 
                        from row in query.Descendants(&quot;row&quot;) 
                        select new { price = row.Element(&quot;price&quot;).Value }; 

        price = ticker.First().price; 
    } 
    catch (Exception ex) 
    { 
        price = &quot;Exception retrieving symbol: &quot; &#43; ex.Message; 
    } 
    return price; 
}
</pre></p><p><strong>VB<br></strong><pre class="brush: vb">
Public Function GetPriceFromYahoo(ByVal tickerSymbol As String) As String
    Dim price As String

    Dim url As String = String.Format(&quot;http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3D{0}%26f%3Dsl1'%20and%20columns%3D'symbol%2Cprice'&quot;, tickerSymbol)

    Try
        Dim uri As New Uri(url)

        Dim req As HttpWebRequest = CType(WebRequest.Create(uri), HttpWebRequest)
        Dim resp As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)

        Dim doc As XDocument = XDocument.Load(resp.GetResponseStream())

        resp.Close()

        Dim ticker = From query In doc.Descendants(&quot;query&quot;) , results In query.Descendants(&quot;results&quot;) , row In query.Descendants(&quot;row&quot;) _
                     Let xElement = row.Element(&quot;price&quot;) _
                     Where xElement IsNot Nothing _
                     Select New With {Key .price = xElement.Value}

        price = ticker.First().price
    Catch ex As Exception
        price = &quot;Exception retrieving symbol: &quot; &amp; ex.Message
    End Try

    Return price
End Function
</pre></p><p>&nbsp;</p><p>While this code makes the readying of a two column CSV file more complicated than it needs to be, it makes it easier to adapt this code to read the results for multiple stock symbols and/or additional fields.</p><h4>Getting the List of Printers</h4><p>We are targeting a specific type of printer: those that use the HP PJL command set. Since we talk to these printers over port 9100, we only need to list the printers that listen on that port. We can use <a href="http://msdn.microsoft.com/en-us/library/aa394582(v=VS.85).aspx">Windows Management Instrumentation</a> (WMI) to list the printer TCP/IP addresses that are using port 9100.&nbsp; The WMI class <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394492%28v=vs.85%29.aspx">Win32_TCPIPPrinterPort</a> can be used for that purpose, and we’ll use the following WMI query:</p><p><strong>Select Name, HostAddress from Win32_TCPIPPrinterPort where PortNumber = 9100</strong></p><p>This returns the list of port names and addresses on your computer that are being used over port 9100. Take that list and store it in a dictionary for a quick lookup:</p><p><strong>C#<br></strong><pre class="brush: csharp">
static public Dictionary&lt;string, IPAddress&gt; GetPrinterPorts()
{ 
    var ports = new Dictionary&lt;string, IPAddress&gt;(); 

    ObjectQuery oquery = new ObjectQuery(&quot;Select Name, HostAddress from Win32_TCPIPPrinterPort where PortNumber = 9100&quot;); 
    ManagementObjectSearcher mosearcher = new ManagementObjectSearcher(oquery); 

    using (var searcher = new ManagementObjectSearcher(oquery)) 
    { 
        var objectCollection = searcher.Get(); 
        foreach (ManagementObject managementObjectCollection in objectCollection) 
        { 
            var portAddress = IPAddress.Parse(managementObjectCollection.GetPropertyValue(&quot;HostAddress&quot;).ToString()); 
            ports.Add(managementObjectCollection.GetPropertyValue(&quot;Name&quot;).ToString(), portAddress); 
        } 
    } 

    return ports; 
}
</pre></p><p><strong>VB<br></strong><pre class="brush: vb">
Public Shared Function GetPrinterPorts() As Dictionary(Of String, IPAddress)
    Dim ports = New Dictionary(Of String, IPAddress)()

    Dim oquery As New ObjectQuery(&quot;Select Name, HostAddress from Win32_TCPIPPrinterPort where PortNumber = 9100&quot;)

    Dim mosearcher As New ManagementObjectSearcher(oquery)

    Using searcher = New ManagementObjectSearcher(oquery)
        Dim objectCollection = searcher.Get()

        For Each managementObjectCollection As ManagementObject In objectCollection
            Dim portAddress = IPAddress.Parse(managementObjectCollection.GetPropertyValue(&quot;HostAddress&quot;).ToString())
            ports.Add(managementObjectCollection.GetPropertyValue(&quot;Name&quot;).ToString(), portAddress)
        Next managementObjectCollection
    End Using

    Return ports
End Function
</pre></p><p>&nbsp;</p><p>Next, we get the list of printers that this computer knows about. We could do that through WMI, but I decided to stay closer to the .NET Framework and use the <a href="http://msdn.microsoft.com/en-us/library/system.printing.localprintserver.aspx">LocalPrintServer</a> class. The <a href="http://msdn.microsoft.com/en-us/library/ms552938.aspx">GetPrintQueues</a> method returns a collection of print queues of the type <a href="http://msdn.microsoft.com/en-us/library/system.printing.printqueuecollection.aspx">PrintQueueCollection</a>. We can then iterate through the <strong>PrintQueueCollection</strong> and look for all printers that have a port name that matches the names returned by the WMI query. That gives code that looks like this:</p><p><strong>C#<br></strong><pre class="brush: csharp">
public class LocalPrinter 
{ 
    public string Name { get; set; } 
    public string PortName { get; set; } 
    public IPAddress Address { get; set; } 
} 

static public List&lt;LocalPrinter&gt; GetPrinters() 
{ 
    Dictionary&lt;string, IPAddress&gt; ports = GetPrinterPorts(); 
    EnumeratedPrintQueueTypes[] enumerationFlags = { EnumeratedPrintQueueTypes.Local }; 

    LocalPrintServer printServer = new LocalPrintServer(); 
    PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(enumerationFlags); 

    return (from printer in printQueuesOnLocalServer 
            where ports.ContainsKey(printer.QueuePort.Name) 
            select new LocalPrinter() 
            { 
                Name = printer.Name, 
                PortName = printer.QueuePort.Name, 
                Address = ports[printer.QueuePort.Name] 
            }).ToList(); 
}
</pre></p><p>&nbsp;</p><h4>VB<br><pre class="brush: vb">
Public Class LocalPrinter
    Public Property Name() As String
    Public Property PortName() As String
    Public Property Address() As IPAddress
End Class

Public Shared Function GetPrinters() As List(Of LocalPrinter)
    Dim ports As Dictionary(Of String, IPAddress) = GetPrinterPorts()

    Dim enumerationFlags() As EnumeratedPrintQueueTypes = { EnumeratedPrintQueueTypes.Local }

    Dim printServer As New LocalPrintServer()

    Dim printQueuesOnLocalServer As PrintQueueCollection = printServer.GetPrintQueues(enumerationFlags)

    Return ( _
            From printer In printQueuesOnLocalServer _
            Where ports.ContainsKey(printer.QueuePort.Name) _
            Select New LocalPrinter() With {.Name = printer.Name, .PortName = printer.QueuePort.Name, .Address = ports(printer.QueuePort.Name)}).ToList()
End Function
</pre></h4><h4>Sending the Stock Price to the Printer</h4><p>The way to send a message to a HP display is via a PJL command. PJL stands for Printer Job Language. Not all PJL commands are recognized by every HP printer, but if you have an HP laser printer with a display, the command should work. This should work for any printer that is compatible with HP’s PJL command set. For the common PJL commands, HP has an online document <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&amp;cc=us&amp;objectID=bpl01965&amp;jumpid=reg_r1002_usen_c-001_title_r0001">here</a>.</p><p>We will be using the “Ready message display” PJL command. All PJL commands will start and end with a sequence of bytes called the “Universal Exit Language” or UEL. This sequence tells the printer that it’s about to receive a PJL command. The UEL is defined as</p><p><strong>&lt;ESC&gt;%-12345X</strong></p><p>The format of the packet sent to the printer is be &quot;UEL PJL command UEL&quot;. The Ready message display format is</p><p><strong>@PJL RDYMSG DISPLAY=”message”[&lt;CR&gt;]&lt;LF&gt;</strong></p><p>To send the command that has the printer display “Hello World”, you would send the following sequence:</p><p><strong>&lt;ESC&gt;%-12345X@PJL RDYMSG DISPLAY=”Hello World”[&lt;CR&gt;]&lt;LF&gt;&lt;ESC&gt;%-12345X[&lt;CR&gt;]&lt;LF&gt;</strong></p><p>We wrap this up in a class called <strong>SendToPrinter</strong> and the good stuff gets executed in the <strong>Send</strong> method, as listed below:</p><p><strong>C#<br></strong><pre class="brush: csharp">
public class SendToPrinter 
{ 
    public string host { get; set; } 
    public int Send(string message) 
    { 
        IPAddress addr = null; 
        IPEndPoint endPoint = null; 

        try 
        { 
            addr = Dns.GetHostAddresses(host)[0]; 
            endPoint = new IPEndPoint(addr, 9100); 
        } 
        catch (Exception e) 
        { 
            return 1; 
        } 

        Socket sock = null; 
        String head = &quot;\u001B%-12345X@PJL RDYMSG DISPLAY = \&quot;&quot;; 
        String tail = &quot;\&quot;\r\n\u001B%-12345X\r\n&quot;; 
        ASCIIEncoding encoding = new ASCIIEncoding(); 

        try 
        { 
            sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); 
            sock.Connect(endPoint); 
            sock.Send(encoding.GetBytes(head)); 
            sock.Send(encoding.GetBytes(message)); 
            sock.Send(encoding.GetBytes(tail)); 
            sock.Close(); 
        } 
        catch (Exception e) 
        { 
            return 1; 
        } 

        int bytes = (head &#43; message &#43; tail).Length; 
        return 0; 
    } 
}
</pre></p><p><strong>VB<br></strong><pre class="brush: vb">
Public Function Send(ByVal message As String) As Integer
    Dim endPoint As IPEndPoint = Nothing

    Try
        Dim addr As IPAddress = Dns.GetHostAddresses(Host)(0)

        endPoint = New IPEndPoint(addr, 9100)
    Catch
        Return 1
    End Try

    Dim startPJLSequence As String = ChrW(&amp;H1B).ToString() &amp; &quot;%-12345X@PJL RDYMSG DISPLAY = &quot;&quot;&quot;
    Dim endPJLSequence As String = &quot;&quot;&quot;&quot; &amp; vbCrLf &amp; ChrW(&amp;H1B).ToString() &amp; &quot;%-12345X&quot; &amp; vbCrLf

    Dim encoding As New ASCIIEncoding()

    Try
        Dim sock As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP)

        sock.Connect(endPoint)

        sock.Send(encoding.GetBytes(startPJLSequence))
        sock.Send(encoding.GetBytes(message))
        sock.Send(encoding.GetBytes(endPJLSequence))

        sock.Close()
    Catch
        Return 1
    End Try

    Return 0
End Function
</pre></p><p>&nbsp;</p><h4>The Installer</h4><p>The installer for this app was written with <a href="http://wix.sourceforge.net/">WiX</a>, Windows Installer XML. WiX is an open source project created by Rob Mensching that lets you build Windows Installer .msi and .msm files from XML source code. I used the release candidate of WiX 3.6, but any recent version should work. Of course, you don’t need an installer if you build the app yourself.</p><p>Setting InstalScope to “perUser” designates this package as being a per-user install. Adding the property “WixAppFolder” and set to “WixPerUserFolder” tells WiX to install this app under %LOCALAPPDATA% instead of under %ProgramFiles%. This eliminates the need for the installer to request elevated rights and the UAC prompt:</p><p><pre class="brush: xml">
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;&gt; 
    &lt;Product Id=&quot;*&quot; Name=&quot;Coding4Fun Printer Display Hack&quot; Language=&quot;1033&quot; Version=&quot;1.0.0.0&quot; Manufacturer=&quot;Coding4Fun&quot; UpgradeCode=&quot;e0a3eed3-b61f-46da-9bda-0d546d2a0622&quot;&gt; 
    &lt;Package InstallerVersion=&quot;200&quot; Compressed=&quot;yes&quot; InstallScope=&quot;perUser&quot; /&gt; 
    &lt;Property Id=&quot;WixAppFolder&quot; Value=&quot;WixPerUserFolder&quot; /&gt;
</pre></p><p>Because we are not touching any system settings, I eliminated the creation of a system restore point at the start of the installation process. This greatly speeds up the installation of the app, and is handled by adding a property named <a href="http://msdn.microsoft.com/en-us/library/dd408005%28v=VS.85%29.aspx">MSIFASTINSTALL</a> with the value of “1”:</p><p><pre class="brush: xml">
&lt;Property Id=&quot;MSIFASTINSTALL&quot; Value=&quot;1&quot; /&gt;
</pre></p><p>I modified the UI sequence to skip over the end user license agreement. There is nothing to license here and no one reads EULAs anyways. To do this, I needed to download the WiX source code and extract a file named WixUI_Mondo.wxs. I added it to the installer project and renamed it to WixUI_MondoNoLicense.wxs. I also added a checkbox to the exit dialog to allow the user to launch the app after it been installed:</p><p><pre class="brush: xml">
&lt;Property Id=&quot;WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT&quot; Value=&quot;Launch Printer Display Hack&quot; /&gt; 
&lt;Property Id=&quot;WixShellExecTarget&quot; Value=&quot;[#exe]&quot; /&gt; 
&lt;CustomAction Id=&quot;LaunchApplication&quot; BinaryKey=&quot;WixCA&quot; DllEntry=&quot;WixShellExec&quot; Impersonate=&quot;yes&quot; /&gt; 
&lt;UI&gt; 
    &lt;UIRef Id=&quot;WixUI_MondoNoLicense&quot;/&gt; 
    &lt;Publish Dialog=&quot;ExitDialog&quot; Control=&quot;Finish&quot; Event=&quot;DoAction&quot; Value=&quot;LaunchApplication&quot;&gt; 
        WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed 
    &lt;/Publish&gt; 
&lt;/UI&gt;
</pre></p><p>&nbsp;</p><p>When you build the installer, it generates two ICE91 warning messages. An ICE91 warning occurs when you install a file or shortcut into a per-user only folder. Since we have explicitly set the InstallScope to “perUser”, we can <a href="http://msdn.microsoft.com/en-us/library/aa369053%28VS.85%29.aspx">safely ignore these two warnings</a>. If you hate warning messages, you can use the tool settings for the installer project to suppress ICE91 validation checks:</p><p><img title="toolsettings" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/toolsettings_thumb.png" alt="toolsettings" width="598" height="295" border="0"></p><h3>Conclusion</h3><p>I have had various versions of this app running in my office for over a year. It’s been set to show our current stock price on the main printer in the development department. It’s fun to watch people walk near the printer just to check out the current stock price.</p><p>If you want to try this out, the download link for the source code and installer is at the top of the article!</p><h3>About The Author</h3><p>I am a senior R&amp;D engineer for Tyler Technologies, working on our next generation of school bus routing software. I also am the leader of the <a href="http://www.tvug.net">Tech Valley .NET Users Group (TVUG)</a>. You can follow me at <a href="https://twitter.com/anotherlab">@anotherlab</a> and check out my blog at <a href="http://anotherlab.rajapet.net">anotherlab.rajapet.net</a>. I would list my G&#43; address, but I don’t use it. I started out with a VIC-20 and been slowly moving up the CPU food chain ever since.</p><p>I would like to thank <a href="http://www.brianpeek.com/">Brian Peek</a> on the Coding4Fun team for his encouragement and suggestions and for letting me steal large chunks of the UI code from his TweeVo project .</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:eaaedf601e2149849607a0be004cd67b">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/The-HP-Printer-Display-Hack-with-financial-goodness</comments>
      <itunes:summary>The HP Printer Display Hack is a simple background application that periodically checks the current price of a selected stock and sends it to the display of HP (and compatible) laser printers. IntroductionThis app is based on an old hack from back to at least 1997 that uses the HP Job control language to change the text on the LCD status display. Some background on this hack can be found here: http://www.irongeek.com/i.php?page=security/networkprinterhacking.&amp;nbsp;There are various versions of the hack code out there, and typically they all work the same way: you specify the address of the printer and the message to send, open a TCP connection to the printer over port 9100, and then send a command to update the display. This app is a variation of that hack. It’s a tray application that periodically checks the stock price for a company and then sends a formatted message of the stock symbol and price to a specified printer. To get the current stock price, we retrieve the data from Yahoo! through finance.yahoo.com. The data comes back in CSV format. To save a step in parsing the CSV columns, we use YQL, the Yahoo! Query Language. Yahoo! created YQL to provide a SQL-like API for querying data from various online web services. YQL! can return XML or JSON data, and we’ll take the XML and use LINQ to parse the data.  How to Use the AppThe first time you run the app, the main form will appear and you&#39;ll be able to enter in the stock symbol and the IP address of your printer. Click the “Get Printer” button to view a dialog listing the available printers connected on port 9100. There are two checkboxes. The first one is labeled “Start with Windows”. When this setting is saved, the following code is executed to tell Windows whether to start the app when user logs in: C#
private void StartWithWindows(bool start) 
{ 
    using (RegistryKey hkcu = Registry.CurrentUser) 
    { 
        using (RegistryKey runKey = hkcu.OpenSubKey(@&amp;quot;Software\Microsoft\Windows\CurrentVersio</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/The-HP-Printer-Display-Hack-with-financial-goodness</link>
      <pubDate>Thu, 13 Sep 2012 17:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/The-HP-Printer-Display-Hack-with-financial-goodness</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/a3dd5283-d246-4dc0-8345-acce5e6781e3.png" height="100" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/81730c45-78ec-4fe6-ac33-919349a3901f.png" height="220" width="220"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/4a678537-be53-472f-9692-75cf35566e20.jpg" height="288" width="512"></media:thumbnail>      
      <dc:creator>Chris Miller</dc:creator>
      <itunes:author>Chris Miller</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/The-HP-Printer-Display-Hack-with-financial-goodness/RSS</wfw:commentRss>
      <category>WiX</category>
      <category>WPF</category>
      <category>Printers</category>
    </item>
  <item>
      <title>More 3D with the Helix 3D Toolkit for WPF</title>
      <description><![CDATA[<p>Today's WPF Wednesday project keeps us in the 3D realm, but this time in WPF. This very complete, free and open source 3D toolkit will wow you in all it's features and very complete examples and demos...</p><h2><a href="http://helixtoolkit.codeplex.com/" target="_blank">Helix 3D Toolkit</a></h2><blockquote><p><strong>Project Description</strong><br>Helix 3D Toolkit is a collection of custom controls and helper classes for WPF 3D. The toolkit contains controls to manipulate the camera, classes to import models (3ds,lwo,obj) and export models.</p><p><strong>NuGet package</strong><br><a href="http://nuget.org/List/Packages/HelixToolkit">http://nuget.org/List/Packages/HelixToolkit</a> (updated at every code check-in)</p><h4>Features</h4><ul><li>Camera manipulation control <ul><li>Turntable rotation </li><li>Trackball rotation </li><li>Zoom extents </li><li>Zoom by rectangle </li><li>Change field-of-view </li><li>Zoom/Rotate around the mouse down point </li><li>Support for orthographic and perspective cameras </li><li>Support for touch manipulation events (e.g. pinch to zoom) </li></ul></li><li>Controls <ul><li>HelixViewport3D - camera manipulation, lights and a Viewport3D </li><li>StereoView3D - cross/parallel stereo viewing </li><li>AnaglyphView3D - anaglyph viewing (requires red/cyan glasses) </li><li>ViewCube - rotates the view to align with selected faces of a cube </li></ul></li><li>Input <ul><li>Support for 3D Connexion SpaceNavigator </li><li>Examples for Wii remote </li><li>Examples for Kinect </li></ul></li><li>Export <ul><li>Kerkythea render engine </li><li>Wavefront files (.obj) </li><li>X3D (not finished) </li><li>Collada (not finished) </li><li>VRML97 (not finished) </li><li>POV-Ray (not finished) </li></ul></li><li>Import <ul><li>3D Studio files (.3ds) </li><li>Lightwave files (.lwo) </li><li>Wavefront files (.obj) </li><li>StereoLithography files (.stl) </li></ul></li><li>MeshBuilder - generates MeshGeometry3D <ul><li>Extrude </li><li>Revolve </li><li>Loft </li><li>Boxes </li><li>Rectangular meshes </li><li>Tubes </li><li>Cone/Cylinder </li></ul></li><li>Subdivision surfaces (Loop) </li><li>Visual3D objects <ul><li>Arrow </li><li>Box </li><li>Cube </li><li>Rectangle </li><li>Lines (screen space thickness) </li><li>Points (screen space size) </li><li>GridLines </li><li>PieSlice </li><li>Sphere </li><li>TruncatedCone </li><li>Tube </li><li>Pipe </li><li>CoordinateSystem </li><li>Light </li><li>PanoramaCube </li><li>Terrain </li><li>Text </li><li>Billboard </li><li>Text billboard </li><li>Cutting planes </li><li>SortingVisual3D (sorts transparent objects by distance from camera) </li></ul></li><li>Effects <ul><li>Anaglyph shader effect </li></ul></li></ul><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image2.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-52.png" alt="image" width="145" height="407" border="0"></a></p></blockquote><p>The only way to really get a feel for this project is to download it and play with the Samples.</p><p>Here's just a few of them from the included Sample Browser</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f4ef623.png" target="_blank"><img title="SNAGHTML46f4ef62" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f4ef62_thumb.png" alt="SNAGHTML46f4ef62" width="271" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f4fdb43.png" target="_blank"><img title="SNAGHTML46f4fdb4" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f4fdb4_thumb.png" alt="SNAGHTML46f4fdb4" width="271" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f50cd03.png" target="_blank"><img title="SNAGHTML46f50cd0" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f50cd0_thumb.png" alt="SNAGHTML46f50cd0" width="271" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f51c4b3.png" target="_blank"><img title="SNAGHTML46f51c4b" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f51c4b_thumb.png" alt="SNAGHTML46f51c4b" width="271" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f5287b3.png" target="_blank"><img title="SNAGHTML46f5287b" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f5287b_thumb.png" alt="SNAGHTML46f5287b" width="271" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f537883.png" target="_blank"><img title="SNAGHTML46f53788" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f53788_thumb.png" alt="SNAGHTML46f53788" width="271" height="407" border="0"></a></p><p>From real time cloth examples;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f5efb03.png" target="_blank"><img title="SNAGHTML46f5efb0" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f5efb0_thumb.png" alt="SNAGHTML46f5efb0" width="543" height="407" border="0"></a></p><p>To building LEGOs</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f633343.png" target="_blank"><img title="SNAGHTML46f63334" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f63334_thumb.png" alt="SNAGHTML46f63334" width="543" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f648793.png" target="_blank"><img title="SNAGHTML46f64879" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f64879_thumb.png" alt="SNAGHTML46f64879" width="543" height="407" border="0"></a></p><p>There's other demo's to, like the 360 degree panorama viewer;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f6e8503.png" target="_blank"><img title="SNAGHTML46f6e850" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f6e850_thumb.png" alt="SNAGHTML46f6e850" width="543" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f6fe5f3.png" target="_blank"><img title="SNAGHTML46f6fe5f" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f6fe5f_thumb.png" alt="SNAGHTML46f6fe5f" width="543" height="407" border="0"></a></p><p>And my favorite, the Solar System;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f77ed43.png" target="_blank"><img title="SNAGHTML46f77ed4" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f77ed4_thumb.png" alt="SNAGHTML46f77ed4" width="543" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f78c9a3.png" target="_blank"><img title="SNAGHTML46f78c9a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f78c9a_thumb.png" alt="SNAGHTML46f78c9a" width="543" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f79c813.png" target="_blank"><img title="SNAGHTML46f79c81" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML46f79c81_thumb.png" alt="SNAGHTML46f79c81" width="543" height="407" border="0"></a></p><p>Why is this my favorite? A couple reasons. First, how the textures are used to show rotation. Check out the spot on the Sun and how it moves over time. Same for the Earth and other planets. Second is how the solar system is &quot;created&quot;.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image5.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb1.png" alt="image" width="650" height="192" border="0"></a></p><p>Yep, creating the Solar System via WPF (and MVVM). How cool is that?</p><p>And yes, you get all the source for all of this, the examples and the Toolkit too.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image9.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb3.png" alt="image" width="197" height="427" border="0"></a></p><p>If you're creating 3D based applications in WPF, you need to check out this toolkit...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:47a97ab8c7c1490793ffa06b0123ef0e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/More-3D-with-the-Helix-3D-Toolkit-for-WPF</comments>
      <itunes:summary>Today&#39;s WPF Wednesday project keeps us in the 3D realm, but this time in WPF. This very complete, free and open source 3D toolkit will wow you in all it&#39;s features and very complete examples and demos... Helix 3D ToolkitProject DescriptionHelix 3D Toolkit is a collection of custom controls and helper classes for WPF 3D. The toolkit contains controls to manipulate the camera, classes to import models (3ds,lwo,obj) and export models. NuGet packagehttp://nuget.org/List/Packages/HelixToolkit (updated at every code check-in) FeaturesCamera manipulation control Turntable rotation Trackball rotation Zoom extents Zoom by rectangle Change field-of-view Zoom/Rotate around the mouse down point Support for orthographic and perspective cameras Support for touch manipulation events (e.g. pinch to zoom) Controls HelixViewport3D - camera manipulation, lights and a Viewport3D StereoView3D - cross/parallel stereo viewing AnaglyphView3D - anaglyph viewing (requires red/cyan glasses) ViewCube - rotates the view to align with selected faces of a cube Input Support for 3D Connexion SpaceNavigator Examples for Wii remote Examples for Kinect Export Kerkythea render engine Wavefront files (.obj) X3D (not finished) Collada (not finished) VRML97 (not finished) POV-Ray (not finished) Import 3D Studio files (.3ds) Lightwave files (.lwo) Wavefront files (.obj) StereoLithography files (.stl) MeshBuilder - generates MeshGeometry3D Extrude Revolve Loft Boxes Rectangular meshes Tubes Cone/Cylinder Subdivision surfaces (Loop) Visual3D objects Arrow Box Cube Rectangle Lines (screen space thickness) Points (screen space size) GridLines PieSlice Sphere TruncatedCone Tube Pipe CoordinateSystem Light PanoramaCube Terrain Text Billboard Text billboard Cutting planes SortingVisual3D (sorts transparent objects by distance from camera) Effects Anaglyph shader effect  The only way to really get a feel for this project is to download it and play with the Samples. Here&#39;s just a few of them from the included Samp</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/More-3D-with-the-Helix-3D-Toolkit-for-WPF</link>
      <pubDate>Wed, 13 Jun 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/More-3D-with-the-Helix-3D-Toolkit-for-WPF</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/1d45241b-51b3-4b71-b6d7-ba6c0571e113.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/d6e97d6d-2cb0-41a8-820b-d5342adabefc.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/More-3D-with-the-Helix-3D-Toolkit-for-WPF/RSS</wfw:commentRss>
      <category>3D</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>WPF</category>
      <category>3D engine</category>
    </item>
  <item>
      <title>Making Mayhem with Volume Control</title>
      <description><![CDATA[<p>Why, hello there! We are going to pick up where we left off at the end of our Coding4Fun video. In the video we built a reaction that increments the volume level on the computer. We are going to expand from there to make a reaction that enables you to set the volume level to a specified volume.</p><p><iFrame src="http://channel9.msdn.com/Blogs/Clint/Project-Mayhem-Creating-a-module/player?w=512&amp;h=288" frameborder="0" scrolling="no" width="512px" height="288px"></iFrame></p><p><a href="http://media.ch9.ms/c4f/c4f/MayhemVolumeStart.zip"><strong>MayhemVolumeStart.zip file</strong></a>&nbsp;contains the class library project all set up with the NuGet package references and the reaction that increments the volume.</p><p>The first step we are going to take is to add the additional references we need to be configurable. The first reference is <strong>MayhemWpf</strong> from the same NuGet feed <strong>MayhemCore</strong> is from. (<a href="http://makemayhem.com/nuget">http://makemayhem.com/nuget</a>). Add a reference to the following assemblies:</p><ul><li><strong>PresentationCore</strong> </li><li><strong>PresentationFramework</strong> </li><li><strong>System.Runtime.Serialization</strong> </li><li><strong>System.Xaml</strong> </li><li><strong>WindowsBase</strong>. </li></ul><p>Next, we switch the code from incrementing the volume to setting the volume to 50%.</p><p>To do this, replace the line:</p><p><pre class="brush: csharp">
device.AudioEndpointVolume.VolumeStepUp();
</pre></p><p>with</p><p><pre class="brush: csharp">
device.AudioEndpointVolume.MasterVolumeLevelScalar = 50 / 100.0f;
</pre></p><p>The reaction now works successfully to set the volume to half way. The next step is to make that setting configurable, and persist between application runs. Let’s make that 50 a variable. Add a private integer to the class (I’m calling it level) and change the above line to be:</p><p><pre class="brush: csharp">
device.AudioEndpointVolume.MasterVolumeLevelScalar = level / 100.0f;
</pre></p><p>Since that variable will be user configurable, we want to be able to show a string on the main window that says what the reaction is doing. To do this, we have to tell Mayhem that our reaction is configurable by implement the <strong>IWpfConfigurable</strong> interface from <strong>MayhemWpf</strong>.</p><p>In order to set that configuration string we have to implement the method <strong>GetConfigString</strong>. The implementation of this method should return some string that provides a look into what the configuration settings are for the reaction.</p><p>I will make the <strong>GetConfigString</strong> method be the following:</p><p><pre class="brush: csharp">
public string GetConfigString()
{
   return string.Format(&quot;Set the volume to {0}%&quot;,level);
}
</pre></p><pre>&nbsp;</pre><p>Now, in order to make the module save the configured state when the application is shut down and restarted, we need to add a little bit of data contract code. We are going to add the <strong>[DataContract]</strong> attribute to our class. This attribute comes from the <strong>System.Runtime.Serialization</strong> framework.</p><p>Our class header now looks like:</p><p><pre class="brush: csharp">
[DataContract]
[MayhemModule(&quot;Set Volume&quot;, &quot;Sets the master volume level&quot;)]
public class SetVolume : ReactionBase, IWpfConfigurable
</pre></p><p>Note that I also changed the <strong>MayhemModule</strong> attribute’s name and description to reflect the new functionality.</p><p>We also need to mark the configurable variables to be saved as well. To do that, add the <strong>[DataMember]</strong> attribute to our level variable:</p><p><pre class="brush: csharp">
[DataMember]
private int level;
</pre></p><p>In order to set a default value for this variable, we shouldn’t initialize it using a constructor. Constructors should never be used in modules. Instead, we have a method that should be overridden that you get from <strong>ReactionBase</strong>. <strong>OnLoadDefaults</strong> is to load the settings you want to have by default.</p><p><pre class="brush: csharp">
protected override void OnLoadDefaults()
{
   level = 50;
}
</pre></p><p>Now when you use the <strong>SetVolume</strong> reaction in Mayhem, it will at 50%, but if that value is changed and the application is restarted, it will be set to the value it was at before it was closed!</p><p>The next step is to make the configuration window that actually enables that variable to be modified.</p><p>Add a new WPF <strong>UserControl</strong> item to the project named <strong>SetVolumeConfig.xaml</strong>.</p><p>Replace the contents of the XAML file with:</p><p><pre class="brush: xml">
&lt;src:WpfConfiguration x:Class=&quot;Volume.SetVolumeConfig&quot;
   xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
   xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;   
   xmlns:src=&quot;clr-namespace:MayhemWpf.UserControls;assembly=MayhemWpf&quot;
   Width=&quot;300&quot;&gt;
   &lt;Grid&gt;
      &lt;Grid.ColumnDefinitions&gt;
         &lt;ColumnDefinition Width=&quot;100&quot; /&gt;
         &lt;ColumnDefinition Width=&quot;200&quot; /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
         &lt;RowDefinition /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;TextBlock Style=&quot;{StaticResource ConfigLabel}&quot; Grid.Column=&quot;0&quot; Grid.Row=&quot;0&quot;&gt;Volume:&lt;/TextBlock&gt;
      &lt;Slider Grid.Column=&quot;1&quot; Grid.Row=&quot;0&quot; Height=&quot;23&quot; HorizontalAlignment=&quot;Left&quot;  Name=&quot;VolumeSlider&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;200&quot; Maximum=&quot;100&quot; /&gt;
   &lt;/Grid&gt;
&lt;/src:WpfConfiguration&gt;
</pre></p><p>This configuration window simply has a volume slider allowing values between 0 and 100. <strong>WpfConfiguration</strong> handles the display of how the module asks for information. As you hopefully notice, it doesn’t contain the save button, or the title of the window. All that is handled for you so that we can maintain consistency between configuration windows. We also provide default styles that further maintain consistency and user expectation.</p><p>We now need to create the backing code that makes the configuration window come together. Change <strong>SetVolumeConfig.xaml.cs</strong> to extend the base class <strong>WpfConfiguration</strong> instead of the default <strong>UserControl</strong> base class.</p><p>In the constructor, we should ask for all the information we need to populate the config window with the current settings. In this situation, that only means the current volume level setting. Add an <strong>int</strong> parameter to the constructor called <strong>level</strong>. Also add a public property on the class with a private setter called <strong>Level</strong>. In the constructor, set this property with the parameter passed in to the constructor.</p><p>Your class should now look like this:</p><p><pre class="brush: csharp">
using MayhemWpf.UserControls;
namespace Volume
{
   public partial class SetVolumeConfig : WpfConfiguration
   {
      public int Level
      {
         get;
         private set;
      }
      public SetVolumeConfig(int level)
      {
         this.Level = level;
         InitializeComponent();
      }
   }
}
</pre></p><p><strong>WpfConfiguration</strong> gives us some handy hooks that we can use. We need to set the value property on our slider. This could be done with data bindings, but for simplicity we will just be doing this with code. Also, there is a <strong>Boolean</strong> flag in the <strong>WpfConfiguration</strong> class that enables the <strong>Save</strong> button on the dialog. When handling user input, the save button should only be enabled if the input is valid. Since the slider always has a value in our range, the Save button can always be enabled. We will set this flag in the <strong>OnLoad</strong> method.</p><p>Override the <strong>OnLoad</strong> method as follows:</p><p><pre class="brush: csharp">
public override void OnLoad()
{
   VolumeSlider.Value = this.Level;
   CanSave = true;
}
</pre></p><p>We then also override the <strong>OnSave</strong> method to set the property to the value the <strong>SetVolume</strong> class will expect.</p><p><pre class="brush: csharp">
public override void OnSave()
{
   this.Level = (int)VolumeSlider.Value;
}
</pre></p><p>Lastly, we need to set the title that shows up on the configuration window. To do this, override the <strong>Title</strong> property and have it return “Set Volume”:</p><p><pre class="brush: csharp">
public override string Title
{
   get { return &quot;Set Volume&quot;; }
}
</pre></p><p>Now we need to go back to the <strong>SetVolume</strong> class and implement those configuration related methods.</p><p>The <strong>ConfigurationControl</strong> property needs to return an instance of the <strong>SetVolumeConfig</strong> class. Remember that its constructor expects the current volume setting:</p><p><pre class="brush: csharp">
public WpfConfiguration ConfigurationControl
{
   get
   {
      return new SetVolumeConfig(level);
   }
}
</pre></p><p>Lastly, <strong>OnSaved</strong> takes the instance of <strong>WpfConfiguration</strong> control we just returned in the above property. We need to cast this back to <strong>SetVolumeConfig</strong> to be able to get access to the <strong>Level</strong> property:</p><p><pre class="brush: csharp">
public void OnSaved(WpfConfiguration configurationControl)
{
   var config = (SetVolumeConfig)configurationControl;
   this.level = config.Level;
}
</pre></p><p>That’s all it takes! This code provides us with a complete reaction that enables us to set the volume level on the computer. As you can see, we provide a very straightforward API enabling you, the developer, to write user configurable modules for Mayhem.&nbsp; You can click the <a href="http://media.ch9.ms/c4f/c4f/MayhemVolumeFinal.zip">download link at the top of the screen to get the final code in MayhemVolumeFinal.zip.</a></p><p>We have more documentation available on the available methods and APIs on our <a href="http://mayhem.codeplex.com/documentation">CodePlex documentation page</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:faf9580cdc464e22a2d6a041014269f4">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Making-Mayhem-with-Volume-Control</comments>
      <itunes:summary>Why, hello there! We are going to pick up where we left off at the end of our Coding4Fun video. In the video we built a reaction that increments the volume level on the computer. We are going to expand from there to make a reaction that enables you to set the volume level to a specified volume.  MayhemVolumeStart.zip file&amp;nbsp;contains the class library project all set up with the NuGet package references and the reaction that increments the volume. The first step we are going to take is to add the additional references we need to be configurable. The first reference is MayhemWpf from the same NuGet feed MayhemCore is from. (http://makemayhem.com/nuget). Add a reference to the following assemblies: PresentationCore PresentationFramework System.Runtime.Serialization System.Xaml WindowsBase. Next, we switch the code from incrementing the volume to setting the volume to 50%. To do this, replace the line: 
device.AudioEndpointVolume.VolumeStepUp();
 with 
device.AudioEndpointVolume.MasterVolumeLevelScalar = 50 / 100.0f;
 The reaction now works successfully to set the volume to half way. The next step is to make that setting configurable, and persist between application runs. Let’s make that 50 a variable. Add a private integer to the class (I’m calling it level) and change the above line to be: 
device.AudioEndpointVolume.MasterVolumeLevelScalar = level / 100.0f;
 Since that variable will be user configurable, we want to be able to show a string on the main window that says what the reaction is doing. To do this, we have to tell Mayhem that our reaction is configurable by implement the IWpfConfigurable interface from MayhemWpf. In order to set that configuration string we have to implement the method GetConfigString. The implementation of this method should return some string that provides a look into what the configuration settings are for the reaction. I will make the GetConfigString method be the following: 
public string GetConfigString()
{
   return string</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/Making-Mayhem-with-Volume-Control</link>
      <pubDate>Mon, 30 Apr 2012 21:22:27 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Making-Mayhem-with-Volume-Control</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/4fadc69a-ccb7-47c6-8e88-15fa92b682d0.png" height="100" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/6ec9404c-6fcd-4fcd-87dc-a6d4d4cb2e30.png" height="120" width="220"></media:thumbnail>      
      <dc:creator>EliWhite</dc:creator>
      <itunes:author>EliWhite</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/Making-Mayhem-with-Volume-Control/RSS</wfw:commentRss>
      <category>C#</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Kinect for Windows SDK color and depth streams example</title>
      <description><![CDATA[<p>Today's project is a very simple, straight forward and easy to understand example for capturing and displaying the image and depth streams from the Kinect. My thinking in highlighting this in the Gallery is that it does the one, well two, things simply and well. You don't have to dig through other examples or samples, it's just right there.</p><p>In literally minutes (I think it took me less than one) you can copy-n-paste your way to displaying Kinect color &amp; depth streams.</p><h2>Kinect for Windows SDK– color, and depth streams</h2><blockquote><h6>Color Stream in WPF Application</h6><p>Add Image control in MainWindow.xaml in the Window Grid</p><p>Add enabling color stream in MainWindow() constructor of Main.Window.xaml</p><p>Add color frame ready handler</p><h6>Depth Stream in WPF Application</h6><p>Add Image control in MainWindow.xaml in the Window grid</p><p>Add enabling depth stream in MainWindow() constructor of Main.Window.xaml</p><p>Add Depth frame ready handler</p></blockquote><p><strong>Project Information URL:</strong> <a title="http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx" href="http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx">http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx</a></p><p><a href="http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx" target="_blank"><img title="SNAGHTML145b920c" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML145b920c%5B5%5D.png" alt="SNAGHTML145b920c" width="398" height="364" border="0"></a></p><p><a href="http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx" target="_blank"><img title="SNAGHTML145bf679" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML145bf679%5B5%5D.png" alt="SNAGHTML145bf679" width="390" height="364" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML14607124%5B3%5D.png" target="_blank"><img title="SNAGHTML14607124" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML14607124_thumb.png" alt="SNAGHTML14607124" width="520" height="290" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML146054de%5B3%5D.png" target="_blank"><img title="SNAGHTML146054de" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML146054de_thumb.png" alt="SNAGHTML146054de" width="520" height="353" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML1465ce80%5B3%5D.png" target="_blank"><img title="SNAGHTML1465ce80" src="http://files.channel9.msdn.com/wlwimages/f1dda9cc6de74512b7c19f0101402403/SNAGHTML1465ce80_thumb.png" alt="SNAGHTML1465ce80" width="520" height="353" border="0"></a></p><p>Contact Information:</p><ul><li>Blog: <a title="http://blogs.msdn.com/b/ampuri" href="http://blogs.msdn.com/b/ampuri">http://blogs.msdn.com/b/ampuri</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:e94e02d77f5949c5abc5a0330178e65e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Kinect-for-Windows-SDK-color-and-depth-streams-example</comments>
      <itunes:summary>Today&#39;s project is a very simple, straight forward and easy to understand example for capturing and displaying the image and depth streams from the Kinect. My thinking in highlighting this in the Gallery is that it does the one, well two, things simply and well. You don&#39;t have to dig through other examples or samples, it&#39;s just right there. In literally minutes (I think it took me less than one) you can copy-n-paste your way to displaying Kinect color &amp;amp; depth streams. Kinect for Windows SDK– color, and depth streamsColor Stream in WPF ApplicationAdd Image control in MainWindow.xaml in the Window Grid Add enabling color stream in MainWindow() constructor of Main.Window.xaml Add color frame ready handler Depth Stream in WPF ApplicationAdd Image control in MainWindow.xaml in the Window grid Add enabling depth stream in MainWindow() constructor of Main.Window.xaml Add Depth frame ready handler Project Information URL: http://blogs.msdn.com/b/ampuri/archive/2012/04/13/kinect-for-windows-sdk.aspx      Contact Information: Blog: http://blogs.msdn.com/b/ampuri </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/kinect/Kinect-for-Windows-SDK-color-and-depth-streams-example</link>
      <pubDate>Tue, 17 Apr 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Kinect-for-Windows-SDK-color-and-depth-streams-example</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/c9b6a5b9-a94e-4e4e-8ca4-4db743514cb1.png" height="67" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/0fbd43bf-de52-4dd6-b105-c4a0b61a6712.png" height="147" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/kinect/Kinect-for-Windows-SDK-color-and-depth-streams-example/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>Kinect</category>
      <category>WPF</category>
      <category>Kinect SDK</category>
      <category>Kinect SDK</category>
    </item>
  <item>
      <title>I see what you&#39;re hearing... With the WPF Sound Visualization Library</title>
      <description><![CDATA[<p>Today's WPF Wednesday is a library that I think some of you will have some fun with... I came across this project by accident, but the more I looked at it the cooler I thought it was.</p><p>Do audio stuff? Need equalizer like controls? A running time digital clock? Display Album Art for an MP3? A Spectrum Analyzer? Want to visualize audio waveforms as it plays? You'll want this...</p><h2><a href="http://wpfsvl.codeplex.com/" target="_blank">WPF Sound Visualization Library</a></h2><blockquote><p>The WPF Sound Visualization Library is a collection of WPF Controls for graphically displaying data related to sound processing. Current controls include a Spectrum Analyzer, Waveform Timeline, and an Album Art Display Panel.</p></blockquote><p>Here's a snap of it running on my notebook (which ran the first time with no issues);</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9b0f02a%5B3%5D.png" target="_blank"><img title="SNAGHTML9b0f02a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9b0f02a_thumb.png" alt="SNAGHTML9b0f02a" width="575" height="407" border="0"></a></p><p>What I found cool is that there's two samples, using different audio libraries, NAudio and BASS.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B35%5D-4.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B7%5D-21.png" alt="image" width="251" height="427" border="0"></a></p><p>The library is provided as source too... So not only do we get some cool controls, but the source for those controls too (and you know how source makes me a happy camper...)</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B39%5D-3.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B9%5D-16.png" alt="image" width="236" height="427" border="0"></a>&nbsp;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9b808aa%5B4%5D.png" target="_blank"><img title="SNAGHTML9b808aa" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML9b808aa_thumb%5B1%5D.png" alt="SNAGHTML9b808aa" width="670" height="416" border="0"></a></p><p>Here's some more information on</p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B31%5D-7.png" alt="image" width="670" height="394" border="0"></a></p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B28%5D-3.png" alt="image" width="651" height="269" border="0"></a></p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B27%5D-6.png" alt="image" width="665" height="227" border="0"></a></p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B26%5D-5.png" alt="image" width="670" height="267" border="0"></a></p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B25%5D-7.png" alt="image" width="650" height="193" border="0"></a></p><p><a href="http://wpfsvl.codeplex.com/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B24%5D-6.png" alt="image" width="657" height="173" border="0"></a></p><p>If you're into build audio based/related WPF applications or just want to see a cool control set, you've got to see this &quot;Visualization&quot; project...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:cf4b8b06cdcd47bd80aea00f01303c6b">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/I-see-what-youre-hearing-With-the-WPF-Sound-Visualization-Library</comments>
      <itunes:summary>Today&#39;s WPF Wednesday is a library that I think some of you will have some fun with... I came across this project by accident, but the more I looked at it the cooler I thought it was. Do audio stuff? Need equalizer like controls? A running time digital clock? Display Album Art for an MP3? A Spectrum Analyzer? Want to visualize audio waveforms as it plays? You&#39;ll want this... WPF Sound Visualization LibraryThe WPF Sound Visualization Library is a collection of WPF Controls for graphically displaying data related to sound processing. Current controls include a Spectrum Analyzer, Waveform Timeline, and an Album Art Display Panel. Here&#39;s a snap of it running on my notebook (which ran the first time with no issues);  What I found cool is that there&#39;s two samples, using different audio libraries, NAudio and BASS.  The library is provided as source too... So not only do we get some cool controls, but the source for those controls too (and you know how source makes me a happy camper...) &amp;nbsp;  Here&#39;s some more information on       If you&#39;re into build audio based/related WPF applications or just want to see a cool control set, you&#39;ve got to see this &amp;quot;Visualization&amp;quot; project... </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/I-see-what-youre-hearing-With-the-WPF-Sound-Visualization-Library</link>
      <pubDate>Wed, 14 Mar 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/I-see-what-youre-hearing-With-the-WPF-Sound-Visualization-Library</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/9afc9abc-8083-423b-a839-b3f1d3cef3ef.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/21bae9de-0460-4444-8e10-3325fb0c6651.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/I-see-what-youre-hearing-With-the-WPF-Sound-Visualization-Library/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Adding some spark to your next WPF project with WPFSpark</title>
      <description><![CDATA[<p>Today's WPF Wednesday project (Yeah, I know, sometimes it &quot;Web Wednesday&quot; sometimes &quot;Wild Wednesday&quot; sometimes &quot;I'm not really sure, nothing rimes with W Wednesday&quot;... I'm doing it on purpose to keep the content fresh...&nbsp;no, really... well that's my story and I'm sticking with it. LOL <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /> is one that helps you add some professional touches, look and feel, to your WPF UI's. Oh and you get the source for the library too, so you can add some spark to your brain too.</p><h2><a href="http://wpfspark.codeplex.com/" target="_blank">WPFSpark</a></h2><blockquote><p><strong>WPFSpark</strong> is a library of user controls which can be used by developers to provide a rich User Experience in their applications.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-34.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-33.png" alt="image" width="277" height="407" border="0"></a></p></blockquote><p>Before we go to far, there's a series of great <a href="http://www.codeproject.com" target="_blank">Code Project</a> articles that covers each control...</p><ol><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_SprocketControl.aspx">WPFSpark: 1 of n: SprocketControl</a> </li><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_ToggleSwitch.aspx">WPFSpark: 2 of n: ToggleSwitch</a> </li><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_FluidWrapPanel.aspx">WPFSpark: 3 of n: FluidWrapPanel</a> </li><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_SparkWindow.aspx">WPFSpark: 4 of n: SparkWindow</a> </li><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_FluidPivotPanel.aspx">WPFSpark: 5 of n: FluidPivotPanel</a> </li><li><a href="http://www.codeproject.com/KB/WPF/WPFSpark_FluidProgressBar.aspx">WPFSpark: 6 of n: FluidProgressBar</a> </li><li><a href="http://www.codeproject.com/Articles/303697/WPFSpark-7-of-n-FluidStatusBar" target="_blank">WPFSpark: 7 of n: FluidStatusBar</a> </li></ol><p>These articles do a great job in explaining each control, how they work and how you can best use them.</p><p>Though it doesn't do the control justice, that you really have to see them in motion, here's a quick snap of each;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ecacaf%5B3%5D.png" target="_blank"><img title="SNAGHTML23ecacaf" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ecacaf_thumb.png" alt="SNAGHTML23ecacaf" width="650" height="363" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23eceb35%5B3%5D.png" target="_blank"><img title="SNAGHTML23eceb35" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23eceb35_thumb.png" alt="SNAGHTML23eceb35" width="428" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ed5f7a%5B3%5D.png" target="_blank"><img title="SNAGHTML23ed5f7a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ed5f7a_thumb.png" alt="SNAGHTML23ed5f7a" width="353" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ed6fee%5B3%5D.png" target="_blank"><img title="SNAGHTML23ed6fee" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23ed6fee_thumb.png" alt="SNAGHTML23ed6fee" width="650" height="157" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-14.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-42.png" alt="image" width="650" height="365" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f01a8e%5B3%5D.png" target="_blank"><img title="SNAGHTML23f01a8e" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f01a8e_thumb.png" alt="SNAGHTML23f01a8e" width="244" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f06997%5B3%5D.png" target="_blank"><img title="SNAGHTML23f06997" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f06997_thumb.png" alt="SNAGHTML23f06997" width="650" height="244" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f0de3a%5B3%5D.png" target="_blank"><img title="SNAGHTML23f0de3a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23f0de3a_thumb.png" alt="SNAGHTML23f0de3a" width="543" height="407" border="0"></a></p><p>Enough eye candy, let's take a look at the Solution;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-11.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-28.png" alt="image" width="284" height="295" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B13%5D-14.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B5%5D-20.png" alt="image" width="284" height="420" border="0"></a></p><p>As you can see, each control has it's own folder and demo, making it easy for you to dig into the control that interests you.</p><p>Say you found the Pivot Panel coo and interesting, because you might think that with Windows 8 coming soon, with its touch first focus that we're going to be seeing much more focus on touch and touch devices, even for &quot;normal&quot; apps, and you like the Windows Phone 7 Pivot design and want something like that in your WPF UI/App...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B20%5D-6.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B8%5D-14.png" alt="image" width="262" height="268" border="0"></a></p><p>First the demo code;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B21%5D-6.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B9%5D-13.png" alt="image" width="282" height="231" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23fddef6%5B3%5D.png" target="_blank"><img title="SNAGHTML23fddef6" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23fddef6_thumb.png" alt="SNAGHTML23fddef6" width="475" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23fe7ae6%5B3%5D.png" target="_blank"><img title="SNAGHTML23fe7ae6" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML23fe7ae6_thumb.png" alt="SNAGHTML23fe7ae6" width="650" height="361" border="0"></a></p><p>Now lets take a peek at how it's actually implemented.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML2400467e%5B3%5D.png" target="_blank"><img title="SNAGHTML2400467e" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML2400467e_thumb.png" alt="SNAGHTML2400467e" width="650" height="361" border="0"></a></p><p>In short, we've got demo code to check out if we're interested in is consuming it, or we've got the implementation code, if we're interested in seeing how something like this is built.</p><p>If you're looking to add a little zest and spark to your WPF UI's, yet are looking for something inexpensive and also something that can help you grow your own knowledge base, this project is there just waiting for you!</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:009fc69cd74640059d279ff4013e3e23">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Adding-some-spark-to-your-next-WPF-project-with-WPFSpark</comments>
      <itunes:summary>Today&#39;s WPF Wednesday project (Yeah, I know, sometimes it &amp;quot;Web Wednesday&amp;quot; sometimes &amp;quot;Wild Wednesday&amp;quot; sometimes &amp;quot;I&#39;m not really sure, nothing rimes with W Wednesday&amp;quot;... I&#39;m doing it on purpose to keep the content fresh...&amp;nbsp;no, really... well that&#39;s my story and I&#39;m sticking with it. LOL  is one that helps you add some professional touches, look and feel, to your WPF UI&#39;s. Oh and you get the source for the library too, so you can add some spark to your brain too. WPFSparkWPFSpark is a library of user controls which can be used by developers to provide a rich User Experience in their applications.  Before we go to far, there&#39;s a series of great Code Project articles that covers each control... WPFSpark: 1 of n: SprocketControl WPFSpark: 2 of n: ToggleSwitch WPFSpark: 3 of n: FluidWrapPanel WPFSpark: 4 of n: SparkWindow WPFSpark: 5 of n: FluidPivotPanel WPFSpark: 6 of n: FluidProgressBar WPFSpark: 7 of n: FluidStatusBar These articles do a great job in explaining each control, how they work and how you can best use them. Though it doesn&#39;t do the control justice, that you really have to see them in motion, here&#39;s a quick snap of each;         Enough eye candy, let&#39;s take a look at the Solution;  As you can see, each control has it&#39;s own folder and demo, making it easy for you to dig into the control that interests you. Say you found the Pivot Panel coo and interesting, because you might think that with Windows 8 coming soon, with its touch first focus that we&#39;re going to be seeing much more focus on touch and touch devices, even for &amp;quot;normal&amp;quot; apps, and you like the Windows Phone 7 Pivot design and want something like that in your WPF UI/App...  First the demo code;    Now lets take a peek at how it&#39;s actually implemented.  In short, we&#39;ve got demo code to check out if we&#39;re interested in is consuming it, or we&#39;ve got the implementation code, if we&#39;re interested in seeing how something like this is built. If you&#39;re looking to add</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Adding-some-spark-to-your-next-WPF-project-with-WPFSpark</link>
      <pubDate>Wed, 15 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Adding-some-spark-to-your-next-WPF-project-with-WPFSpark</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/a40403b0-74e1-4e0e-beff-25356b295fdf.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/29b0e3de-49b9-4710-b2c7-7ae84fdede94.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Adding-some-spark-to-your-next-WPF-project-with-WPFSpark/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>WPF</category>
    </item>
  <item>
      <title>The Extended WPF Toolkit goes v1.5</title>
      <description><![CDATA[<p>For WPF Wednesday (I think Wednesday is going to be a kind of a rotating theme day... from WPF, to Web, &quot;Wild&quot; and Weird...) we're going to take another look at the Extended WPF Toolkit project. It's been nine months since we last looked at it, <a href="http://channel9.msdn.com/coding4fun/blog/Todays-toolkit-time-with-the-Extended-WPF-Toolkit" target="_blank">Today's toolkit time with the Extended WPF Toolkit</a> and since then we've gotten a new version with a bunch of new controls.</p><p>Also last time we didn't look at the cool sample app that's included in the source tree...</p><h2><a href="http://wpftoolkit.codeplex.com/">Extended WPF Toolkit</a> - <a href="http://wpftoolkit.codeplex.com/releases/view/71499">Extended WPF Toolkit 1.5.0</a></h2><blockquote><h4>Want an easier way to install the Extended WPF Toolkit?</h4>The Extended WPF Toolkit is available on <a href="http://nuget.org/List/Packages/Extended.Wpf.Toolkit">Nuget</a>. <h3>What's in the 1.5.0 Release?</h3><ul><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=BusyIndicator">BusyIndicator</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=ButtonSpinner">ButtonSpinner</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=Calculator">Calculator</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=CalculatorUpDown">CalculatorUpDown</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=CheckListBox"><strong>CheckListBox</strong></a><strong> - New Control</strong> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=ChildWindow">ChildWindow</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=CollectionEditor"><strong>CollectionEditor</strong></a><strong> - New Control </strong></li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=CollectionEditorDialog"><strong>CollectionEditorDialog</strong></a><strong> - New Control</strong> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=ColorCanvas">ColorCanvas</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=ColorPicker">ColorPicker</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=DateTimePicker">DateTimePicker</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=DateTimeUpDown">DateTimeUpDown</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=DecimalUpDown">DecimalUpDown</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=DoubleUpDown">DoubleUpDown</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=DropDownButton"><strong>DropDownButton</strong></a><strong> - New Control</strong> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=IntegerUpDown">IntegerUpDown</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=Magnifier">Magnifier</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=MaskedTextBox">MaskedTextBox</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=MessageBox">MessageBox</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=MultiLineTextEditor"><strong>MultiLineTextEditor</strong></a><strong> - New Control </strong></li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=PrimitiveTypeCollectionEditor"><strong>PrimitiveTypeCollectionEditor</strong></a><strong> - New Control</strong> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid"><strong>PropertyGrid</strong></a><strong> - Beta</strong> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=RichTextBox">RichTextBox</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=RichTextBoxFormatBar">RichTextBoxFormatBar</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=SplitButton">SplitButton</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=TimePicker">TimePicker</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=WatermarkTextBox">WatermarkTextBox</a> </li><li><a href="http://wpftoolkit.codeplex.com/wikipage?title=Wizard"><strong>Wizard</strong></a><strong> - New Control</strong> </li></ul></blockquote><p>So as you can see, v1.5 has a number of new cool things to play with.</p><p>For example the Wizard control. Many app's use them and many dev's re-invent that wheel when they do. This control looks simple, yet configurable enough, that maybe we don't need to re-invent it anymore (and even if we do, since the source is available, we don't have to start from scratch! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd17de9%5B3%5D.png" target="_blank"><img title="SNAGHTMLd17de9" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd17de9_thumb.png" alt="SNAGHTMLd17de9" width="621" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd19659%5B3%5D.png" target="_blank"><img title="SNAGHTMLd19659" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd19659_thumb.png" alt="SNAGHTMLd19659" width="650" height="367" border="0"></a></p><p>Then there's the some of the other controls, new and old, too;</p><p>Like one of my favorite, the calculator control</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLbb4bf1%5B3%5D.png" target="_blank"><img title="SNAGHTMLbb4bf1" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLbb4bf1_thumb.png" alt="SNAGHTMLbb4bf1" width="621" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd43759%5B3%5D.png" target="_blank"><img title="SNAGHTMLd43759" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd43759_thumb.png" alt="SNAGHTMLd43759" width="650" height="367" border="0"></a></p><p>Or the watermark textbox</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd46e60%5B3%5D.png" target="_blank"><img title="SNAGHTMLd46e60" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd46e60_thumb.png" alt="SNAGHTMLd46e60" width="650" height="367" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd483d3%5B3%5D.png" target="_blank"><img title="SNAGHTMLd483d3" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd483d3_thumb.png" alt="SNAGHTMLd483d3" width="650" height="367" border="0"></a></p><p>Or the new WPF Property Grid;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd68bbf%5B3%5D.png" target="_blank"><img title="SNAGHTMLd68bbf" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTMLd68bbf_thumb.png" alt="SNAGHTMLd68bbf" width="629" height="407" border="0"></a></p><p>One thing about these samples... They are &quot;live.&quot; They are not static examples or screenshots, but instead live, working code.</p><p>Speaking of the Sample app. I thought it very cool that the sample app used <a href="http://compositewpf.codeplex.com/" target="_blank">Prism</a>. Prism is meant to help you build composite applications, separating the shell and components and allowing them all to evolve independently.</p><p>So what does that mean? It means that what you're seeing above is a simple shell that hosts modules that do the work. That once created, you're pretty much done with the shell and you can focus on the specific modules.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B7%5D-10.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-25.png" alt="image" width="304" height="427" border="0"></a></p><p>The Sample shell is a simple host for the sample modules. In this case modules are added to the shell via the app.config.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B10%5D-17.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-25.png" alt="image" width="650" height="263" border="0"></a></p><p>If we take a peek at the wizard sample module;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B13%5D-12.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B5%5D-18.png" alt="image" width="650" height="351" border="0"></a></p><p>Okay, okay, I know, enough samples. Here's a snap of the Toolkit project itself;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B20%5D-5.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B8%5D-12.png" alt="image" width="237" height="427" border="0"></a></p><p>As you can see the Toolkit project is well segmented by control, making it very easy for you to find the source for the control of interest. For example, for the wizard control;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B23%5D-4.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B9%5D-11.png" alt="image" width="650" height="351" border="0"></a></p><p>If you're building WPF applications or re-usable controls for them, this toolkit is one you should check out...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:7143734dec414a278adc9fd80140ed1e">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/The-Extended-WPF-Toolkit-goes-v15</comments>
      <itunes:summary>For WPF Wednesday (I think Wednesday is going to be a kind of a rotating theme day... from WPF, to Web, &amp;quot;Wild&amp;quot; and Weird...) we&#39;re going to take another look at the Extended WPF Toolkit project. It&#39;s been nine months since we last looked at it, Today&#39;s toolkit time with the Extended WPF Toolkit and since then we&#39;ve gotten a new version with a bunch of new controls. Also last time we didn&#39;t look at the cool sample app that&#39;s included in the source tree... Extended WPF Toolkit - Extended WPF Toolkit 1.5.0Want an easier way to install the Extended WPF Toolkit?The Extended WPF Toolkit is available on Nuget. What&#39;s in the 1.5.0 Release?BusyIndicator ButtonSpinner Calculator CalculatorUpDown CheckListBox - New Control ChildWindow CollectionEditor - New Control CollectionEditorDialog - New Control ColorCanvas ColorPicker DateTimePicker DateTimeUpDown DecimalUpDown DoubleUpDown DropDownButton - New Control IntegerUpDown Magnifier MaskedTextBox MessageBox MultiLineTextEditor - New Control PrimitiveTypeCollectionEditor - New Control PropertyGrid - Beta RichTextBox RichTextBoxFormatBar SplitButton TimePicker WatermarkTextBox Wizard - New Control So as you can see, v1.5 has a number of new cool things to play with. For example the Wizard control. Many app&#39;s use them and many dev&#39;s re-invent that wheel when they do. This control looks simple, yet configurable enough, that maybe we don&#39;t need to re-invent it anymore (and even if we do, since the source is available, we don&#39;t have to start from scratch!    Then there&#39;s the some of the other controls, new and old, too; Like one of my favorite, the calculator control   Or the watermark textbox   Or the new WPF Property Grid;  One thing about these samples... They are &amp;quot;live.&amp;quot; They are not static examples or screenshots, but instead live, working code. Speaking of the Sample app. I thought it very cool that the sample app used Prism. Prism is meant to help you build composite applications, separating the shell and </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/The-Extended-WPF-Toolkit-goes-v15</link>
      <pubDate>Wed, 18 Jan 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/The-Extended-WPF-Toolkit-goes-v15</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/99020c1f-dc46-4fce-94b7-f0590fcd93ab.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/5abac0f6-f440-4ac0-b0be-1328e051f767.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>6</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/The-Extended-WPF-Toolkit-goes-v15/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Understanding Event Driven Programming - 23</title>
      <description><![CDATA[<p><span>In this lesson we demonstrate how events are utilized in the .NET Framework Class Library specific to&nbsp;WPF and&nbsp;<a href="http://ASP.NET" target="_blank">ASP.NET</a>&nbsp;Web Forms applications. In&nbsp;these examples, we see how C# is generated by the IDE to &quot;wire up&quot; a user action or application event to the code that handles that event. The point is that there's a pattern to how .NET works with events and how events drive most Graphical User Interface based applications.</span></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:3ff13a7e0a074f5580979f9e0183dd40">]]></description>
      <comments>http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners/Understanding-Event-Driven-Programming-23</comments>
      <itunes:summary>In this lesson we demonstrate how events are utilized in the .NET Framework Class Library specific to&amp;nbsp;WPF and&amp;nbsp;ASP.NET&amp;nbsp;Web Forms applications. In&amp;nbsp;these examples, we see how C# is generated by the IDE to &amp;quot;wire up&amp;quot; a user action or application event to the code that handles that event. The point is that there&#39;s a pattern to how .NET works with events and how events drive most Graphical User Interface based applications. </itunes:summary>
      <itunes:duration>893</itunes:duration>
      <link>http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners/Understanding-Event-Driven-Programming-23</link>
      <pubDate>Mon, 21 Nov 2011 17:22:25 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners/Understanding-Event-Driven-Programming-23</guid>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_2MB_ch9.wmv" expression="full" duration="893" fileSize="259707673" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_ch9.mp3" expression="full" duration="893" fileSize="7149413" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_ch9.webm" expression="full" duration="893" fileSize="55246166" type="video/webm" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_ch9.wma" expression="full" duration="893" fileSize="7232603" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_high_ch9.mp4" expression="full" duration="893" fileSize="149340476" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_low_ch9.mp4" expression="full" duration="893" fileSize="25020733" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_med_ch9.mp4" expression="full" duration="893" fileSize="113471882" type="video/mp4" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ak.channel9.msdn.com/ch9/dd40/3ff13a7e-0a07-4f55-8097-9f9e0183dd40/23UnderstandingEventDriveProgramming_2MB_ch9.wmv" length="259707673" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Clint Rutkas, Bob Tabor, Golnaz</dc:creator>
      <itunes:author>Clint Rutkas, Bob Tabor, Golnaz</itunes:author>
      <slash:comments>34</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners/Understanding-Event-Driven-Programming-23/RSS</wfw:commentRss>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>Visual Studio</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Touch Workshop Part 1</title>
      <description><![CDATA[ <p>Touch Workshop Belgium - Part 1</p><p>Speaker : Christophe De Baene, RealDolmen</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/wpf/RSS&WT.dl=0&WT.entryid=Entry:RSSView:31d98da3b506493b98829efd00bae4e7">]]></description>
      <comments>http://channel9.msdn.com/Blogs/liese/Touch-Workshop-Part-1</comments>
      <itunes:summary> Touch Workshop Belgium - Part 1 Speaker : Christophe De Baene, RealDolmen </itunes:summary>
      <itunes:duration>2030</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/liese/Touch-Workshop-Part-1</link>
      <pubDate>Tue, 14 Jun 2011 06:01:21 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/liese/Touch-Workshop-Part-1</guid>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_100_ch9.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_220_ch9.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_512_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:thumbnail url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_custom_ch9.jpg" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_2MB_ch9.wmv" expression="full" duration="2030" fileSize="69745671" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_ch9.mp3" expression="full" duration="2030" fileSize="16247627" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_ch9.wma" expression="full" duration="2030" fileSize="16430851" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_ch9.wmv" expression="full" duration="2030" fileSize="103681613" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_high_ch9.mp4" expression="full" duration="2030" fileSize="533922922" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_low_ch9.mp4" expression="full" duration="2030" fileSize="43834614" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_Zune_ch9.wmv" expression="full" duration="2030" fileSize="73537666" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://smooth.ch9.ms/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1.ism/manifest" expression="full" duration="2030" fileSize="8610" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ak.channel9.msdn.com/ch9/e4e7/31d98da3-b506-493b-9882-9efd00bae4e7/touchworkshoppart1_ch9.wmv" length="103681613" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Anthony de Bruyn</dc:creator>
      <itunes:author>Anthony de Bruyn</itunes:author>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/liese/Touch-Workshop-Part-1/RSS</wfw:commentRss>
      <category>Belgium</category>
      <category>BeLux</category>
      <category>fr-be</category>
      <category>ISV</category>
      <category>Multi-touch</category>
      <category>NL-BE</category>
      <category>Silverlight</category>
      <category>Touch</category>
      <category>Windows 7</category>
      <category>WPF</category>
      <category>Multi Touch</category>
    </item>    
</channel>
</rss>