<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Adam Nathan's Blog : WPF</title><link>http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx</link><description>Tags: WPF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Petzold strikes again!</title><link>http://blogs.msdn.com/adam_nathan/archive/2007/12/29/petzold-strikes-again.aspx</link><pubDate>Sat, 29 Dec 2007 20:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6898951</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/6898951.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=6898951</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=6898951</wfw:comment><description>&lt;P&gt;(Or, rather, struck again last summer.)&amp;nbsp; I just found &lt;A class="" href="http://www.codinghorror.com/blog/archives/000934.html" mce_href="http://www.codinghorror.com/blog/archives/000934.html"&gt;Jeff's post about receiving a book from Petzold complete with witty comments&lt;/A&gt;.&amp;nbsp; I was also a lucky recipient of an&amp;nbsp;autographed book, so I thought I'd share what Petzold had to say to me:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG title="No color, alas, but plenty of depth!" style="WIDTH: 420px; HEIGHT: 263px" height=263 alt="No color, alas, but plenty of depth!" src="http://adamnathan.net/blog/images/petzold.jpg" width=420 mce_src="http://adamnathan.net/blog/images/petzold.jpg"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Funny stuff!&amp;nbsp; (He's referring to &lt;A class="" href="http://www.codinghorror.com/blog/archives/000846.html" mce_href="http://www.codinghorror.com/blog/archives/000846.html"&gt;this discussion&lt;/A&gt;, in case you missed it.)&amp;nbsp; I haven't had a chance to read the book, but it looks really good.&amp;nbsp; To say "thank you," I've been meaning to send him a signed copy of &lt;A class="" href="http://www.amazon.com/Silverlight-1-0-Unleashed-Adam-Nathan/dp/0672330075?ie=UTF8&amp;amp;tag=adamnathannet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672328917" mce_href="http://www.amazon.com/Silverlight-1-0-Unleashed-Adam-Nathan/dp/0672330075?ie=UTF8&amp;amp;tag=adamnathannet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672328917"&gt;Silverlight 1.0 Unleashed&lt;/A&gt;, but I haven't been able to come up with something witty enough to say.&amp;nbsp; "No third dimension, alas, but plenty of color?"&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6898951" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Misc/default.aspx">Misc</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Today's ego boosts</title><link>http://blogs.msdn.com/adam_nathan/archive/2007/12/28/today-s-ego-boosts.aspx</link><pubDate>Fri, 28 Dec 2007 17:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6885953</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/6885953.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=6885953</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=6885953</wfw:comment><description>&lt;P&gt;&lt;A class="" href="http://www.pcworld.com/" mce_href="http://www.pcworld.com/"&gt;PC World&lt;/A&gt; has just named &lt;A class="" href="http://www.popfly.com/" mce_href="http://www.popfly.com"&gt;Popfly&lt;/A&gt; one of the "&lt;A class="" href="http://www.pcworld.com/article/id,140663-page,5-c,technology/article.html" mce_href="http://www.pcworld.com/article/id,140663-page,5-c,technology/article.html"&gt;25 Most Innovative Products of the Year&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://www.amazon.com/gp/product/0672328917?ie=UTF8&amp;amp;tag=adamnathannet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672328917" mce_href="http://www.amazon.com/gp/product/0672328917?ie=UTF8&amp;amp;tag=adamnathannet-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0672328917"&gt;WPF Unleashed&lt;/A&gt; has just been nominated for a &lt;A class="" href="http://joltawards.com/finalists.html" mce_href="http://joltawards.com/finalists.html"&gt;2007 Jolt Product Excellence&amp;nbsp;Award&lt;/A&gt;, which recognizes "the most innovative, trend-making, ahead-of-the-curve products"&lt;/P&gt;
&lt;P&gt;Obviously I'm really pleased and grateful about both of these developments, as both of these products have been a labor of love.&amp;nbsp;&amp;nbsp;It feels like so little time has passed since Popfly was &lt;A class="" href="http://blogs.msdn.com/johnmont/archive/2007/05/18/what-i-ve-been-doing-for-the-last-year.aspx" mce_href="http://blogs.msdn.com/johnmont/archive/2007/05/18/what-i-ve-been-doing-for-the-last-year.aspx"&gt;a team of two&lt;/A&gt;, and now we've got a nice-sized talented team (small by Microsoft's standards, of course) running full steam ahead.&amp;nbsp; And again I need to give credit to Neil Rowe at SAMS for the way we used color in WPF Unleashed, which no doubt is the most "innovative and trend-making" aspect of the book.&amp;nbsp; I work with some great people (and for a great company), which&amp;nbsp;enables recognition like this to happen.&lt;/P&gt;
&lt;P&gt;My wife is concerned that my head is no longer going to fit through the door. :)&amp;nbsp; It's too bad that when I do something differently than the way she expects it, she uses a different word than "innovative."&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6885953" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF+Unleashed/default.aspx">WPF Unleashed</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Popfly/default.aspx">Popfly</category></item><item><title>The WPF Challenge</title><link>http://blogs.msdn.com/adam_nathan/archive/2007/02/14/the-wpf-challenge.aspx</link><pubDate>Wed, 14 Feb 2007 18:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1673230</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/1673230.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=1673230</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=1673230</wfw:comment><description>&lt;A class="" href="http://joshsmithonwpf.wordpress.com/2007/02/10/the-wpf-challenge/" mce_href="http://joshsmithonwpf.wordpress.com/2007/02/10/the-wpf-challenge/"&gt;Check it out&lt;/A&gt;.&amp;nbsp; From the man &lt;A class="" href="http://joshsmithonwpf.wordpress.com/2007/02/09/review-of-wpf-unleashed/" mce_href="http://joshsmithonwpf.wordpress.com/2007/02/09/review-of-wpf-unleashed/"&gt;who thinks I use too many exclamation points&lt;/A&gt;!&amp;nbsp; (It's true.&amp;nbsp; I like exclamation points and parentheses!)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1673230" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>WPF Unleashed is flying off the shelves... even the shelf in my office!</title><link>http://blogs.msdn.com/adam_nathan/archive/2007/02/05/wpf-unleashed-is-flying-off-the-shelves-even-the-shelf-in-my-office.aspx</link><pubDate>Mon, 05 Feb 2007 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1600017</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/1600017.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=1600017</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=1600017</wfw:comment><description>&lt;P&gt;I suppose I should be flattered.&amp;nbsp; It seems that someone swiped my copy of WPF Unleashed out of my office last week!&amp;nbsp; (Nothing else appears to be missing.)&amp;nbsp; It does have a few identifying marks on it, so the perpetrator better be careful!&lt;/P&gt;
&lt;P&gt;At any rate, thanks again to those folks who have given glowing reviews at &lt;A class="" href="http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917" mce_href="http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917"&gt;Amazon&lt;/A&gt;&amp;nbsp;and on various blogs (I've seen &lt;A class="" href="http://blogs.msdn.com/jaimer/archive/2007/01/29/adam-nathan-s-windows-presentation-foundation-unleashed-book.aspx" mce_href="http://blogs.msdn.com/jaimer/archive/2007/01/29/adam-nathan-s-windows-presentation-foundation-unleashed-book.aspx"&gt;this&lt;/A&gt;, &lt;A class="" href="http://edge-loop.spaces.live.com/blog/cns!8F028CC27525BEA1!1040.entry" mce_href="http://edge-loop.spaces.live.com/blog/cns!8F028CC27525BEA1!1040.entry"&gt;this&lt;/A&gt;, &lt;A class="" href="http://rrelyea.spaces.live.com/blog/cns!167AD7A5AB58D5FE!1602.entry" mce_href="http://rrelyea.spaces.live.com/blog/cns!167AD7A5AB58D5FE!1602.entry"&gt;this&lt;/A&gt;, &lt;A class="" href="http://syncadia.com/blogs/st_jh/archive/2007/02/02/221.aspx" mce_href="http://syncadia.com/blogs/st_jh/archive/2007/02/02/221.aspx"&gt;this&lt;/A&gt;, &lt;A class="" href="http://blogs.msdn.com/mikezeff/archive/2007/01/26/windows-presentation-foundation-books.aspx" mce_href="http://blogs.msdn.com/mikezeff/archive/2007/01/26/windows-presentation-foundation-books.aspx"&gt;this&lt;/A&gt;, &lt;A class="" href="http://realworldsa.dotnetdevelopersjournal.com/windowspresentationfoundationunleashed.htm" mce_href="http://realworldsa.dotnetdevelopersjournal.com/windowspresentationfoundationunleashed.htm"&gt;this&lt;/A&gt;, and &lt;A class="" href="http://paulosay.spaces.live.com/Blog/cns!7CC9F2B7406F44D0!747.entry" mce_href="http://paulosay.spaces.live.com/Blog/cns!7CC9F2B7406F44D0!747.entry"&gt;this&lt;/A&gt;, which Babel Fish helped me translate).&amp;nbsp; It means a lot to me.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Next up, getting the samples translated to VB...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1600017" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF+Unleashed/default.aspx">WPF Unleashed</category></item><item><title>WPF Unleashed is now available!</title><link>http://blogs.msdn.com/adam_nathan/archive/2007/01/05/wpf-unleashed-is-now-available.aspx</link><pubDate>Sat, 06 Jan 2007 00:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1417842</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/1417842.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=1417842</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=1417842</wfw:comment><description>&lt;P&gt;I got my hands on two copies while on vacation and gave them to family members, but now that I'm back home I need to wait for the rest of my copies to arrive.&amp;nbsp; I snooped around the blogosphere and found two references to it:&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://edge-loop.spaces.live.com/Blog/cns!8F028CC27525BEA1!1040.entry" mce_href="http://edge-loop.spaces.live.com/Blog/cns!8F028CC27525BEA1!1040.entry"&gt;Adam Nathan's new WPF book is awesome!&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/tims/archive/2006/12/18/wpf-unleashed-new-book-from-sams-publishing.aspx" mce_href="http://blogs.msdn.com/tims/archive/2006/12/18/wpf-unleashed-new-book-from-sams-publishing.aspx"&gt;WPF Unleashed - New Book from Sams Publishing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks for the nice comments!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1417842" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF+Unleashed/default.aspx">WPF Unleashed</category></item><item><title>WPF Unleashed: The perfect stocking stuffer!</title><link>http://blogs.msdn.com/adam_nathan/archive/2006/11/13/wpf-unleashed-the-perfect-stocking-stuffer.aspx</link><pubDate>Mon, 13 Nov 2006 17:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1068732</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/1068732.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=1068732</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=1068732</wfw:comment><description>&lt;P&gt;This weekend I entered the final phase of tweaking and reviewing, so &lt;A class="" href="http://www.amazon.com/dp/0672328917" mce_href="http://www.amazon.com/dp/0672328917"&gt;WPF Unleashed&lt;/A&gt; is on the verge of being printed!&amp;nbsp; The book is now scheduled to be available right before the new year (December 27, according to Amazon).&amp;nbsp; Although this isn't quite in time for most of the upcoming holidays, perhaps you now know what to do with any Amazon gift certificates or cash you might receive!&amp;nbsp; Or maybe I should have changed the title of this post to "Reading WPF Unleashed:&amp;nbsp;A New Year's resolution you can actually accomplish!"&lt;/P&gt;
&lt;P&gt;There are two things that I'm really excited about that I haven't mentioned before:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;It's got an &lt;/STRONG&gt;&lt;A class="" href="http://blogs.msdn.com/danlehen/archive/2006/11/09/three-exciting-announcements.aspx" mce_href="http://blogs.msdn.com/danlehen/archive/2006/11/09/three-exciting-announcements.aspx"&gt;&lt;STRONG&gt;in-depth chapter on 3D&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; by none other than &lt;/STRONG&gt;&lt;A class="" href="http://viewport3d.com/" mce_href="http://viewport3d.com/"&gt;&lt;STRONG&gt;Daniel Lehenbauer&lt;/STRONG&gt;&lt;/A&gt;, the guy who implemented WPF 3D!&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;The entire book is printed in full color!&lt;/STRONG&gt;&amp;nbsp; Not only does this mean stunning figures, but the C# and XAML (and some C++) has syntax coloring just like in Visual Studio!&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Although I like to think that the content is top-notch, if nothing else the book is bound to be the most beautiful .NET book around!&amp;nbsp; I've been really impressed with how well the publishing team has been putting it together.&amp;nbsp; I did a lot of things that made it difficult to produce: the coloring, callouts within figures, callouts within code listings, intricate diagrams, four kinds of sidebars, and so on.&amp;nbsp; It's caused plenty of headaches and late nights, but I think readers will greatly benefit from this extra effort.&amp;nbsp; Below are a few random snapshots of pages (or parts of pages) to whet your appetite...&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Pieces of WPF Unleashed" alt="Pieces of WPF Unleashed" src="http://adamnathan.net/blog/images/pages.png" mce_src="http://adamnathan.net/blog/images/pages.png"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1068732" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF+Unleashed/default.aspx">WPF Unleashed</category></item><item><title>WPF Unleashed!</title><link>http://blogs.msdn.com/adam_nathan/archive/2006/05/17/599301.aspx</link><pubDate>Wed, 17 May 2006 17:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:599301</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/599301.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=599301</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=599301</wfw:comment><description>&lt;P&gt;It's official... my &lt;A href="http://www.amazon.com/gp/product/0672328917/"&gt;WPF book&lt;/A&gt; now has a title, a temporary cover,&amp;nbsp;and is listed on Amazon:&lt;/P&gt;&lt;A href="http://www.amazon.com/gp/product/0672328917/"&gt;&lt;IMG src="http://images.amazon.com/images/P/0672328917.01._AA240_SCLZZZZZZZ_V51408819_.jpg" border=0&gt;&lt;/A&gt; 
&lt;P&gt;The details aren't published yet,&amp;nbsp;but this book will have a feature that I think is quite cool... and I've never seen it done in any other book.&amp;nbsp; So stay tuned!&lt;/P&gt;
&lt;P&gt;I was surprised to read that it will be available on September 19th and that it's 576 pages long!&amp;nbsp; Considering that I still need to write about 40% of it, I'm a bit skeptical about those details...&lt;/P&gt;
&lt;P&gt;It's also listed as a "networking" book.&amp;nbsp; Hmmm...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=599301" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Aero Glass inside a WPF Window</title><link>http://blogs.msdn.com/adam_nathan/archive/2006/05/04/aero-glass-inside-a-wpf-window.aspx</link><pubDate>Thu, 04 May 2006 17:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589686</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>26</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/589686.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=589686</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=589686</wfw:comment><description>&lt;P&gt;Recently &lt;A href="http://blogs.msdn.com/tims/default.aspx" mce_href="http://blogs.msdn.com/tims/default.aspx"&gt;Tim&lt;/A&gt; shared some code for &lt;A href="http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx" mce_href="http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx"&gt;extending Windows Vista Aero "Glass" inside a Windows Forms window&lt;/A&gt;.&amp;nbsp; It sounds like he's eventually planning on showing this with WPF (among other things).&amp;nbsp; I also looked into this for my upcoming WPF book, and I&amp;nbsp;couldn't wait to share the results of my little WPF glass experiment!&amp;nbsp; Sorry, Tim, if I'm stealing your thunder!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;This code will require WPF Beta 2 or later (and Windows Vista).&amp;nbsp; I'll share the whole project (including an updated Internet Hearts app) when Beta 2 is released.&lt;/P&gt;
&lt;P&gt;I took the WPF UI I created for the &lt;A href="http://blogs.msdn.com/adam_nathan/archive/2005/09/08/462190.aspx" mce_href="http://blogs.msdn.com/adam_nathan/archive/2005/09/08/462190.aspx"&gt;Internet Hearts migration&lt;/A&gt;, slapped it in a System.Windows.Window,&amp;nbsp;and "glassified" it.&amp;nbsp; Here is the result:&lt;/P&gt;&lt;IMG src="http://adamnathan.net/blog/images/WPFglass.jpg" mce_src="http://adamnathan.net/blog/images/WPFglass.jpg"&gt; 
&lt;P&gt;I didn't change a thing in the Hearts UI, and everything worked as expected: the 2D &amp;amp; 3D animations, the elements that already had partial opacity (like the card table), etc.&lt;/P&gt;
&lt;P&gt;And when doing a "Flip 3D" (which I'm surprisingly finding more useful than the standard Alt+Tab), the result is pretty cool:&lt;/P&gt;&lt;IMG src="http://adamnathan.net/blog/images/flip3D.png" mce_src="http://adamnathan.net/blog/images/flip3D.png"&gt; 
&lt;P&gt;Of course, I'm now breaking all sorts of style, usability, and performance guidelines by my overzealous use of glass, but it's still an interesting exercise!&lt;/P&gt;
&lt;P&gt;All it took was this function, which extends the glass frame into the client area of any WPF Window based on the passed-in margin:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;public class &lt;FONT color=#008080&gt;GlassHelper&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;{&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp; public static bool &lt;/FONT&gt;ExtendGlassFrame(&lt;FONT color=teal&gt;Window&lt;/FONT&gt; window, &lt;FONT color=#008080&gt;Thickness &lt;/FONT&gt;margin)&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; (!DwmIsCompositionEnabled())&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;FONT color=#0000ff&gt;return false&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT color=#008080&gt;IntPtr&lt;/FONT&gt; hwnd = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; &lt;FONT color=#008080&gt;WindowInteropHelper&lt;/FONT&gt;(window).Handle;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; (hwnd == &lt;FONT color=#008080&gt;IntPtr&lt;/FONT&gt;.Zero)&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;throw new&lt;/FONT&gt; &lt;FONT color=#008080&gt;InvalidOperationException&lt;/FONT&gt;(&lt;FONT color=#a52a2a&gt;"The Window must be shown before extending glass."&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp; &amp;nbsp; // Set the background to transparent from both the WPF and Win32 perspectives&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;window.Background = &lt;FONT color=#008080&gt;Brushes&lt;/FONT&gt;.Transparent;&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT color=#008080&gt;HwndSource&lt;/FONT&gt;.FromHwnd(hwnd).CompositionTarget.BackgroundColor = &lt;FONT color=#008080&gt;Colors&lt;/FONT&gt;.Transparent;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp; &amp;nbsp; &lt;FONT color=#008080&gt;MARGINS &lt;/FONT&gt;margins = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; &lt;FONT color=#008080&gt;MARGINS&lt;/FONT&gt;(margin);&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DwmExtendFrameIntoClientArea(hwnd, &lt;FONT color=#0000ff&gt;ref&lt;/FONT&gt; margins);&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;return true&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;We need the HWND of the Window to pass to DwmExtendFrameIntoClientArea, and WindowInteropHelper enables us to get it.&amp;nbsp; The MARGINS structure controls how much to extend the glass on each of the four sides.&amp;nbsp; To get the "sheet of glass" effect, you can pass -1 for all four sides.&lt;/P&gt;
&lt;P&gt;The trickiest thing is knowing to set not only Window's Background to Transparent, but also the BackgroundColor of the corresponding HwndSource's CompositionTarget (which is set to black by default).&lt;/P&gt;
&lt;P&gt;The MARGINS structure passed to DwmExtendFrameIntoClientArea is similar in spirit to WPF's Thickness type, so I chose to expose Thickness from&amp;nbsp;ExtendGlassFrame and defined MARGINS with a constructor that does the conversion:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;struct&lt;/FONT&gt; &lt;FONT color=#008080&gt;MARGINS &lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#008080&gt;MARGINS&lt;/FONT&gt;(&lt;FONT color=#008080&gt;Thickness &lt;/FONT&gt;t)&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left = (&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;)t.Left;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right = (&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;)t.Right;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Top = (&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;)t.Top;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bottom = (&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;)t.Bottom;&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public int&lt;/FONT&gt; Left;&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public int&lt;/FONT&gt; Right;&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public int&lt;/FONT&gt; Top;&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public int&lt;/FONT&gt; Bottom;&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The two DWM APIs are defined as follows:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=2&gt;[&lt;FONT color=#008080&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a52a2a&gt;"dwmapi.dll"&lt;/FONT&gt;, PreserveSig=false)]&lt;BR&gt;&lt;FONT color=#0000ff&gt;static extern void&lt;/FONT&gt; DwmExtendFrameIntoClientArea(&lt;FONT color=#008080&gt;IntPtr &lt;/FONT&gt;hwnd, &lt;FONT color=#0000ff&gt;ref&lt;/FONT&gt; &lt;FONT color=#008080&gt;MARGINS &lt;/FONT&gt;margins);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=2&gt;[&lt;FONT color=#008080&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a52a2a&gt;"dwmapi.dll"&lt;/FONT&gt;, PreserveSig=false)]&lt;BR&gt;&lt;FONT color=#0000ff&gt;static extern bool&lt;/FONT&gt; DwmIsCompositionEnabled();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Finally, the Window calls ExtendGlassFrame inside OnSourceInitialized:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;protected override void&lt;/FONT&gt; OnSourceInitialized(&lt;FONT color=#008080&gt;EventArgs &lt;/FONT&gt;e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;base&lt;/FONT&gt;.OnSourceInitialized(e);&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp; // This can't be done any earlier than the SourceInitialized event:&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp; &lt;FONT color=#008080&gt;GlassHelper&lt;/FONT&gt;.ExtendGlassFrame(&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;, &lt;FONT color=#0000ff&gt;new &lt;/FONT&gt;&lt;FONT color=#008080&gt;Thickness&lt;/FONT&gt;(-1));&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Note that with Thickness&amp;nbsp;I can pass a single value (-1) that will be used for all four MARGIN fields.&lt;/P&gt;
&lt;P&gt;I'm going to add dwmapi.dll (and other Windows Vista DLLs) to &lt;A href="http://pinvoke.net/" mce_href="http://pinvoke.net/"&gt;pinvoke.net&lt;/A&gt; so folks can start sharing managed signatures for new APIs such as this.&amp;nbsp; Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=589686" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>WPF Book Update (and SD West 2006)</title><link>http://blogs.msdn.com/adam_nathan/archive/2006/03/16/552389.aspx</link><pubDate>Thu, 16 Mar 2006 17:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:552389</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/552389.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=552389</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=552389</wfw:comment><description>&lt;P&gt;Long time no blog, but I’ve got a good excuse.&amp;nbsp; Since my last post, I’ve become a father!&amp;nbsp; This event, of course, made me seriously doubt (even more than usual) the wisdom of writing another book. Here's a quote from my wife:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;“You wrote a book during our first year of marriage.&amp;nbsp; You’re writing a book during your first year of fatherhood.&amp;nbsp; Are there any more firsts you can ruin?”&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;For some reason, explaining that I can’t control the timing of ground-breaking Microsoft technologies didn’t help my case!&lt;/P&gt;
&lt;P&gt;I almost called it quits, but I’m once again writing (every night from 9 to midnight, while my son is sleeping) and actually making good progress. I started in November, and now I’m about half-way done (with the first draft, anyway)!&amp;nbsp; I’m really excited about the book, but it’s still too early to give specifics.&amp;nbsp; So stay tuned.&lt;/P&gt;
&lt;P&gt;In other news, right now I’m flying down to Santa Clara to speak about C++ &amp;amp; WinFX at &lt;A href="http://www.sdexpo.com/"&gt;SD West 2006&lt;/A&gt;.&amp;nbsp;&amp;nbsp;Maybe I’ll see you there!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=552389" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Misc/default.aspx">Misc</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>The passing of one book and the birth of another</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/12/12/502136.aspx</link><pubDate>Mon, 12 Dec 2005 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:502136</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/502136.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=502136</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=502136</wfw:comment><description>&lt;P&gt;It's official... I got a letter informing me that &lt;A href="http://www.amazon.com/exec/obidos/ASIN/067232170X"&gt;.NET and COM&lt;/A&gt;, almost four years after&amp;nbsp;its release,&amp;nbsp;is out of print.&amp;nbsp; Of course, it still lives on &lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/B0002NYF8I/"&gt;in PDF form&lt;/A&gt;.&amp;nbsp; Like &lt;a href="http://blogs.msdn.com/adam_nathan/archive/2005/06/23/431906.aspx#437007"&gt;Luke&lt;/A&gt;, I've sometimes been baffled by the apparent lack of supply.&amp;nbsp; I've been told many times about someone that wanted to get a copy of it but wasn't able to.&amp;nbsp; But I figure if supply/demand was really out of whack then I would have heard about an Xbox 360-style bidding frenzy on eBay!&lt;/P&gt;
&lt;P&gt;After finishing .NET and COM, I said I would never write another book.&amp;nbsp; At the same time, I knew that as the years passed I would start forgetting about how bad the process really was and only remember the good things.&amp;nbsp; I really appreciate the kind words from many folks via e-mail, in person, on this blog, and on sites like Amazon.&amp;nbsp; The amount of positive feedback I've received has been overwhelming, making it even easier to forget about the enormous amount of work and sacrifices it took to create the book!&amp;nbsp; (Although I did save a particularly nasty voicemail where I got chewed out for being waaaaaaay past a number of deadlines.)&lt;/P&gt;
&lt;P&gt;Besides the fading of bad memories, something else happened this year.&amp;nbsp; My job led me to a fantastic new technology that I feel really passionate about.&amp;nbsp; Therefore, I have given into temptation and decided to write a book about my new favorite technology: WPF!&lt;/P&gt;
&lt;P&gt;Stay tuned for more info...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=502136" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Misc/default.aspx">Misc</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Managed+Code/default.aspx">Managed Code</category></item><item><title>WPF developer/designer cooperation in action!</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/11/02/488306.aspx</link><pubDate>Wed, 02 Nov 2005 20:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:488306</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/488306.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=488306</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=488306</wfw:comment><description>&lt;A href="http://www.designerslove.net"&gt;Nate Dunlap&lt;/A&gt; is an awesome designer.&amp;nbsp; Check out &lt;A href="http://www.designerslove.net/2005/10/wmp-visualizations.html"&gt;what he did&lt;/A&gt; with the &lt;a href="https://blogs.msdn.com:443/adam_nathan/archive/2005/10/24/483923.aspx"&gt;Windows Media Player Visualization project I posted last week&lt;/A&gt;.&amp;nbsp; Now, I'm guessing he has more programming skills than your average designer, but I love seeing a design go (essentially) straight from Sparkle to being live and animating inside Windows Media Player.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=488306" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>Using COM Interop to Create a WPF Visualization for Windows Media Player</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/10/24/using-com-interop-to-create-a-wpf-visualization-for-windows-media-player.aspx</link><pubDate>Mon, 24 Oct 2005 17:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:483923</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/483923.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=483923</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=483923</wfw:comment><description>&lt;P&gt;It had been awhile since I've given a talk on COM Interop &amp;amp; PInvoke, but last week I did just that for a developer lab in Redmond.&amp;nbsp; For this, I dug up my old ".NET Visualization for Windows Media Player" example, which uses C#, COM Interop, and some APIs in&amp;nbsp;System.Drawing (in other words, Windows Forms).&amp;nbsp; Of course, this compelled me to update it with WPF!&amp;nbsp; So I used Karsten's &lt;A href="http://blogs.msdn.com/karstenj/archive/2005/10/04/477018.aspx" mce_href="http://blogs.msdn.com/karstenj/archive/2005/10/04/477018.aspx"&gt;ScreenSpaceLines3D sample&lt;/A&gt; and simply made the height of the pyramid dependent on the current audio's frequency, making it feel "alive."&amp;nbsp; Here's &lt;A href="http://adamnathan.net/blog/downloads/wpfwmp.zip" mce_href="http://adamnathan.net/blog/downloads/wpfwmp.zip"&gt;the source code (compatible with the September CTP)&lt;/A&gt; and here's the result:&lt;/P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;IMG src="http://adamnathan.net/blog/images/wpfwmp.gif" mce_src="http://adamnathan.net/blog/images/wpfwmp.gif"&gt; 
&lt;P&gt;You can see that the XAML is quite simple (and doesn't need anything special for Windows Media Player integration):&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;UserControl&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;x:Class&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;AvalonControlLibrary1.UserControl1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;http://schemas.microsoft.com/winfx/avalon/2005&lt;/FONT&gt;"&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#ff0000&gt;xmlns:x&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;http://schemas.microsoft.com/winfx/xaml/2005&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;UserControl.FixedTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;Grid&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Background&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;VerticalGradient white gray&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;Viewport3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;myViewport3D&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Viewport3D.Camera&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;PerspectiveCamera&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;FarPlaneDistance&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;5&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;LookAtPoint&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,0&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Up&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,1,0&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;NearPlaneDistance&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;.1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Position&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;.5,.5,1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;FieldOfView&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;45&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Viewport3D.Camera&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Viewport3D.Models&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Model3DGroup&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Model3DGroup.Children&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt; The axes &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;--&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Red&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;20,0,0, -20,0,0&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Green&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,20,0, 0,-20,0&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Blue&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,20, 0,0,-20&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt; The pyramid &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;--&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;line1&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Black&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,0, .1,0,.1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;line2&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Black&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,0, -.1,0,-.1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;line3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Black&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,0, .1,0,-.1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;line4&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Black&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;0,0,0, -.1,0,.1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#008000 size=2&gt; The base &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;--&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;ScreenSpaceLines3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Color&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;Black&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Thickness&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;3&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;Points&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;.1,0,.1, -.1,0,.1, -.1, 0, -.1, .1, 0, -.1, .1, 0, .1&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt; /&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Model3DGroup.Children&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Model3DGroup&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Viewport3D.Models&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Viewport3D&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;Grid&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#800000 size=2&gt;UserControl.FixedTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New" size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&lt;FONT color=#800000&gt;UserControl&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;So what needs to be done in the code-behind to make this work?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Make your class implement the IWMPEffects COM interface.&amp;nbsp; I manually defined this interface in C# based on the IDL definition in the Media Player SDK. 
&lt;LI&gt;Mark your class as ComVisible(true), since by default assemblies in WPF projects are marked ComVisible(false). 
&lt;LI&gt;Register your DLL so Windows Media Player will find it.&amp;nbsp; This involves adding some keys under HKLM\Software\Microsoft\MediaPlayer\Objects\Effects.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Although IWMPEffects has several members, the most important one is &lt;STRONG&gt;Render&lt;/STRONG&gt;.&amp;nbsp; Windows Media Player calls your Render method regularly, giving you data about the audio, a handle to the device context (HDC) on which you need to draw, and a rectangle defining the bounds.&amp;nbsp; Since WPF supports interoperability with HWNDs, I first needed to get an HWND from the HDC by PInvoking to &lt;A href="http://pinvoke.net/default.aspx/user32/WindowFromDC.html" mce_href="http://pinvoke.net/default.aspx/user32/WindowFromDC.html"&gt;WindowFromDC&lt;/A&gt;.&amp;nbsp; From there, I could set my UserControl as the RootVisual for the HwndSource and update the UI appropriately.&amp;nbsp; I think the obvious next step is to use data binding, but for now I've left that as an exercise for the reader. :)&lt;/P&gt;
&lt;P&gt;Although self-registering code is a no-no, I gave the class custom registration &amp;amp; unregistration functions so all you need to do is run "REGASM /codebase AvalonControlLibrary1.dll" after building&amp;nbsp;to see the results inside Windows Media Player.&amp;nbsp; Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=483923" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category></item><item><title>XAML *Video* Playing Cards</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/09/16/463224.aspx</link><pubDate>Fri, 16 Sep 2005 20:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463224</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/463224.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=463224</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=463224</wfw:comment><description>On XAMLshare I just put the &lt;A href="http://xamlshare.com/default.aspx/Objects/VideoPlayingCards.html"&gt;source for the video playing cards&lt;/A&gt; I&amp;nbsp;showed in my PDC talk and on &lt;A href="http://channel9.msdn.com/showpost.aspx?postid=114690"&gt;the Channel 9 video&lt;/A&gt;: 
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;IMG src="http://pinvoke.net/blog/images/videocards.png"&gt;&lt;/P&gt;
&lt;P&gt;Put the XAML inside XAMLPad (Beta 1) and qualify the .wmv references with their full path.&amp;nbsp; Enjoy!&lt;/P&gt;
&lt;P&gt;Tags: &lt;A href="http://technorati.com/tag/pdc" rel=tag&gt;PDC&lt;/A&gt;, &lt;A href="http://technorati.com/tag/pdc05" rel=tag&gt;PDC05&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463224" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Hearts/default.aspx">Hearts</category></item><item><title>Light up on Windows Vista: The "Top 10" List</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/09/12/463211.aspx</link><pubDate>Tue, 13 Sep 2005 08:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463211</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/463211.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=463211</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=463211</wfw:comment><description>&lt;P&gt;PDC attendees got a "top 10" poster, but the details are now live on MSDN: "&lt;A href="http://msdn.microsoft.com/windowsvista/top10/"&gt;10 things you can do to make your application shine when it runs on Windows Vista&lt;/A&gt;."&amp;nbsp; They are, in no particular order:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA1"&gt;1. Follow the Windows Vista style guidelines&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA2"&gt;2. Enrich the user experience&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA3"&gt;3. Enable users to visualize, organize, and search&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA4"&gt;4. Run securely&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA5"&gt;5. Design for reliability and manageability&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA6"&gt;6. Establish a customer feedback loop&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA7"&gt;7. Build for connected systems&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA8"&gt;8. Bring data to the user with RSS&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA9"&gt;9. Make document data accessible&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/top10/#CTA10"&gt;10. Build for mobility&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This helps frame my talk on Thursday (FUN318), since I'll be digging into 6 out of these 10 themes and show how I applied them to Internet Hearts.&amp;nbsp; I won't be covering #1 because that's not very exciting, or #3 and #9 because they don't apply to this application, or #10 (which would have been nice) because that's too much to cram into one hour.&lt;/P&gt;
&lt;P&gt;As a side note, "Light Up on Longhorn" had a much better ring than "Light Up on Windows Vista."&amp;nbsp; Does anyone have a better term for "light up"?&lt;/P&gt;
&lt;P&gt;Tags: &lt;A href="http://technorati.com/tag/pdc" rel=tag&gt;PDC&lt;/A&gt;, &lt;A href="http://technorati.com/tag/pdc05" rel=tag&gt;PDC05&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463211" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Managed+Code/default.aspx">Managed Code</category></item><item><title>Announcing www.winfxhearts.com!</title><link>http://blogs.msdn.com/adam_nathan/archive/2005/09/08/462190.aspx</link><pubDate>Thu, 08 Sep 2005 17:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462190</guid><dc:creator>Adam Nathan</dc:creator><slash:comments>19</slash:comments><comments>http://blogs.msdn.com/adam_nathan/comments/462190.aspx</comments><wfw:commentRss>http://blogs.msdn.com/adam_nathan/commentrss.aspx?PostID=462190</wfw:commentRss><wfw:comment>http://blogs.msdn.com/adam_nathan/rsscomments.aspx?PostID=462190</wfw:comment><description>&lt;P&gt;To correspond with &lt;A href="http://commnet.microsoftpdc.com/content/sessionview.aspx?TopicID=5380e71b-7cc8-4c36-a846-d422cfd73eac"&gt;my PDC talk&lt;/A&gt; about making an application "light up" on Windows Vista, I've created &lt;A href="http://www.winfxhearts.com/"&gt;www.winfxhearts.com&lt;/A&gt;.&amp;nbsp; This site has a ClickOnce link that enables you can play a version of my new &amp;amp; improved Internet Hearts game.&amp;nbsp; Here's a "before &amp;amp; after" look:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A href="http://www.winfxhearts.com/"&gt;&lt;IMG src="http://pinvoke.net/blog/images/thegamesmall.png" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This is still the good ol' Win32 application, but with a dramatically different user experience thanks to WPF and ClickOnce.&amp;nbsp; In the screenshot above, the reddish part of the new UI uses WPF (Avalon), but the chat window, menus, etc. are still Win32.&amp;nbsp; And of course the game logic is still the same.&amp;nbsp; There's no need to rewrite it!&lt;/P&gt;
&lt;P&gt;Again, I promise to blog more details after the &lt;a href="http://technorati.com/tag/pdc" rel="tag"&gt;PDC&lt;/a&gt; (and not just about Avalon &amp;amp; ClickOnce, but Indigo, Windows Vista, plus the experiences of upgrading to VC8 &amp;amp; using /CLR).&amp;nbsp; In the meantime, go ahead and try the game, or look for the Channel 9 video about WinFX Hearts &amp;amp; WPF (scheduled to appear on Monday).&lt;/P&gt;
&lt;P&gt;You can play this version on Windows Vista Beta 1, Windows XP, or Windows Server 2003, as long as &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=CE888B4C-CCBD-452F-9D90-F4B7190CCA24&amp;amp;displaylang=en"&gt;WinFX Beta 1&lt;/A&gt; is installed (and a post-Beta 2 version of the .NET Framework is &lt;EM&gt;not &lt;/EM&gt;installed).&amp;nbsp; If you're going to &lt;a href="http://technorati.com/tag/pdc05" rel="tag"&gt;PDC05&lt;/a&gt;, you can play the game on machines in the "Windows Vista Test Drive" Commnet area through Tuesday (9/13).&lt;/P&gt;
&lt;P&gt;Sure, it's not as popular a game as Solitaire or &lt;a href="https://blogs.msdn.com:443/oldnewthing/archive/2005/09/05/461035.aspx"&gt;Spider Solitaire&lt;/A&gt;, but hopefully the opportunity to play humans&amp;nbsp;is an incentive.&amp;nbsp; Before entering a game, you get to choose a name and a picture (either a standard one or any image on the web!):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;IMG src="http://winfxhearts.com/logon.png"&gt;&lt;/P&gt;
&lt;P&gt;The game doesn't begin until four players have joined, so you might have to wait awhile to play (or convince some friends to join at the same time)!&lt;/P&gt;
&lt;P&gt;Post any questions/issues/comments here.&amp;nbsp; Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462190" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Managed+Code/default.aspx">Managed Code</category><category domain="http://blogs.msdn.com/adam_nathan/archive/tags/Hearts/default.aspx">Hearts</category></item></channel></rss>