<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.wintellect.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Walt Ritscher's Blog</title><link>http://www.wintellect.com/CS/blogs/writscher/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Visual Studio debugging of GPU parallel algorithms</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/08/24/visual-studio-debugging-of-gpu-parallel-algorithms.aspx</link><pubDate>Tue, 24 Aug 2010 20:04:33 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:18211</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/18211.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=18211</wfw:commentRss><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;By now you've probably heard of the steady march toward multiple CPUs in your computer. First there were two core CPU's and then a few months later there was four core ones available. The number keeps growing, with Intel predicting 80 core within a few years.&lt;/p&gt;  &lt;p&gt;Naturally the development world looked at multiple cores and started thinking about how to write parallel algorithms. But some developers took a side road to completely different parallel programming world. These developers realized that there was another processing unit on most computers that had vastly more parallel processing power. I'm talking about your computers graphic processor unit (GPU).&lt;/p&gt;  &lt;p&gt;Modern GPUs are designed to apply parallel algorithms to pixels. The pixel information is just byte data so some smart people figured that the GPU might be good at certain non-graphic algorithms. It turns out they were right. There are problems that lend themselves to running on the GPU. These include financial, bioscience and cryptography problems.&lt;/p&gt;  &lt;p&gt;NVIDIA is a big player in the GPU world and they took notice of this new development. And they decided to enhance the market by creating specialized development tools. Here's what I find interesting; NVIDIA decided to build a Visual Studio extension to permit multi-threaded, parallel debugging for these new GPU applications.&lt;/p&gt;  &lt;p&gt;In July 2010 NVIDIA released a free edition of a tool called Parallel Nsight. &lt;a href="http://developer.nvidia.com/object/nsight.html"&gt;http://developer.nvidia.com/object/nsight.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Quote from NVIDIA site&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;What could you do with your application running 5 – 50 times faster? Develop an &lt;a href="http://www.nvidia.com/object/cuda_medical.html"&gt;innovative approach to cancer detection&lt;/a&gt;? Analyze &lt;a href="http://www.nvidia.com/object/cuda_finance.html"&gt;financial options in real-time&lt;/a&gt;? Discover &lt;a href="http://www.nvidia.com/object/cuda_energy.html"&gt;hidden oil reserves&lt;/a&gt;? Create &lt;a href="http://www.nvidia.com/object/physx_new.html"&gt;award winning game physics&lt;/a&gt;? Process HD video &lt;a href="http://www.nvidia.com/object/adobe_PremiereproCS5.html"&gt;to allow your customers to meet deadlines&lt;/a&gt;? Our partners are doing all of the above, and more.       &lt;br /&gt;The power of GPU Computing is already delivering game changing performance increases to the Medical, Finance, Energy, Consumer and Research fields. For over 1,000 customer stories, visit &lt;a href="http://www.nvidia.com/cuda"&gt;www.nvidia.com/cuda&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This tool integrates within Visual Studio 2008 SP1. According to NVIDIA they will have a working version for Visual Studio 2010 by the end of the year.&lt;/p&gt;  &lt;p&gt;Nsight includes approximately ten tools that simplify debugging, profiling an integrated build tools. It fully exploits the Visual Studio debugging Windows.&lt;/p&gt;  &lt;p&gt;I still find it fascinating what we can do with computers.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=18211" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/Graphics/default.aspx">Graphics</category><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/GPU/default.aspx">GPU</category></item><item><title>Still seats available in the upcoming Wintellect WPF virtual class</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/08/20/still-seats-available-in-the-upcoming-wintellect-wpf-virtual-class.aspx</link><pubDate>Fri, 20 Aug 2010 19:39:34 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:18155</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/18155.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=18155</wfw:commentRss><description>&lt;p&gt;Once or twice a year Wintellect offers my Windows Presentation Foundation (WPF) class as a two day virtual online class. it’s a busy two days, I cram a lot information about WPF basics into a short amount of time. it is always hard for me to decide what to include in these two days; you see I have about eight days worth of the material that I’ve written over the last couple years. Yes WPF is a big framework.&amp;#160; Anyway I put together a good two days worth of topics and the class is always a lot of fun and filled with great people asking interesting questions.&lt;/p&gt;  &lt;p&gt;We are offering the class again this summer on August 30th.&amp;#160; Looks like we still have some seats available for the class so please join me for the two days.&amp;#160;&amp;#160; I promise you’ll learn a lot about WPF and have a good time in the process.&lt;/p&gt;  &lt;p&gt;Sign up here.&lt;/p&gt;  &lt;p&gt;&lt;a title="https://www.wintellect.com/Registration/WintellectRegistration.aspx" href="https://www.wintellect.com/Registration/WintellectRegistration.aspx"&gt;https://www.wintellect.com/Registration/WintellectRegistration.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=18155" width="1" height="1"&gt;</description></item><item><title>Remote Debugging Startup procedures in WPF</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/08/10/remote-debugging-startup-procedures-in-wpf.aspx</link><pubDate>Tue, 10 Aug 2010 05:05:17 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:17979</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/17979.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=17979</wfw:commentRss><description>&lt;p&gt;This week I was debugging a problem with a WPF application.&amp;#160; Actually, it being a WPF app had little to do with the problem.&amp;#160; No, what I was testing was the installer process.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;We’re writing a new WPF frontend for an existing system and the application needs to&amp;#160; installed via a InstallShield installer.&amp;#160; It’s a legacy system and has dependencies on older systems and software.&amp;#160; For example, during the setup we install a Access 2003 mdb file into the %appdata% folder.&amp;#160;&amp;#160;&amp;#160; The installer is also supposed to install the prerequisite technologies, like .NET 4.0 and copy a files to numerous locations on the local drive.&amp;#160; Then on application start we need to dynamically find these files. Trouble was, when the app started for the first time, it immediately crashed.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Looking through event log revealed a unhandled exception as the cause of the crash.&amp;#160; The app has an event logger, but the code didn’t seem to be running.&amp;#160; Checking the installer logs didn’t show any obvious problems either.&amp;#160; I decided it was time to turn to Visual Studio remote debugging for help.&lt;/p&gt;  &lt;h4&gt;Debugging on VPC&lt;/h4&gt;  &lt;p&gt;As you might have surmised by now, I’m testing the install on a virtual PC.&amp;#160; It’s configured with undo disks, so I can roll back the install after each try. After thinking about it for a few minutes I decided put a breakpoint in the apps Main method.&amp;#160; This is trivial in most circumstances, but I wasn’t sure how to accomplish this in my scenario.&amp;#160; I didn’t want to install VS or other debuggers on the VPC.&amp;#160; This seems like a prime use case for Visual Studio 2010 remote debugging.&lt;/p&gt;  &lt;p&gt; I won’t bore you with the steps to configure you machines to enable Remote Debugging. After about 15 minutes work I had the remote debugging working. John Robbins has a nice post &lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx"&gt;about setting up Remote Debugging&lt;/a&gt; [1] on a local Virtual PC if you want to create a similar setup.&amp;#160; &lt;/p&gt;  &lt;h4&gt;How to hit breakpoint in Main method&lt;/h4&gt;  &lt;p&gt;Normally the way you remote debug it to start the msvsmon.exe on the VPC (be sure and run as administrator), then launch the app.&amp;#160; Once the app is running, you return to Visual Studio and choose &lt;strong&gt;Debug\Attach to Process,&lt;/strong&gt; then pick your instance of msvsmon and choose the remote process. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_578590EB.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_5085DE66.png" width="400" height="293" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But thing are a little tricky here. Do you see the problem with that approach?&amp;#160; Yes, by the time you get the app running and return to Visual Studio your program is long past executing the code in the Main method and other startup methods. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My solution, put a 30 second Thread.Sleep in the Main method.&amp;#160; That gave me time to switch back to the other screen and get the debugger attached.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:#2b91af;"&gt;  App &lt;/span&gt;app = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;App&lt;/span&gt;();
  &lt;span style="color:#2b91af;"&gt;Thread&lt;/span&gt;.Sleep(1000 * 30);&lt;br /&gt;  .. breakpoint here
  app.MainWindow = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MainWindow&lt;/span&gt;();
  app.MainWindow.Show();
 &lt;/pre&gt;

&lt;pre class="code"&gt;  app.Run();&lt;/pre&gt;

&lt;p&gt;It worked perfectly, I was able to trace the&amp;#160; problem to a typo in the installer.&amp;#160; I’m sure there are approaches to take however.&amp;#160; Do you have a favorite technique?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[1] &lt;a title="http://www.wintellect.com/CS/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx" href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx"&gt;http://www.wintellect.com/CS/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=17979" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Spending Time with my LG Windows Phone 7 “Developer” Device</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/08/06/spending-time-with-my-lg-windows-phone-7-developer-device.aspx</link><pubDate>Fri, 06 Aug 2010 07:29:48 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:17881</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/17881.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=17881</wfw:commentRss><description>&lt;p&gt;Tuesday morning started out good.&amp;#160; I was in a meeting room on the Microsoft campus, working on a Windows Phone 7 (wp7) application.&amp;#160; About 10:A.M. my local developer evangelist came to the room.&amp;#160; In his hand was a white and yellow box that contained my new Windows Phone.&amp;#160; Yes, I’m talking about a wp7 device made by LG.&amp;#160; The GW 910 is a phone that contains a slide out keyboard.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_422DB54B.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_6AE91A94.png" width="305" height="238" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’ve had the phone for three days now.&amp;#160; First impressions are good, the start screen was intuitive and easy to use.&amp;#160; I toured the included applications.&amp;#160; There aren’t that many, but the core ones look solid.&amp;#160; It’s a novelty to open Microsoft Excel and see the tiny spreadsheet.&amp;#160; Pinch gestures work, so it is easy to scale the cells up to a readable size.&lt;/p&gt;  &lt;p&gt;It took me a while to learn how to uninstall applications.&amp;#160; On the wp7 you press and hold the application icon.&amp;#160; After a one second wait a menu pops up which contains the uninstall menu.&amp;#160; &lt;/p&gt;  &lt;p&gt;There are still pending changes coming for the main UI.&amp;#160; Those changes are still cloaked however, you’ll need to wait a few weeks to see what’s new.&lt;/p&gt;  &lt;p&gt;I didn’t like the keyboard, I prefer the one on my HTC Touch Pro 2.&amp;#160; One the other hand, the onscreen keyboard (known as the Soft Input Panel -SIP) was fast and easy to use, once I got use to the correct way to hold my finger in relation to the virtual keys.&lt;/p&gt;  &lt;p&gt;Another hardware #fail, the touch screen is not sensitive enough.&amp;#160; I find myself touching the same icon/button repeatedly with no results.&amp;#160; This is definitely a LG issue.&amp;#160; I spent some time with the Samsung device on Wednesday and its screen was smooth and responsive. Oh, and the Samsung was noticeably faster too.&lt;/p&gt;  &lt;h3&gt;Writing and deploying apps to the phone&lt;/h3&gt;  &lt;p&gt;If you are a Silverlight developer you are going to love programming for this phone.&amp;#160;&amp;#160; Silverlight just works. Most of the time your code can be ported directly to the phone.&amp;#160; It took me less than than ten minutes to port a Bing Map demo to the phone. The only quirks are understanding what Silverlight version is on the phone. It is part Silverlight 3, some of Silverlight 4 and some extra APIs thrown in for good measure.&lt;/p&gt;  &lt;p&gt;Setting up your computer to use the deploy to the phone takes a few steps.&amp;#160; First, you must install all the wp7 tools and Beta SDK.&amp;#160; (learn more at &lt;a title="http://developer.windowsphone.com/" href="http://developer.windowsphone.com/"&gt;http://developer.windowsphone.com/&lt;/a&gt;)&amp;#160; Then you have to install the Zune Beta (aka Dorado) on your local computer.&amp;#160; Once that is done, you just connect a USB cable,make sure the Zune software is running on local computer, choose the device from the drop down in Visual Studio and press F5 to debug.&amp;#160; It’s a beautiful experience.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_770A94BB.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_3D1B51CF.png" width="210" height="99" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=17881" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category></item><item><title>Changing Hardware can Invalidate your Expression Blend License</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/27/changing-hardware-can-invalidate-your-expression-blend-license.aspx</link><pubDate>Tue, 27 Jul 2010 06:51:37 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:17368</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/17368.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=17368</wfw:commentRss><description>&lt;p&gt;Do software crises ever happen when you have plenty of free time to troubleshoot them?&amp;#160; I’m sure that they do,&amp;#160; it just doesn’t seem that way for me in the last few years.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Expression Blend Warning&lt;/h4&gt;  &lt;p&gt;The first sign of trouble appeared as a gentle nag screen in Expression Blend 4.&amp;#160; “Only 2 days left to activate your license” it whispered to me one morning. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;“What the heck?” I thought to myself.&amp;#160; I knew that I had activated the license months ago.&amp;#160; Just to be sure, I looked it up.&amp;#160; Yes, about a week after I installed Expression Blend I had requested a license key from MSDN and activated my copy.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Re-Activate&lt;/h4&gt;  &lt;p&gt;So I found my copy of the key and reactivated the license.&amp;#160;&amp;#160; This is where it’s starts to get strange.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Side Note: Some of the text is cut-off in these screen shots.&amp;#160; This is _another_ issue with Blend.&amp;#160;&amp;#160; I’m running my computer in 115% DPI settings.&amp;#160; Apparently non default DPI settings still cause problems like this.&amp;#160; I thought the Device Independent Pixel framework in WPF took care of this.&amp;#160; I guess not.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_09DEEA20.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_404C49CA.png" width="350" height="534" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Starting the activation process.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_14D80303.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_3C6E5960.png" width="350" height="122" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;First error during the activation.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_3181524B.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_4F132D4A.png" width="350" height="319" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Blend offers to retry.&amp;#160; I try again.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_4C1DC897.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_05542F8D.png" width="350" height="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Good news, or so I think.&amp;#160; Activation success.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_1AEE682A.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_181B3706.png" width="350" height="527" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Hmm. that’s not right.&amp;#160; I just activated the software.&amp;#160; Apparently the success message is wrong and I do not have a valid license yet.&lt;/p&gt;  &lt;h4&gt;Blend team members help troubleshoot&lt;/h4&gt;  &lt;p&gt;I contacted the Blend team and they put some of their licensing developers on the problem.&amp;#160;&amp;#160; I ran some license checking software and sent the results to them to analyze.&amp;#160; And they found the problem.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here’s the question from Chris that put me on the right track.&lt;/p&gt;  &lt;p&gt;“Have you made any changes to your machine??&amp;#160; (Replaced a DVD/CD drive or network card??). “&lt;/p&gt;  &lt;p&gt;Hmm. now that you mention it I have.&amp;#160; Dell replaced my motherboard a couple weeks ago.&amp;#160; Yesterday, I replaced my hard drive.&amp;#160; And yesterday is when the problem started.&lt;/p&gt;  &lt;p&gt;Back from Chris comes this simple sentence .“The license software sees the change in hardware as an attempt to get around the software licensing.”&lt;/p&gt;  &lt;p&gt;Bingo, now we know the problem.&lt;/p&gt;  &lt;h4&gt;Changing hardware may void your license&lt;/h4&gt;  &lt;p&gt;Expression Blend is not the first product from Microsoft to use this type of licensing policy.&amp;#160;&amp;#160; What’s surprising is that all my other Microsoft software on this same computer is happily working without the slightest hint of trouble.&lt;/p&gt;  &lt;p&gt;So, what is the resolution you ask?&amp;#160; I need to get a new key from MSDN.&amp;#160; Unfortunately, my subscription only grants me three activations and apparently I’ve already used them all (VPC installs?).&amp;#160; Time to call Microsoft support and plead my case.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=17368" width="1" height="1"&gt;</description></item><item><title>The BringToFront Behavior</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/20/the-bringtofront-behavior.aspx</link><pubDate>Wed, 21 Jul 2010 01:27:56 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:17121</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/17121.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=17121</wfw:commentRss><description>&lt;p&gt;Are you a WPF history buff? If so you might be familiar with the attached behaviors story. It’s a short saga, but worthy of review. Back in the early days of WPF we were learning the nuances of the new XAML system. The attached property system was an interesting subsystem of WPF, revealing a clever way to add a property to an unrelated object. A few of the XAML pioneers decide to extend this idea to behavior. Their idea was to define a behavior (code) in a class, register it with the Dependency System and then ‘attach’ the behavior to other classes.&lt;/p&gt;  &lt;p&gt;The idea had merit so the Expression Blend team brought the concept into Blend 3. They created a sub-classable type called System.Windows.Interactivity.Behavior&amp;lt;UIElement&amp;gt;, which makes it simple to create custom attached behaviors.&lt;/p&gt;  &lt;p&gt;I’m constantly thinking of ideas for new behaviors, here’s one for moving an object to the front of the other items in a Panel.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;BringToFrontBehavior &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;Behavior&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Panel&lt;/span&gt;&amp;gt;
  {
    &lt;span style="color:blue;"&gt;protected override void &lt;/span&gt;OnAttached()
    {
      &lt;span style="color:blue;"&gt;base&lt;/span&gt;.OnAttached();
      AssociatedObject.Loaded += &lt;br /&gt;           &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;RoutedEventHandler&lt;/span&gt;(AssociatedObject_Loaded);
    }

    &lt;span style="color:blue;"&gt;void &lt;/span&gt;AssociatedObject_Loaded(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color:#2b91af;"&gt;RoutedEventArgs &lt;/span&gt;e)
    {
      &lt;span style="color:blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color:blue;"&gt;var &lt;/span&gt;child &lt;span style="color:blue;"&gt;in &lt;/span&gt;AssociatedObject.Children)
      {
        child.MouseLeftButtonUp += &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MouseButtonEventHandler&lt;/span&gt;(child_MouseLeftButtonUp);
      }
    }

    &lt;span style="color:blue;"&gt;void &lt;/span&gt;child_MouseLeftButtonUp(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color:#2b91af;"&gt;MouseButtonEventArgs &lt;/span&gt;e)
    {
      BringToFront(sender);
    }

    &lt;span style="color:green;"&gt;// call this method to move element to front of ZIndex
    &lt;/span&gt;&lt;span style="color:blue;"&gt;private void &lt;/span&gt;BringToFront(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender)
    {
      &lt;span style="color:#2b91af;"&gt;Panel &lt;/span&gt;parent = (&lt;span style="color:#2b91af;"&gt;Panel&lt;/span&gt;)((&lt;span style="color:#2b91af;"&gt;FrameworkElement&lt;/span&gt;)sender).Parent;

      &lt;span style="color:blue;"&gt;int &lt;/span&gt;z = GetHighestValue(parent);

      &lt;span style="color:blue;"&gt;for &lt;/span&gt;(&lt;span style="color:blue;"&gt;int &lt;/span&gt;i = 0; i &amp;lt; parent.Children.Count; i++)
      {
        &lt;span style="color:blue;"&gt;if &lt;/span&gt;(sender.Equals(parent.Children[i]))
        {
          parent.Children[i].SetValue(&lt;span style="color:#2b91af;"&gt;Canvas&lt;/span&gt;.ZIndexProperty, z);
        }
      }
    }

    &lt;span style="color:blue;"&gt;private int G&lt;/span&gt;etHighestValue(&lt;span style="color:#2b91af;"&gt;Panel &lt;/span&gt;parent)
    {
      &lt;span style="color:blue;"&gt;int &lt;/span&gt;highest = 0;
      &lt;span style="color:blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color:blue;"&gt;var &lt;/span&gt;child &lt;span style="color:blue;"&gt;in &lt;/span&gt;parent.Children)
      {
        &lt;span style="color:blue;"&gt;var &lt;/span&gt;val = (&lt;span style="color:blue;"&gt;int&lt;/span&gt;)child.GetValue(&lt;span style="color:#2b91af;"&gt;Canvas&lt;/span&gt;.ZIndexProperty);
        &lt;span style="color:blue;"&gt;if &lt;/span&gt;(val &amp;gt; highest)
        {
          highest = val;
        }
        child.SetValue(&lt;span style="color:#2b91af;"&gt;Canvas&lt;/span&gt;.ZIndexProperty, val - 1);
      }
      &lt;span style="color:blue;"&gt;return &lt;/span&gt;highest;
    }
  }&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=17121" width="1" height="1"&gt;</description></item><item><title>Shazzam Shader Editor 1.3 is now available</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/14/shazzam-shader-editor-1-3-is-now-available.aspx</link><pubDate>Wed, 14 Jul 2010 18:51:30 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:17001</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/17001.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=17001</wfw:commentRss><description>&lt;p&gt;I work on an Open Source project called Shazzam Shader Editor.&amp;#160;&amp;#160;&amp;#160; This week, we released version 1.3.&lt;/p&gt;  &lt;p&gt;With this utility you can write, compile and test WPF/Silverlight shaders.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_5D71166C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_57864D06.png" width="450" height="443" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can learn more about this free tool at &lt;a href="http://blog.shazzam-tool.com"&gt;http://blog.shazzam-tool.com&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Learn more about the features available in Shazzam 1.3.&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blog.shazzam-tool.com/index.php/2010/07/feature-list-v1-3-remove-dependency-on-directx-sdk/"&gt;Remove dependency on DirectX SDK&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.shazzam-tool.com/index.php/2010/06/shazzam-1-3-coming-soon-with-ps_3_0/"&gt;Write more complex shaders with the PS_3 specification&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.shazzam-tool.com/index.php/2010/07/morphing-images-with-texture-map-pixel-shader/"&gt;40 new texture maps added for multi input shaders&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;New Texture picker added to Try-out tab &lt;/li&gt;    &lt;li&gt;Over 80 sample shaders &lt;/li&gt;    &lt;li&gt;20 tutorials added &lt;/li&gt;    &lt;li&gt;Changes to User Interface      &lt;ul&gt;       &lt;li&gt;Rearrange Code and Tryout tabs &lt;/li&gt;        &lt;li&gt;Remember last shader in the Shader Loader list &lt;/li&gt;        &lt;li&gt;Explore Texture Maps menu item &lt;/li&gt;        &lt;li&gt;New hot keys &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Better support options in help menu &lt;/li&gt;    &lt;li&gt;Standard Windows Installer &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Download your own copy at &lt;a href="http://shazzam-tool.com"&gt;http://shazzam-tool.com&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=17001" width="1" height="1"&gt;</description></item><item><title>Taking a Look at Content Controls</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/14/taking-a-look-at-content-controls.aspx</link><pubDate>Wed, 14 Jul 2010 17:23:43 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:16997</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/16997.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=16997</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;A fair portion of the time, the content of a FrameworkElement is text. Some elements, like TextBox and TextBlock make this obvious, by providing a Text property. The Text Property is of type String and it trivially easy to set in XAML.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;[example]&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TextBlock &lt;/span&gt;&lt;span style="color:red;"&gt;Text&lt;/span&gt;&lt;span style="color:blue;"&gt;='This control is intended to show text' /&amp;gt;     &lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;Other FrameworkElements are more flexible regarding their content. Take the ContentControls (CheckBox, Label, Button) for example. They expose the Content Property, not a Text property. Content, in this case, means a single child element. This child could be a single TextBlock or a complex nested hierarchy of children items.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;[example]&lt;/strong&gt;&lt;/p&gt;  &lt;pre class="code"&gt;    &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label &lt;/span&gt;&lt;span style="color:red;"&gt;Content&lt;/span&gt;&lt;span style="color:blue;"&gt;='This control can contain text' /&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label.Content&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StackPanel &lt;/span&gt;&lt;span style="color:red;"&gt;Orientation&lt;/span&gt;&lt;span style="color:blue;"&gt;='Horizontal'&amp;gt;
              
        &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Image &lt;/span&gt;&lt;span style="color:red;"&gt;Source&lt;/span&gt;&lt;span style="color:blue;"&gt;='geese.jpg' &lt;/span&gt;&lt;span style="color:red;"&gt;Width&lt;/span&gt;&lt;span style="color:blue;"&gt;='100'/&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TextBlock &lt;/span&gt;&lt;span style="color:red;"&gt;Text&lt;/span&gt;&lt;span style="color:blue;"&gt;='Or it can contain more complex UI' /&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StackPanel&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label.Content&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
      &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;lt;!--&amp;lt;TextBlock Content=&amp;quot;This will not parse&amp;quot; /&amp;gt;--&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;WinForm developers are often surprised to learn the Label can work with complex content. The key thing to remember about Label in WPF it that its main purpose is NOT to show text. Rather, its prime mission is to enable 'accelerator-keys' for other controls in the XAML tree. For example, if you want to permit ALT-F to move your input cursor to the First Name TextBox. To do this you place a Label and a TextBox in your XAML. Use a binding to link the two together.&lt;/p&gt;

&lt;pre&gt;&lt;strong&gt;[example]&lt;/strong&gt;&lt;br /&gt;
  &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Label &lt;/span&gt;&lt;span style="color:red;"&gt;Target&lt;/span&gt;&lt;span style="color:blue;"&gt;='{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding &lt;/span&gt;&lt;span style="color:red;"&gt;ElementName&lt;/span&gt;&lt;span style="color:blue;"&gt;=firstNameTextBox}' &lt;/span&gt;&lt;span style="color:red;"&gt;Content&lt;/span&gt;&lt;span style="color:blue;"&gt;='_First Name'/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;TextBox &lt;/span&gt;&lt;span style="color:red;"&gt;x&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:red;"&gt;Name&lt;/span&gt;&lt;span style="color:blue;"&gt;='firstNameTextBox' /&amp;gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Because the Label is a Content control you can show icons, bullets or other interesting UI in the Label.&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=16997" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Playing with the Polyline</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/06/playing-with-the-polyline.aspx</link><pubDate>Tue, 06 Jul 2010 08:35:00 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:16769</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/16769.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=16769</wfw:commentRss><description>&lt;p&gt;Let's say that you want to draw a line in WPF. You'd probably guess that there is a Line class in WPF that does the trick. You'd be right, as it turns out, there is such a class available in WPF. To use it you designate a start and end point, provide a color and line thickness and you get your desired line.&lt;/p&gt;  &lt;p&gt;Were you aware that WPF includes another line class? It's called the Polyline and the primary difference is that you provide a collection of Points, typed as a PointCollection, to the Polyline and it draws a line through each point. &lt;/p&gt;  &lt;p&gt;Here's how you do that in XAML.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_13D51B6E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_19AFBF07.png" width="450" height="161" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_3C9080B7.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_17268D49.png" width="450" height="450" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also add points in your application code like this example.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_47D994F4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_6DCF454A.png" width="450" height="172" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_6C8AAC6B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_12805CC2.png" width="450" height="448" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;h1&gt;Changing the StrokeLineJoin property&lt;/h1&gt;  &lt;p&gt;You can control the shape of the Polyline where it changes direction with the StrokLineJoin property. Choose from the three values; Round, Bevel and Miter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_154611B5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_01B8B214.png" width="450" height="568" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_0007E640.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_0D01C651.png" width="400" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h1&gt;Dynamically adding Points&lt;/h1&gt;  &lt;p&gt;If you want to allow your users to draw a poly line on screen it easy to accomplish with the following code.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_16E6B7BC.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_2A93A150.png" width="450" height="238" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_74427940.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_52E2D3A4.png" width="450" height="172" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Creating a dynamic line chart&lt;/h1&gt;  &lt;p&gt;This last example shows show to create a dynamic line chart. The interesting idea in this chart example is how it updates. When the timer fires a new Point is added to the Points collection. Then the first point in the collection is removed. Next, each point in the point collection has its X coordinate reduced by a constant amount. The effect is that the chart appears to move constantly to the left.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/image_4D93ECF3.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/image_thumb_24A8D7EA.png" width="450" height="509" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h1&gt;Source Code&lt;/h1&gt;  &lt;p&gt;&lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=WintellectPolyline&amp;amp;ReleaseId=4601"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=WintellectPolyline&amp;amp;ReleaseId=4601&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=16769" width="1" height="1"&gt;</description></item><item><title>Time to dust off this Blog</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2010/07/05/time-to-dust-of-this-blog.aspx</link><pubDate>Mon, 05 Jul 2010 23:18:36 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:16764</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/16764.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=16764</wfw:commentRss><description>&lt;p&gt;I spend a lot of time writing articles, blog posts and code.&amp;#160;&amp;#160; Most of the blog posts I write are published on my &lt;a href="http://blog.wpfwonderland.com"&gt;wpfwonderland blog&lt;/a&gt; site.&amp;#160; But I hear from the students of my Wintellect classes that they’d like to see some posts here on the Wintellect website.&amp;#160; So I’ve decide to write more items for my Wintellect blog during the next two months. &lt;/p&gt;  &lt;p&gt;Well, there is nothing more boring that posts about blogging however.&amp;#160; So I’ll quit talking now and go write a post about WPF. &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=16764" width="1" height="1"&gt;</description></item><item><title>Virtual WPF - Data-binding examples</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2009/03/12/virtual-wpf-data-binding-examples.aspx</link><pubDate>Thu, 12 Mar 2009 07:45:39 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7692</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/7692.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=7692</wfw:commentRss><description>&lt;p&gt;Data is at the heart of virtually any business application.&amp;#160; WPF ships with a flexible data binding engine that simplifies writing data centric applications.&amp;#160; I spend a lot of time during my &lt;a href="http://www.wintellect.com/CourseDetail.aspx?Course=41"&gt;WPF class&lt;/a&gt; talking about this data-binding feature.&amp;#160; In fact I devote three sections during the week to this topic.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/VirtualWPFDAtabindingexamples_B17/image_8.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="360" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/VirtualWPFDAtabindingexamples_B17/image_thumb_3.png" width="479" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Last week I added a new binding demo to the Data Templates chapter.&amp;#160; The idea is to bind a &amp;lt;MenuItem &amp;gt; header property to the contents of an XML file.&amp;#160; Changing the XML file contents results in updates to the menu structure.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;XmlDataProvider &lt;/span&gt;&lt;span style="color:red;"&gt;x&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:red;"&gt;Key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;menuKey&amp;quot;
                   &lt;/span&gt;&lt;span style="color:red;"&gt;Source&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;../menu.xml&amp;quot;
                   &lt;/span&gt;&lt;span style="color:red;"&gt;XPath&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;menus&amp;quot; /&amp;gt;
 
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style &lt;/span&gt;&lt;span style="color:red;"&gt;x&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:red;"&gt;Key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;itemStyle&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter &lt;/span&gt;&lt;span style="color:red;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MenuItem.Header&amp;quot; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding &lt;/span&gt;&lt;span style="color:red;"&gt;XPath&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;@&lt;span style="color:blue;"&gt;header}&amp;quot;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style &lt;/span&gt;&lt;span style="color:red;"&gt;x&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:red;"&gt;Key&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;categoryStyle&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter &lt;/span&gt;&lt;span style="color:red;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MenuItem.Header&amp;quot; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding &lt;/span&gt;&lt;span style="color:red;"&gt;XPath&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;@&lt;span style="color:blue;"&gt;categoryName}&amp;quot;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter &lt;/span&gt;&lt;span style="color:red;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MenuItem.ItemsSource&amp;quot; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Binding &lt;/span&gt;&lt;span style="color:red;"&gt;XPath&lt;/span&gt;&lt;span style="color:blue;"&gt;=menu}&amp;quot;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Setter &lt;/span&gt;&lt;span style="color:red;"&gt;Property&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MenuItem.ItemContainerStyle&amp;quot; &lt;/span&gt;&lt;span style="color:red;"&gt;Value&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color:#a31515;"&gt;StaticResource &lt;/span&gt;&lt;span style="color:red;"&gt;itemStyle&lt;/span&gt;&lt;span style="color:blue;"&gt;}&amp;quot;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Style&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;You can see this demo and many other data demos during my 2 day &lt;a href="https://www.wintellect.com/Registration/WintellectRegistration.aspx"&gt;WPF virtual class&lt;/a&gt;&amp;#160; on March 23-24. &lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7692" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Talking about Microsoft Surface</title><link>http://www.wintellect.com/CS/blogs/writscher/archive/2009/03/12/talking-about-microsoft-surface.aspx</link><pubDate>Thu, 12 Mar 2009 07:15:46 GMT</pubDate><guid isPermaLink="false">c9b5046a-91b6-4822-a57a-d848b8cb6435:7691</guid><dc:creator>writscher</dc:creator><slash:comments>0</slash:comments><comments>http://www.wintellect.com/CS/blogs/writscher/comments/7691.aspx</comments><wfw:commentRss>http://www.wintellect.com/CS/blogs/writscher/commentrss.aspx?PostID=7691</wfw:commentRss><description>&lt;p&gt;The last couple months have been a hectic flurry of activity. Not only have I been at several conferences and the MVP summit I've also been putting the finishing touches on our &lt;strong&gt;&lt;em&gt;&lt;a href="http://www.wintellect.com/CourseDetail.aspx?Course=49"&gt;Mastering Microsoft Surface&amp;#8482; Development with WPF&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; class.&amp;#160; This class is going to be a lot of fun to teach.&amp;#160; First of all the class is chock full of WPF content.&amp;#160; WPF is a great platform for programming Surface applications (though I'd get some arguments about that from my XNA friends).&amp;#160; The course also has a ton of information about the Surface unit and the Surface SDK.&amp;#160;&amp;#160; I don't know about you but I think the Surface is just plain fun to use.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/STARTINGup_67A/image_2.png"&gt;&lt;img height="356" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/STARTINGup_67A/image_thumb.png" width="475" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Surface was a huge hit during &lt;a href="http://blogs.tedneward.com/"&gt;Ted Neward's&lt;/a&gt;&amp;#160; MVP summit party last week. &lt;/p&gt;  &lt;h3&gt;Creating apps for Surface&lt;/h3&gt;  &lt;p&gt;I have so many ideas for Surface applications.&amp;#160; The problem,of course, is that there is only so much time in a week to get everything done.&amp;#160; I want to have a new game ready by &lt;a href="http://www.devscovery.com/"&gt;Devscovery&lt;/a&gt; NY.&amp;#160; We'll see if I can pull it off in time for the show.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/STARTINGup_67A/image_4.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="374" alt="image" src="http://www.wintellect.com/CS/blogs/writscher/WindowsLiveWriter/STARTINGup_67A/image_thumb_1.png" width="479" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.wintellect.com/CS/aggbug.aspx?PostID=7691" width="1" height="1"&gt;</description><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/WPF/default.aspx">WPF</category><category domain="http://www.wintellect.com/CS/blogs/writscher/archive/tags/Surface/default.aspx">Surface</category></item></channel></rss>
