<?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>White.Steve.Blog</title><link>http://blogs.msdn.com/b/stevewhitepsfd/</link><description>Mostly software and music, some work, but all play</description><dc:language>en-GB</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Gundam Astray Red Frame</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/07/29/gundam-astray-red-frame.aspx</link><pubDate>Mon, 30 Jul 2007 01:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4122860</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=4122860</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/07/29/gundam-astray-red-frame.aspx#comments</comments><description>&lt;P&gt;Here are some shots of my first Gundam model.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/photos/stevewhitepsfd/category30615.aspx" mce_href="http://blogs.msdn.com/photos/stevewhitepsfd/category30615.aspx"&gt;Gundam Astray Red Frame gallery&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It's a Gundam Astray Red Frame in 1/100 scale. The color scheme calls for a bright red for the frame but I wanted to experiment with something darker so I went for Hull Red which I then went over in Clear Red because it wasn't red enough. The result is a kind of chocolate color and I'm still not sure I like it. Most of the panel lines were done with oil paint and mineral spirits and took a very long time to clean up. Then, right at the end, I tried Copic Multi Liner inking pens which give a great result very quickly. In future I'll use those and/or my Koh-I-Noor Rapidograph pens which I haven't tried yet.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4122860" width="1" height="1"&gt;</description></item><item><title>Airfix 1:48 Hawker Hurricane Mk I</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/04/28/airfix-1-48-hawker-hurricane-mk-i.aspx</link><pubDate>Sun, 29 Apr 2007 06:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2319719</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=2319719</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/04/28/airfix-1-48-hawker-hurricane-mk-i.aspx#comments</comments><description>&lt;H2&gt;Kit&lt;/H2&gt;
&lt;P&gt;I bought the kit for about $13 from the local HobbyTown USA store in Redmond Town Center early in 2007. Prior to that, it must have been nearly thirty years since I'd bought and built a plastic scale model kit and that would have almost certainly been an Airfix one too, probably from a model shop in Wakefield, Yorkshire . Most of the kits in the Redmond store are by Tamiya, Dragon, Hasegawa, Revell, Italeri and Bandai so I was surprised when I saw this kit and was reminded of the familiar brand from my youth. The kit isn't particularly well detailed compared to, say, the Hasegawa Hurricane Mk II kit. But the Hasegawa is nearly twice as expensive. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha1.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha1.jpg"&gt; &lt;/P&gt;
&lt;P&gt;As a kid, my kit builds were a mess. I'd get polystyrene cement smeared on surfaces and canopies, there'd be gaps in the seams, I wouldn't be surprised if once or twice I slapped my decals on first and then tried to paint around them! Building and painting were always fun, but rushed, processes. Now I've finished my first model as an adult and I see that the polystyrene pieces in the box provide a canvas (a three-dimensional one: in some ways as blank and daunting as a real canvas, in other ways as simple as painting-by-numbers) that challenges the modeler to dress it up in the illusion of a real painted, dirtied and worn 1:1 scale object. &lt;/P&gt;
&lt;H2&gt;Build&lt;/H2&gt;
&lt;P&gt;I first washed the sprues with dish soap, rinsed and dried them. I used a Squadron sprue nipper to remove the pieces from their sprue. It stayed sharp for this project but it got blunt surprisingly quickly during the next. I tried sharpening it with a Dremel grinding stone but I wasn't happy with the result. So I tried a pair of diagonal cutting pliers which are shown in the photograph. As soon as I felt the effortless and precise action of the pliers, the nippers went straight in the waste basket. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha2.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha2.jpg"&gt; &lt;/P&gt;
&lt;P&gt;There was a lot of flash on the kit's pieces so I did a lot of scraping (with a craft knife) and sanding during the build. Similarly the fuselage, wings and tail all needed a lot of filling and sanding to smooth out the seams. For filler I used Squadron white putty and a cocktail stick. The pieces were joined with Model Master Liquid Cement For Plastic Models and I used Staples rubber bands to hold the halves of the fuselage together while the cement dried. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha3.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha3.jpg"&gt; &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha4.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha4.jpg"&gt; &lt;/P&gt;
&lt;H2&gt;Paint&lt;/H2&gt;
&lt;P&gt;I'd had to paint the cockpit during the build. I gave it a coat of flat black first to act as shadows, then went over that with dark green on a fairly dry brush. Finally I gave it a little shading and character with various shades of Doc O'Brien's weathering powders.&lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha5.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha5.jpg"&gt; 
&lt;P&gt;Before proceeding I wiped the model down with Polly S plastic prep and then airbrushed it with white primer. The color scheme I chose was that of No.85(F) squadron, RAF Advance Striking Force, Lille/Seclin, France, April 1940.&lt;/P&gt;
&lt;P&gt;I used Tamiya acrylic flat earth and dark green for the upper side camouflage pattern and it took me several attempts probably due to my inexperience with an airbrush. I don't know if it was because I wasn't cleaning it properly or whether I didn't have the paint thickness and air pressure well enough matched but I had several performance problems with the Badger airbrush. The main issue was controlling the color: far too often I'd get either all or nothing out of it, and the needle is prone to sticking in the fully open position. The Paasche airbrush (the red one in the photograph below) hasn't given me any such problems so far and it feels far more smooth, robust and precise in use. In future I'll use the Badger for clear coats and perhaps for primer and the Paashe for controlled painting. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha6.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha6.jpg"&gt; &lt;/P&gt;
&lt;P&gt;To smooth down my poor paint job I used 400 grade sandpaper which had the unfortunate side effect of taking off some panel lines on the left wing. I also used Tamiya polishing compound on a painter's rag and I think that helped to even out and subdue the gradients between the two colors. The flat black and white underside required some masking in order to get a straight line down the center of the undercarriage. I began by painting the white half. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha7.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha7.jpg"&gt; &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha8.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha8.jpg"&gt; &lt;/P&gt;
&lt;P&gt;Despite my masking efforts, some white paint managed to get through creases in the polythene onto the fuselage and tail fin and had to be touched up. I couldn't face masking up again for the black half so I just hand-brushed that with some care. There is, predictably, a world of difference in finish and smoothness between the airbrushed and hand-brushed halves as you can see in the photograph below. More polishing helped but I think I learned my lesson there. As it happens, though, you may not notice any real consequence of my impatience when you see the final photographs at the end. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha9.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha9.jpg"&gt; &lt;/P&gt;
&lt;P&gt;To seal the paint and prepare the model with a gloss surface for the decals, I applied a generous coat of Future floor finish from the airbrush. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha10.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha10.jpg"&gt; &lt;/P&gt;
&lt;P&gt;In remorse for my earlier mask-avoidance, I spent some time doing some sterile-drape-looking masking for a little airbrushing on the wing roots. I guess modeling is a little like surgery at times; more evidence of that in the following section. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha11.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha11.jpg"&gt; &lt;/P&gt;
&lt;H2&gt;Repair and customize &lt;/H2&gt;
&lt;P&gt;According to research I did, the kit had located the hole for the foot stirrup in the wrong place, and the directions show it being mounted perpendicular to the fuselage instead of parallel with it. I filled the existing hole with putty and made a new one with a drill bit in a pin vise. I used the same tool to make a hole in the top of the tail fin to take a small aerial mast which I made from some heat-stretched sprue. For the aerial itself I stretched cotton twine between the two masts and another from the forward mast to the fuselage. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha12.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha12.jpg"&gt; &lt;/P&gt;
&lt;P&gt;I decided to model the kit with the canopy open so I cut the canopy in two with a razor saw then carved the fuselage so that the rear portion of the canopy would sit down well in its retracted position. In the earlier photograph of the unpainted fuselage the light green area behind the seat is the area I stripped back with a craft knife and sandpaper. &lt;/P&gt;
&lt;P&gt;Probably the trickiest surgical job I did was repairing a wheel strut. There are four objects in the following photograph. On the left is a wheel strut from the kit which I was lucky enough to find undamaged on the carpet beside my dogs. Doubtless it got there due to some carelessness of mine. To the right of that is a damaged kit strut I found in the mouth of one of my dogs. The wheel end had been chewed off raggedly but by the time I took this photograph I'd already beveled the end in anticipation of repairing it with a new fragment. The next object is an example of the type of sprue piece I used to carve and sand the strut fragment taking shape on the right. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha13.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha13.jpg"&gt; &lt;/P&gt;
&lt;P&gt;Then it was a case of splicing together the two pieces. I beveled off the new strut fragment and glued it to the damaged kit strut. I then filled with a little putty and sanded off. It took four evenings of work from discovering the damaged piece to getting to the stage in the photograph below. As I'm sure you can tell, the repaired strut is the one on the left. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha14.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha14.jpg"&gt; &lt;/P&gt;
&lt;P&gt;I painted both struts flat black then dry-brushed them with aluminum. Then I dusted a little with the weathering powders. The struts are not identical but the repaired piece (still on the left) turned out better than I had hoped for. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha15.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha15.jpg"&gt; &lt;/P&gt;
&lt;H2&gt;Weather &lt;/H2&gt;
&lt;P&gt;With the color scheme, decals and repairs done, and the last pieces attached, the model was ready for the final stage: making a freshly-painted scale model look like a life-sized, dirty and worn vehicle. This basically involves scaling up the model's shadows and simulating the effects of weather and use. The shadows in the nooks and crannies and panel lines of a 1:48 scale model are barely visible: they do not look like vehicle shadows reduced to 1:48 scale. Applying a thin wash of black or brown darkens and deepens the recesses of the model both improving the shadows and giving the illusion of collected dirt. Other techniques involve applying paint chip effects either with dabs of a bare metal color or masking off prior to painting. Rain streaks, rust and dust are other options. &lt;/P&gt;
&lt;P&gt;Before weathering I gave the model another coat of Future floor finish. This seals in the decals and provides a gloss surface so the wash runs off the flat areas yet still pools in the recesses. I made a wash from 1 part black and brown artists' oils with about 9 parts mineral spirits. There were a few places where the wash did run into recesses but most of the panel lines on this model are raised. What worked for me was to place a drop of wash each side of a raised line and then use a fingertip to blend and smooth the paint up into the corner of the panel line. A little dry-brushing along the ridge of the panel line with chrome silver completed the effect. For the paint chips I first tried a silver leafing pen but I wasn't convinced by the results. What I preferred was to place tiny dabs of chrome silver with a fine brush and blend the occasional one with my finger. In other places dry-brushing was effective. &lt;/P&gt;
&lt;P&gt;To clean up excess wash I dipped either a rag or a napkin or a Q-tip in mineral spirits and wiped the area down. Using oils for the wash on top of the Future (which is acrylic) meant that the oil thinner would only affect the wash layer. Using an acrylic wash and hence acrylic thinner would have been hazardous to the Future. &lt;/P&gt;
&lt;P&gt;Finally I dusted the model with Doc O'Brien's weathering powders; the rusty brown color this time. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha16.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha16.jpg"&gt; &lt;/P&gt;
&lt;H2&gt;Finish &lt;/H2&gt;
&lt;P&gt;The final sealing coat was flat clear lacquer mixed about 1 to 1 with thinner. I'll leave you with some photographs of the finished model. &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha17.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha17.jpg"&gt; &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha18.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha18.jpg"&gt; &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha19.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha19.jpg"&gt; &lt;/P&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG alt="" src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha20.jpg" mce_src="http://home.btconnect.com/stevewhi/images/hurricane/042907_0256_Airfix148Ha20.jpg"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2319719" width="1" height="1"&gt;</description></item><item><title>Kerning and animating text glyphs</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/02/09/kerning-and-animating-text-glyphs.aspx</link><pubDate>Sat, 10 Feb 2007 02:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1638274</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=1638274</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2007/02/09/kerning-and-animating-text-glyphs.aspx#comments</comments><description>&lt;P&gt;This sample shows how to transform glyphs in a TextBlock. The kinds of things you can do here are letter-pair kerning and animating the translation or rotation of individual glyphs.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1638274" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-01-63-82-74/AnimatedText.zip" length="41620" type="application/x-zip-compressed" /></item><item><title>Expression Interactive Designer preview available!</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2006/01/24/517067.aspx</link><pubDate>Wed, 25 Jan 2006 00:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:517067</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=517067</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2006/01/24/517067.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial&gt;Today the Expression team&amp;nbsp;is delighted to announce the availability of a preview version of Expression Interactive Designer. This preview version is the &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=ed9f5fb2-4cfc-4d2c-9af8-580d644e3d1d&amp;amp;displaylang=en"&gt;&lt;FONT face=Arial color=#006bad&gt;&lt;STRONG&gt;January 2006 Community Technology Preview&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; [1]&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;We have compiled a set of sample applications and tutorials specifically for this CTP and you can find them on the official &lt;a href="http://blogs.msdn.com/expression"&gt;Expression team blog&lt;/A&gt; [2].&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;There are lots more resources about Expression on the &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/products/expression/"&gt;&lt;FONT face=Arial color=#006bad&gt;&lt;STRONG&gt;Microsoft Expression web site&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;. [3]&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;If you enjoyed the &lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=115387"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;previous Channel 9 video&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt; [4] featuring the Expression Interactive Designer team then you'll want to check out the new video Robert Scoble &lt;A href="http://channel9.msdn.com/showpost.aspx?postid=157843"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;hosted and posted &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;today [5]&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;[1] &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=ed9f5fb2-4cfc-4d2c-9af8-580d644e3d1d&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=ed9f5fb2-4cfc-4d2c-9af8-580d644e3d1d&amp;amp;displaylang=en&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;[2] &lt;a href="http://blogs.msdn.com/expression"&gt;http://blogs.msdn.com/expression&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;[3] &lt;A href="http://www.microsoft.com/products/expression/"&gt;http://www.microsoft.com/products/expression/&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;[4] &lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=115387"&gt;http://channel9.msdn.com/Showpost.aspx?postid=115387&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;[5] &lt;A href="http://channel9.msdn.com/showpost.aspx?postid=157843"&gt;http://channel9.msdn.com/showpost.aspx?postid=157843&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=517067" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/WPF_2C00_+Silverlight+and+Blend/">WPF, Silverlight and Blend</category></item><item><title>Sparkle, development teams, and what ‘no code’ means</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/10/06/477630.aspx</link><pubDate>Thu, 06 Oct 2005 07:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:477630</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=477630</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/10/06/477630.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Microsoft Expression “Sparkle Interactive Designer” (&lt;I style="mso-bidi-font-style: normal"&gt;Sparkle&lt;/I&gt; for short) was announced and demonstrated at the Professional Developers’ Conference in &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Los Angeles&lt;/st1:City&gt;&lt;/st1:place&gt; last month. To find out what this powerful tool is all about, see the &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/products/expression/en/default.aspx"&gt;&lt;FONT face=Arial&gt;Expression Home Page&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;, the &lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/showpost.aspx?postid=115387"&gt;&lt;FONT face=Arial&gt;Sparkle Team on Channel9&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;, and &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/winme/0509/25597/Eric_Rudder_Keynote_PDC2005_100k_300kMBR.asx"&gt;&lt;FONT face=Arial&gt;Eric Rudder’s PDC keynote&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;So, what is the Sparkle tool good for and who will use it? Well first of all, if you’re evaluating the Windows Presentation Foundation (WPF) today, you’ll have noticed that Visual Studio currently has no design surface for XAML source code. In time, Visual Studio &lt;I style="mso-bidi-font-style: normal"&gt;will&lt;/I&gt; have design support (codenamed ‘Cider’) for WPF suitable for the needs and wishes of software developers. What Sparkle will offer over and above Visual Studio’s WPF designer is a set of features aimed at professional user-experience designers.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;The kind of designers I’m talking about have creative and technical skills including graphic design, usability design, and interaction design. The &lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=116327"&gt;&lt;FONT face=Arial&gt;North Face demo&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; (also shown at PDC) is a beautiful and striking example of how WPF brings the development of creative interactions within reach and obviates a specialization in 3D computer graphics.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Developers with design sensibilities will also use Sparkle, just like designers with programming sensibilities already use Visual Studio. These skill combinations are very common – what’s less common is to be excessively talented in &lt;I style="mso-bidi-font-style: normal"&gt;both&lt;/I&gt; spheres. So Sparkle will not ‘turn developers into designers’ nor ‘require designers to be developers’ but it will give the members of large development teams the opportunity to specialize whilst preserving the &lt;I style="mso-bidi-font-style: normal"&gt;MSBuild&lt;/I&gt; format of projects transferred between Sparkle and Visual Studio.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Clemens Vasters has written an excellent blog entry about subject-area specialization in which he discusses what he calls &lt;/FONT&gt;&lt;A href="http://staff.newtelligence.net/clemensv/PermaLink,guid,fdf5f8bf-199c-47c3-8cbb-838fab12f83e.aspx"&gt;&lt;FONT face=Arial&gt;visualization developers&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;. Visualization is a component of interaction and the members of this sector of the development team may equally well be called &lt;I style="mso-bidi-font-style: normal"&gt;interaction designers&lt;/I&gt; and possibly, for the trickier coding, &lt;I style="mso-bidi-font-style: normal"&gt;interaction developers&lt;/I&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Which brings me onto what &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; means and, more importantly, what &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; means. The community regularly describes HTML, XAML, C#, VB.NET, etc as &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; which implies that any formalized, syntactically-constrained encoding is &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; (whether the logic is declarative or imperative). But often, in demonstrations of WPF and Sparkle, the speaker (myself included!) points out that &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; was written and I think this deserves some clarification.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Typing XAML into Notepad or Visual Studio is, arguably, coding and the &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; assertion is hard to support. Similarly, a Sparkle project with no code is an empty one. Rather, what’s compelling about WPF is that the semantics of the code is incredibly rich so you need less of it. What’s compelling about designing on a surface in Sparkle or Visual Studio is that the tool generates the code for you. It so happens that declarative code is more practical for tools to generate than imperative code and that a design surface is able, in real-time, to reflect edits to declarative source code whereas imperative source code is built before it is expressed. So it’s likely that great tool support, making XAML so friendly, is the reason we often overlook it as code.&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=477630" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/Software/">Software</category><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/WPF_2C00_+Silverlight+and+Blend/">WPF, Silverlight and Blend</category></item><item><title>Sparkle Hayter and the Sparkle Fan</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/09/23/473378.aspx</link><pubDate>Fri, 23 Sep 2005 22:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:473378</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=473378</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/09/23/473378.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial&gt;I’ve been a member of the Microsoft UK PSfD team for three and a half years now but, beginning on Monday,&amp;nbsp;I’m moving to&amp;nbsp;a new role in Redmond. Being an ADC has definitely been the best job experience I’ve had to date: the application development consultancy work with customers is challenging and rewarding in equal measure and my team-mates have been an inspiration and a great bunch of friends.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Our managers encourage our development in every way even if that means eventually losing us from the team. I’m excited to be moving to the corporate campus in Redmond to join the &lt;A href="http://www.microsoft.com/products/expression/en/interactive_designer/default.aspx"&gt;Expression Interactive Designer &lt;/A&gt;team as a technical writer. That means I’ll be producing conceptual writing, tutorials and sample applications. Needless to say, I'll be blogging a lot about what I get up to.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;EID's codename is Sparkle and t&lt;/FONT&gt;&lt;FONT face=Arial&gt;oday my colleagues bought me a book by a writer called Sparkle Hayter. They think that kind of thing is funny! ;-)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;I, however, am a great fan of Sparkle and I'm sure you will be too.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=473378" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/General/">General</category></item><item><title>My two SxS articles are now published in MSDN</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/07/08/436813.aspx</link><pubDate>Fri, 08 Jul 2005 16:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:436813</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=436813</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/07/08/436813.aspx#comments</comments><description>&lt;FONT face=Arial&gt;I've removed the SxS articles from the blog now because they've recently been published on MSDN. Please see my&amp;nbsp;MSDNography links section.&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436813" width="1" height="1"&gt;</description></item><item><title>Avalon 3D File System Visualizer (FolderTreemap3D)</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/07/07/436519.aspx</link><pubDate>Thu, 07 Jul 2005 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:436519</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=436519</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/07/07/436519.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://home.btconnect.com/stevewhi/graphicssamples/FolderTreemap3D.zip"&gt;&lt;FONT face=Arial&gt;Download the FolderTreemap3D sample&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;(Requires Windows Server 2003 or Windows XP, &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=41070791-8912-4F94-AC46-7CE0E386D5C9&amp;amp;displaylang=en"&gt;&lt;FONT face=Arial&gt;.NET Framework 2.0 SDK Beta 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; (or Visual Studio 2005 Beta 2), and WinFX Beta 1 RC &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en"&gt;&lt;FONT face=Arial&gt;Runtimes&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; and &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/info.aspx?u=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F5%2F4%2F0%2F5407D6E4-740E-413E-8E91-EF7AC53A478A%2Fen_winfx_sdk_beta1_RC.iso&amp;amp;na=44&amp;amp;p=0&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=b789bc8d-4f25-4823-b6aa-c5ed"&gt;&lt;FONT face=Arial&gt;SDK&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;SPAN&gt;&lt;IMG src="http://home.btconnect.com/stevewhi/images/treemap_01.JPG"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.cs.umd.edu/users/ben/"&gt;&lt;FONT face=Arial&gt;Ben Shneiderman&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; developed the &lt;/FONT&gt;&lt;A href="http://www.cs.umd.edu/hcil/treemap-history/"&gt;&lt;FONT face=Arial&gt;treemap&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; style of visualization in the early 1990s in response to the common problem of a filled hard disk. For this application, Professor Shneiderman needed an alternative to the incumbent tools (i.e. File Manager and Explorer) which, although strong at quantitative presentation of one hierarchical level of files at a time, don’t offer the aggregation needed for a high-level, qualitative view. A treemap’s strength is the reverse: perspective (or context) is more important than precision. If you’ve ever trawled up and down through the levels of a hierarchy seeking the largest files and folders as candidates for deletion then you’ll appreciate the perspective a treemap gives.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;The ‘squarified’ treemap is a refinement which minimizes the aspect ratio of each node rectangle and this is the variation I have used. But with any flat treemap, the depth of hierarchical nesting of a node is not obvious to the viewer. It occurred to me that, if a node’s nesting level is represented by its distance along the z axis, then an orthographic 3D projection would appear to be a flat treemap when viewed from the front but would reveal the spacing along the z axis when rotated. I was also curious to see the same 3D model projected with perspective.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;I have used color to distinguish folder nodes (transparent) from file nodes (colored dark in proportion to their depth). Examine the image at the beginning of the post. The entire image is a visualization of the &lt;B style="mso-bidi-font-weight: normal"&gt;%windir%/Microsoft.NET/Windows&lt;/B&gt; folder which contains the Avalon runtimes. What does the image tell us? Well, first (and without having to expand any nodes) we can see that the &lt;B style="mso-bidi-font-weight: normal"&gt;\Windows&lt;/B&gt; folder contains a single child folder named &lt;B style="mso-bidi-font-weight: normal"&gt;\v6.0.4030&lt;/B&gt; which in turn contains the &lt;B style="mso-bidi-font-weight: normal"&gt;\Avalon&lt;/B&gt; folder and a number of files. The &lt;B style="mso-bidi-font-weight: normal"&gt;\Avalon&lt;/B&gt; folder contains one large &lt;B style="mso-bidi-font-weight: normal"&gt;.msi&lt;/B&gt; file at a deeper level than the files inside &lt;B style="mso-bidi-font-weight: normal"&gt;\v6.0.4030&lt;/B&gt;. We get a qualitative sense of the relative sizes of the files and folders – e.g. &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationCore.dll&lt;/B&gt; and &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationFramework.dll&lt;/B&gt; are approximately the same size as one another and both much smaller than &lt;B style="mso-bidi-font-weight: normal"&gt;avalon.msi&lt;/B&gt;. We can also see that there is a large number of small files which we could zoom closer to if we wanted to see their names.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;The following image moves up a folder and shows, amongst other things, the combined size of the Avalon runtimes (the &lt;B style="mso-bidi-font-weight: normal"&gt;\Windows&lt;/B&gt; folder) in relation to the remainder of the .NET Framework. We can also see that, for example, &lt;B style="mso-bidi-font-weight: normal"&gt;System.ServiceModel.dll&lt;/B&gt; is a little larger than &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationCore.dll&lt;/B&gt; and &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationFramework.dll&lt;/B&gt;.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;SPAN&gt;&lt;IMG src="http://home.btconnect.com/stevewhi/images/treemap_02.JPG"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;Here are the pieces which go into this sample:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0cm" type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A generic &lt;B style="mso-bidi-font-weight: normal"&gt;DatatreeNode&lt;/B&gt; class used to build a ‘datatree’ of the data to be visualized. Using this extension point, any data which can be represented as a hierarchy (e.g. your Exchange/Outlook folders) can be processed into a treemap.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A routine to recurse into a file system folder and build a datatree from it.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A &lt;B style="mso-bidi-font-weight: normal"&gt;TreemapNode&lt;/B&gt; class (and ancillary classes) used to build a treemap from a datatree.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A routine to arrange the treemap into layers for back-to-front rendering. As the scene uses semi-transparent materials, it is defined back to front to aid correct alpha blending.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;A routine to walk the treemap layers from furthest (from the eye) to nearest and to process each node in each layer as follows:&lt;/SPAN&gt; &lt;/FONT&gt;
&lt;OL style="MARGIN-TOP: 0cm" type=a&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level2 lfo1; tab-stops: list 72.0pt"&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;Create a tree of &lt;B style="mso-bidi-font-weight: normal"&gt;Visual&lt;/B&gt;s consisting of a &lt;B style="mso-bidi-font-weight: normal"&gt;TextBlock&lt;/B&gt; inside a &lt;B style="mso-bidi-font-weight: normal"&gt;Viewbox&lt;/B&gt; inside a &lt;B style="mso-bidi-font-weight: normal"&gt;Border&lt;/B&gt;.&lt;/SPAN&gt; &lt;/FONT&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level2 lfo1; tab-stops: list 72.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;Create a &lt;B style="mso-bidi-font-weight: normal"&gt;VisualBrush&lt;/B&gt; from the above and use it as the material on a plane (a &lt;B style="mso-bidi-font-weight: normal"&gt;MeshGeometry3D&lt;/B&gt;) which is placed appropriately on the z axis.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A custom &lt;B style="mso-bidi-font-weight: normal"&gt;Viewport3D&lt;/B&gt; in which to display and manipulate the scene (the same one I introduced in the &lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx"&gt;&lt;FONT face=Arial&gt;Nendo Nessie&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; post).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;There’s a lot of information to be seen in the images here, but even more information emerges when you are able to manipulate the model yourself with the mouse. Download and build the sample and evaluate it yourself. To toggle mouse manipulation mode, use Ctrl + right-mouse-click. See the &lt;a href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx"&gt;Nendo Nessie&lt;/A&gt; post for more details.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;F&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;urthermore, information is always lost when flattening (i.e. projecting) a 3D scene for display on a traditional CRT or LCD monitor. Flat displays rely on artificial depth cues (e.g. perspective or color) to tell the eye how far away an object is. The same 3D data shown on a stereoscopic or a holographic display would preserve depth information so that the eye and brain sense true depth and can more fluently read the scene.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;It would be an interesting exercise to use the sample’s treemap generation logic inside a custom Panel.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;I’ll leave you with another of Ben Shneiderman’s visualizations – &lt;/FONT&gt;&lt;A href="http://www.cs.umd.edu/hcil/members/bshneiderman/nsd/"&gt;&lt;FONT face=Arial&gt;structured flowcharts&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; – which may offer an interesting future project for someone to realize in Avalon.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436519" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/Software/">Software</category></item><item><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 2</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/06/19/430576.aspx</link><pubDate>Sun, 19 Jun 2005 12:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430576</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=430576</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/06/19/430576.aspx#comments</comments><description>&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Command-line build 2: XAML-only NavigationApplication&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In the previous post I showed how to build a very basic C#-only Avalon application. At the end I mentioned that declaring and initializing UI is probably not best done with imperative code. This time I’ll go to the other extreme and declare a very simple application entirely in markup. In future posts I’ll settle for a mixture of markup and code-behind.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you’re familiar with ASP.NET then you’ll know about markup files and code-behind files. The idea is that UI is defined in markup, and application logic is separated out into the code-behind file. This way, in an idea world, a developer can drop a basic UI into markup, make it functional in the code-behind, then let a designer take the markup and make it beautiful. It also means that the UI and application logic needn’t be compiled at the same time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Although Windows Forms doesn’t have markup, it does have the &lt;B&gt;InitializeComponent&lt;/B&gt; method into which the Forms Designer writes a lot of UI initialization code. This gives some separation of static layout from application logic but, because the UI is initialized in imperative code, it’s not as toolable as markup. It also means the UI and application logic must be compiled together.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;XAML is Avalon’s markup. XAML can be used to declare any CLR object and it’s effectively a persistence format for CLR objects. When used with Avalon, XAML is a persistence format for Avalon objects, and Avalon offers far better flexibility and customization than ASP.NET or WinForms. XAML is XML so it is extremely toolable and it can be parsed and/or compiled separately from the application logic, even being loaded dynamically at runtime as a control tree.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;With the Beta 1 RC bits, the &lt;B&gt;Application&lt;/B&gt; we created in the previous post purely in C# can’t be done purely in XAML (I’m told it will be possible in future bits). However, we &lt;I&gt;can&lt;/I&gt; do a &lt;B&gt;NavigationApplication&lt;/B&gt; purely in XAML. A navigation application has a similar paradigm to a web application or a Wizard in that it has pages between which the user nagivates and a &lt;I&gt;Journal&lt;/I&gt; in which navigation history is remembered.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;First we’ll create a file in which to declare the application class. Create a folder called &lt;B&gt;XAML-only NavApp&lt;/B&gt; and, in it, create a new text file called &lt;B&gt;NavApp.xaml&lt;/B&gt;. Declare an empty &lt;B&gt;NavigationApplication&lt;/B&gt; element with a &lt;B&gt;StartupUri&lt;/B&gt; of &lt;B&gt;Page1.xaml&lt;/B&gt; like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;NavigationApplication xmlns="http://schemas.microsoft.com/winfx/avalon/2005" StartupUri="Page1.xaml"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In XAML, elements correspond to type names and attributes correspond to property names (unless recognised by XML, e.g. the default XML namespace declaration). What we’re doing here is declaring a partial type deriving from &lt;B&gt;System.Windows.Navigation.NavigationApplication&lt;/B&gt;. We’ll shortly be processing this markup through a XAML markup parser. The markup parser will know the &lt;B&gt;NavigationApplication&lt;/B&gt; type because we’ve specified a default XML namespace which identifies the Avalon types. I haven’t named the derived type so it’ll get a default name (actually &lt;B&gt;_Application&lt;/B&gt;). The markup parser will also assume we want a singleton instance of this class and it will generate the code to instantiate one also. We’ll look more closely at what gets generated from this XAML after we’ve built it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next, create &lt;B&gt;Page1.xaml&lt;/B&gt; containing a &lt;B&gt;Page&lt;/B&gt; element as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005" Text="Hello from Page1"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;TextBlock&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Hyperlink NavigateUri="Page2.xaml" Text="Go to Page2"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/TextBlock&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Page&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Again the Avalon XML namespace is required. The value of the &lt;B&gt;Page&lt;/B&gt; element’s &lt;B&gt;Text&lt;/B&gt; attribute will appear in the navigation application’s main window caption when this page is shown. Nested inside the &lt;B&gt;Page&lt;/B&gt; element is a &lt;B&gt;TextBlock&lt;/B&gt; element which is a control used to display simple text content. The markup parser has a set of rules by which it determines what a child element represents relative to its parent. A child element may be a complex property of its parent (e.g. &lt;B&gt;Button.Background&lt;/B&gt;); a member of the collection stored in its parent’s default property; part of its parent’s content tree; or something else.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In this case the &lt;B&gt;TextBlock&lt;/B&gt; is interpreted as being the value of the &lt;B&gt;Page&lt;/B&gt;’s &lt;B&gt;Child&lt;/B&gt; property (which is of type &lt;B&gt;UIElement&lt;/B&gt;; and &lt;B&gt;TextBlock&lt;/B&gt; &lt;I&gt;is a&lt;/I&gt; &lt;B&gt;UIElement&lt;/B&gt;). Inside the &lt;B&gt;TextBlock&lt;/B&gt; is a &lt;B&gt;Hyperlink&lt;/B&gt; element which is interpreted as the &lt;B&gt;TextBlock&lt;/B&gt;’s content.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Again, this XAML is declaring a new partial type deriving from &lt;B&gt;Page&lt;/B&gt;. Whereas the markup parser will instantiate an application instance for us without being explicitly asked, it does not do so for other classes declared in XAML. However, the application’s &lt;B&gt;StartupUri&lt;/B&gt; is set to &lt;B&gt;Page1.xaml&lt;/B&gt; which is a fairly explicit request for an instance of our &lt;B&gt;Page&lt;/B&gt;-derived class and the markup parser will generate code which will result in one. As I’ll show in a moment, this instance is actually created at runtime by another parser.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next, create &lt;B&gt;Page2.xaml&lt;/B&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005" Text="Hello from Page2"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now create a project file called &lt;B&gt;NavApp.csproj&lt;/B&gt; which contains:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;AssemblyName&amp;gt;NavApp&amp;lt;/AssemblyName&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputPath&amp;gt;.\&amp;lt;/OutputPath&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputType&amp;gt;winexe&amp;lt;/OutputType&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="System" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="WindowsBase" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationCore" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationFramework" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ApplicationDefinition Include="NavApp.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Page Include="Page1.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Page Include="Page2.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Project&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The &lt;B&gt;NavApp.csproj&lt;/B&gt; file contains the same Assembly references as the project file in the previous post, but it also has &lt;B&gt;ApplicationDefinition&lt;/B&gt; and &lt;B&gt;Page&lt;/B&gt; item types. These item types are built by code inside the &lt;B&gt;PresentationBuildTasks.dll&lt;/B&gt; I mentioned in the previous post, and the WinFX targets tell MSBuild about that dll.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Choose Start – All Programs – WinFX SDK – Release Build Environment and change directory to your &lt;B&gt;XAML-only NavApp&lt;/B&gt; folder. Issue the command &lt;B&gt;msbuild&lt;/B&gt; and confirm that the build succeeded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you can resist running the application right away you might be interested to look at the generated intermediate files in your &lt;B&gt;\obj\release&lt;/B&gt; folder. The &lt;B&gt;.baml&lt;/B&gt; files contain a binary version of the XAML (i.e. tokenized XAML). The &lt;B&gt;.g.cs&lt;/B&gt; files are generated C# source files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;When we built our project, the &lt;B&gt;Page&lt;/B&gt; XAML files were parsed into a corresponding &lt;B&gt;.g.cs&lt;/B&gt; source file and a corresponding &lt;B&gt;.baml&lt;/B&gt; file. Inside &lt;B&gt;Page1.g.cs&lt;/B&gt; you’ll see that a class called &lt;B&gt;_Page1&lt;/B&gt; has been generated. In this class is logic to load the page’s BAML from a managed resource embedded in the assembly. However, although &lt;B&gt;Connect&lt;/B&gt; is called (the purpose which is to give the class the opportunity to wire up any event handlers), &lt;B&gt;InitializeComponent&lt;/B&gt; is not, as can be witnessed by setting breakpoints. A class called &lt;B&gt;System.Windows.Navigation.NavigationService&lt;/B&gt; is actually used behind the scenes to load the BAML and parse it into an tree of user-interface elements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Inside &lt;B&gt;NavApp.g.cs&lt;/B&gt; (which was generated from &lt;B&gt;NavApp.xaml&lt;/B&gt;) the &lt;B&gt;_Application&lt;/B&gt; class is defined, deriving from &lt;B&gt;NavigationApplication&lt;/B&gt;. And in its constructor the &lt;B&gt;StartupUri&lt;/B&gt; is set to the same value we set in markup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;NavApp.Main.g.cs&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt; does not correspond to any XAML file but it is generated by virtue of the fact that we are building an application. Our &lt;B&gt;Main&lt;/B&gt; method is generated in this class along with a &lt;B&gt;ResourceLoader&lt;/B&gt; class which you can see being instantiated in the &lt;B&gt;_Application&lt;/B&gt; class. However, the &lt;B&gt;ResourceLoader&lt;/B&gt; is now a deprecated mechanism. In the &lt;B&gt;Main&lt;/B&gt; method our application singleton instance is created, and it is stored in a private static member by the &lt;B&gt;Application&lt;/B&gt; base class constructor. This enables the instance to be accessed via &lt;B&gt;System.Windows.Application.Current&lt;/B&gt; as you can see happening in &lt;B&gt;_Page1.MyApplication&lt;/B&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Also during the build process, the generated &lt;B&gt;.g.cs&lt;/B&gt; source files are then compiled into an assembly. All that remains of the markup is the BAML which is deserialized into CLR objects at runtime by the &lt;B&gt;System.Windows.Serialization.Parser&lt;/B&gt; class. This class can be used to (de)serialize any BAML or XAML at runtime.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you now run the navigation application you will see the &lt;I&gt;chrome&lt;/I&gt; at the top of the window which contains the navigation buttons. The chrome actually belongs to an instance of a &lt;B&gt;NavigationWindow&lt;/B&gt; which has been automatically created for us, and our &lt;B&gt;Page&lt;/B&gt;s are placed inside that. The &lt;I&gt;Journal&lt;/I&gt; is the name for the mechanism which remembers our navigation history which you can see by using the navigation buttons’ drop-down buttons after you have navigated with the hyperlink.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next time I’ll move into Visual Studio 2005 and combine XAML with code-behind in order to benefit from the advantages of each.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430576" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/Software/">Software</category></item><item><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 1</title><link>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/06/18/430457.aspx</link><pubDate>Sat, 18 Jun 2005 14:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430457</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/stevewhitepsfd/rsscomments.aspx?WeblogPostID=430457</wfw:commentRss><comments>http://blogs.msdn.com/b/stevewhitepsfd/archive/2005/06/18/430457.aspx#comments</comments><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I thought it would be interesting to walk through building some very basic Avalon applications. Some topics I want to introduce include Avalon’s application model; the interplay between declarative XAML markup and imperative CLR code-behind; what happens at build time; and some behind-the-scenes details at runtime.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;The WinFX Beta 1 RC bits&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;To follow along you’ll need to install the WinFX Beta 1 RC &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en"&gt;Runtimes&lt;/A&gt; and &lt;A href="http://www.microsoft.com/downloads/info.aspx?u=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F5%2F4%2F0%2F5407D6E4-740E-413E-8E91-EF7AC53A478A%2Fen_winfx_sdk_beta1_RC.iso&amp;amp;na=44&amp;amp;p=0&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=b789bc8d-4f25-4823-b6aa-c5ed"&gt;SDK&lt;/A&gt; on XP or Windows Server 2003 if you haven’t already.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Although Avalon and Indigo are each parts of WinFX (i.e. the Windows Frameworks), their assemblies are installed to slightly different destinations in the Beta 1 RC. For instance, Indigo’s &lt;B&gt;System.ServiceModel.dll&lt;/B&gt; can be found in &lt;B&gt;%WINDIR%\Microsoft.NET\Framework\v2.0.50215&lt;/B&gt;. But the Avalon runtimes (&lt;B&gt;WindowsBase.dll&lt;/B&gt;, &lt;B&gt;PresentationCore.dll&lt;/B&gt; and &lt;B&gt;PresentationFramework.dll&lt;/B&gt;, etc) can be found in &lt;B&gt;%WINDIR%\Microsoft.NET\Windows\v6.0.4030&lt;/B&gt;. This separation may become clearer on Longhorn but it suggests that Indigo is part of the .NET Framework whereas Avalon is part of WinFX proper. This is supported by the following table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableSimple2 cellSpacing=0 cellPadding=0&gt;

&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Assembly&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyProductAttribute&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyVersion&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyVersion of .NET F/W Referenced&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;System.ServiceModel&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft(R) .NET Framework&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;WindowsBase&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;PresentationCore&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;PresentationFramework&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Another of Avalon’s assemblies is &lt;B&gt;PresentationBuildTasks.dll&lt;/B&gt; which contains the MSBuild Tasks which process XAML into CLR source code files and into a binary representation called BAML.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The first two applications will use command-line builds; I’ll get to Visual Studio 2005 later.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Command-line build 1: C#-only Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Let’s begin by building an Avalon application entirely in C#. Create a folder called &lt;B&gt;C#-only App&lt;/B&gt; and, in it, create a new text file called &lt;B&gt;App.cs&lt;/B&gt;. Add the following code to the file:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main() {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far there is nothing to distinguish this from a regular .NET application. It has a UI thread and an entry point. Now add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows&lt;/B&gt;. Notice the subtle difference here: if we were writing a Windows Forms application we would use &lt;B&gt;System.Windows.Forms&lt;/B&gt;. Next, in &lt;B&gt;Main&lt;/B&gt;, instantiate a new &lt;B&gt;Application&lt;/B&gt; (actually &lt;B&gt;System.Windows.Application&lt;/B&gt;) and call its &lt;B&gt;Run&lt;/B&gt; method. Your file should now look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If we build and run this, we’ll have a running Avalon application but it will have no way of interacting with the user (unless you count Task Manager!). So let’s have the app show a window. In &lt;B&gt;Main&lt;/B&gt;, instantiate a new &lt;B&gt;Window&lt;/B&gt; (&lt;B&gt;System.Windows.Window&lt;/B&gt;) and call its &lt;B&gt;Show&lt;/B&gt; method. Your &lt;B&gt;Main&lt;/B&gt; method should look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(new Window()).Show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;We’ll be using the Microsoft Build Engine (MSBuild) to build our application, so create a project file called &lt;B&gt;App.csproj&lt;/B&gt; in your application folder. Inside it put the minimum contents to perform an Avalon build:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;AssemblyName&amp;gt;App&amp;lt;/AssemblyName&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputPath&amp;gt;.\&amp;lt;/OutputPath&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputType&amp;gt;winexe&amp;lt;/OutputType&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="System" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="WindowsBase" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationCore" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationFramework" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Compile Include="App.cs" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Project&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The only thing of note, the only part which is different from a normal C# MSBuild project, is the set of assemblies referenced (the ones we talked about earlier).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now, to build the application from a command-prompt choose Start – All Programs – WinFX SDK – Debug Build Environment and at the prompt change directory to your &lt;B&gt;C#-only App&lt;/B&gt; folder. Issue the command &lt;B&gt;msbuild&lt;/B&gt;. Confirm that the build succeeded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Run &lt;B&gt;App.exe&lt;/B&gt; and note the default window which is shown. Now, to customize the window a little. Add a new class to &lt;B&gt;App.cs&lt;/B&gt; called &lt;B&gt;MyWindow&lt;/B&gt; which derives from &lt;B&gt;Window&lt;/B&gt;. In the class’s constructor set the window’s &lt;B&gt;Text&lt;/B&gt; to “Hello from MyWindow”.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class MyWindow : Window&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Change the code in &lt;B&gt;Main&lt;/B&gt; so it instantiates a &lt;B&gt;MyWindow&lt;/B&gt; instead of a &lt;B&gt;Window&lt;/B&gt;. Build and run again and note the window’s caption is the value you set the &lt;B&gt;Text&lt;/B&gt; property to.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far there’s nothing to distinguish this as an Avalon window so let’s put some Avalon controls inside it. Add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows.Controls&lt;/B&gt;. In &lt;B&gt;MyWindow&lt;/B&gt;’s constructor, declare an object reference and assign a new &lt;B&gt;Button&lt;/B&gt; (&lt;B&gt;System.Windows.Controls.Button&lt;/B&gt;) to it. Cast the object to a &lt;B&gt;ContentControl&lt;/B&gt; and set its &lt;B&gt;Content&lt;/B&gt; to “Some text content”. Finally set the &lt;B&gt;MyWindow&lt;/B&gt;’s &lt;B&gt;Content&lt;/B&gt; to the object.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;object o = new Button();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as ContentControl).Content = "Some text content";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Content = o;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Notice how both the &lt;B&gt;Button&lt;/B&gt; and the &lt;B&gt;MyWindow&lt;/B&gt; have a &lt;B&gt;Content&lt;/B&gt; property of type &lt;B&gt;object&lt;/B&gt;. This is because both derive from &lt;B&gt;System.Windows.Controls.ContentControl&lt;/B&gt;. This idea that there is no constraint on what can be contained within a control is Avalon’s evolution of text content. In the above code the &lt;B&gt;Button&lt;/B&gt;’s content is still plain old text but it could be any object whatsoever (including the root of a tree of content), e.g. a &lt;B&gt;Shape&lt;/B&gt;, a &lt;B&gt;Control&lt;/B&gt;, a &lt;B&gt;Panel&lt;/B&gt; or a business object. The &lt;B&gt;MyWindow&lt;/B&gt;’s content is a &lt;B&gt;Button&lt;/B&gt;, but would normally be a &lt;B&gt;Panel&lt;/B&gt; of some kind inside which the remainder of the window’s content would be laid out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I made the variable &lt;B&gt;o&lt;/B&gt; have type &lt;B&gt;object&lt;/B&gt; to show that the &lt;B&gt;Content&lt;/B&gt; property of the &lt;B&gt;MyWindow&lt;/B&gt; is of type &lt;B&gt;object&lt;/B&gt;. But this also enables us to instantiate any &lt;B&gt;ContentControl&lt;/B&gt; and assign it to &lt;B&gt;o&lt;/B&gt;. Try instantiating a &lt;B&gt;CheckBox&lt;/B&gt; instead of a &lt;B&gt;Button&lt;/B&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Build and run. Notice that the &lt;B&gt;Button&lt;/B&gt; is filling the window. This is because the default behavior for &lt;B&gt;Button&lt;/B&gt;s is to stretch to fill their container. There are many rules around layout which I’ll cover in a later post. For now, though, cast the &lt;B&gt;Button&lt;/B&gt; object to a &lt;B&gt;FrameworkElement&lt;/B&gt; and set its horizontal and vertical alignment to &lt;B&gt;Center&lt;/B&gt; and, so that we can see it clearly, set its &lt;B&gt;LayoutTransform&lt;/B&gt; to &lt;B&gt;new ScaleTransform(5,5)&lt;/B&gt;. You’ll also need to add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows.Media&lt;/B&gt; which is the namespace containing the &lt;B&gt;ScaleTransform&lt;/B&gt; class. Your entire code file should finally look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows.Controls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows.Media;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(new MyWindow()).Show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class MyWindow : Window&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;object o = new Button();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as ContentControl).Content = "Some text content";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).HorizontalAlignment = HorizontalAlignment.Center;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).VerticalAlignment = VerticalAlignment.Center;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).LayoutTransform = new ScaleTransform(5,5);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Content = o;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The casts are there only to highlight which classes define the various properties. If you like you can change &lt;B&gt;o&lt;/B&gt;’s type to &lt;B&gt;Button&lt;/B&gt; and remove all the casts. Build and run and notice the difference to the &lt;B&gt;Button&lt;/B&gt;’s layout and scale transformation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far the application consists exclusively of imperative code which would arguably be more suitable in the form of declarative XAML markup. In the next post I’ll look at a XAML-only application (a NavigationApplication in fact) and after that we’ll mix the two modes and begin to use Visual Studio 2005.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430457" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/stevewhitepsfd/archive/tags/Software/">Software</category></item></channel></rss>