<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB"><title type="html">White.Steve.Blog</title><subtitle type="html">Mostly software and music, some work, but &lt;B&gt;all play&lt;/B&gt;</subtitle><id>http://blogs.msdn.com/stevewhitepsfd/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/stevewhitepsfd/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2005-02-20T20:27:00Z</updated><entry><title>Gundam Astray Red Frame</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2007/07/29/gundam-astray-red-frame.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2007/07/29/gundam-astray-red-frame.aspx</id><published>2007-07-30T01:58:00Z</published><updated>2007-07-30T01:58:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4122860" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author></entry><entry><title>Airfix 1:48 Hawker Hurricane Mk I</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2007/04/28/airfix-1-48-hawker-hurricane-mk-i.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2007/04/28/airfix-1-48-hawker-hurricane-mk-i.aspx</id><published>2007-04-29T06:12:00Z</published><updated>2007-04-29T06:12:00Z</updated><content type="html">&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;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author></entry><entry><title>Kerning and animating text glyphs</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2007/02/09/kerning-and-animating-text-glyphs.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="41620" href="http://blogs.msdn.com/stevewhitepsfd/attachment/1638274.ashx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2007/02/09/kerning-and-animating-text-glyphs.aspx</id><published>2007-02-10T02:11:00Z</published><updated>2007-02-10T02:11:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1638274" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author></entry><entry><title>Expression Interactive Designer preview available!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2006/01/24/517067.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2006/01/24/517067.aspx</id><published>2006-01-25T00:03:00Z</published><updated>2006-01-25T00:03:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=517067" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="WPF, Silverlight and Blend" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/WPF_2C00_+Silverlight+and+Blend/default.aspx" /></entry><entry><title>Sparkle, development teams, and what ‘no code’ means</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/10/06/477630.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/10/06/477630.aspx</id><published>2005-10-06T07:07:00Z</published><updated>2005-10-06T07:07:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=477630" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /><category term="WPF, Silverlight and Blend" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/WPF_2C00_+Silverlight+and+Blend/default.aspx" /></entry><entry><title>Sparkle Hayter and the Sparkle Fan</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/09/23/473378.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/09/23/473378.aspx</id><published>2005-09-23T22:26:00Z</published><updated>2005-09-23T22:26:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=473378" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="General" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/General/default.aspx" /></entry><entry><title>My two SxS articles are now published in MSDN</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/07/08/436813.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/07/08/436813.aspx</id><published>2005-07-08T16:41:00Z</published><updated>2005-07-08T16:41:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436813" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author></entry><entry><title>Avalon 3D File System Visualizer (FolderTreemap3D)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/07/07/436519.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/07/07/436519.aspx</id><published>2005-07-07T20:33:00Z</published><updated>2005-07-07T20:33:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436519" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry><entry><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/19/430576.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/19/430576.aspx</id><published>2005-06-19T12:42:00Z</published><updated>2005-06-19T12:42:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430576" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry><entry><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/18/430457.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/18/430457.aspx</id><published>2005-06-18T14:21:00Z</published><updated>2005-06-18T14:21:00Z</updated><content type="html">&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430457" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry><entry><title>Arthur, Nendo Nessie, and Avalon 3D</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx</id><published>2005-04-11T19:30:00Z</published><updated>2005-04-11T19:30:00Z</updated><content type="html">&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;A href="http://home.btconnect.com/stevewhi/graphicssamples/ArthurTest.zip"&gt;&lt;FONT face=Arial&gt;Download the ArthurTest sample&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;A href="http://home.btconnect.com/stevewhi/woc/nessie.zip"&gt;&lt;FONT face=Arial&gt;Download nessie.obj&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;&lt;IMG src="http://home.btconnect.com/stevewhi/images/nessie.JPG"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;Just before I started working at Microsoft nearly three years ago, I wrote a hobby project called &lt;/FONT&gt;&lt;A href="http://home.btconnect.com/stevewhi/woc/"&gt;&lt;FONT face=Arial&gt;Windows OpenGL Classes&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; (WOC). It’s written in VC++ 6.0 (but it compiles with VS.NET 2002) and it’s a kind of MFC for OpenGL. So it provides classes for &lt;I&gt;application&lt;/I&gt; and &lt;I&gt;window&lt;/I&gt;, as well as scene-graph and rendering management, and even a very flexible declarative animation system. It features geometry-generation and normal-calculation and the ability to read and write Wavefront OBJ files. The main feature missing from WOC is &lt;I&gt;picking&lt;/I&gt; (i.e. selection, or hit-testing). I never got round to implementing picking, so I never got to experiment with 3D Windows controls which is something I’m greatly interested in.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;Of course, Avalon provides most of the above features so I thought it’d be interesting to see if there were &lt;I&gt;any&lt;/I&gt; parts of WOC which would add value to Avalon. For this experiment I’ve been using the March CTP of Avalon, running on Windows XP SP2. By the way, if you’d like a primer on 3D in general and Avalon in particular I recommend Daniel Lehenbauer’s blog (&lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/danlehen"&gt;&lt;FONT face=Arial&gt;http://blogs.msdn.com/danlehen&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;). I’ve called my new project &lt;I&gt;Arthur&lt;/I&gt;, and there’s a screenshot of it above. The three main features which I’ll talk about in this post are: interactive camera manipulation, geometry generation, and geometry loading.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;Help yourself to the &lt;I&gt;ArthurTest&lt;/I&gt; sample source code from the link above. In &lt;I&gt;Arthur\Viewport3D.cs&lt;/I&gt; you’ll find the definition of a class derived from Avalon’s &lt;B&gt;System.Windows.Controls.Viewport3D&lt;/B&gt;. The added value of Arthur’s &lt;B&gt;Viewport3D&lt;/B&gt; is to provide mouse manipulation of the camera. Depending on whether the symbol &lt;I&gt;DX&lt;/I&gt; is defined, mouse input is handled either via DirectInput (for which you’ll require the DirectX 9 SDK) or via normal mouse input. By default, mouse manipulation is inactive for a viewport. In order to toggle into and out of mouse manipulation mode, use Ctrl+right mouse button. Once in mouse manipulation mode, if you depress both left and right mouse buttons whilst moving the mouse you will pan the scene. If you depress only the right mouse button whilst moving the mouse you will zoom the camera. If you don’t depress either button then you will effectively rotate the entire scene (lights and all). The rotation is actually achieved by moving the camera over the surface of an imaginary sphere. Up/down mouse motion affects the camera’s latitude (clamped to the range [0,180]), and left/right mouse motion affects the camera’s longitude.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;There is some geometry generation code in &lt;I&gt;Arthur\MeshGenerator.cs&lt;/I&gt; – I plan to add to it in time. You can use the static methods to generate meshes, and specify whether you want texture coordinates to be generated. Do be aware, though, that if you choose not to generate texture coordinates then you shouldn’t use an ImageBrush for your material otherwise nothing will be seen. Incidentally, the sphere’s geometry is calculated so that if you do set its material to an ImageBrush, the image will be upright with its center facing the default camera position.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;Finally, in &lt;I&gt;Arthur\FileLoaders.cs&lt;/I&gt;, you will find code to read geometry from Wavefront OBJ files. The &lt;I&gt;ArthurTest&lt;/I&gt; sample uses this feature to read in a file called nessie.obj. It’s actually a textured model I created using Nendo 1.1. However, it isn’t textured in the screen shot above because the way OBJ files specify texture coordinates isn’t compatible with Avalon. I need to do some work yet to handle that difference. Another constraint is that the code currently only handles OBJ files having a single &lt;I&gt;group&lt;/I&gt; in them.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;So with the ability to load OBJ files we have an easy way to define geometry. I can use simple OBJ files to demonstrate how Avalon calculates normals when they are not supplied. The following OBJ file content defines two triangles at an angle to one another, sharing two common vertices. For this geometry, Avalon calculates vertex normals and the result is smooth-shading.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v -0.5 -0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v -0.5 0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v 0.5 0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v 0.5 -0.5 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;f 1 4 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;f 1 3 2&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;This next OBJ file content defines the same two triangle but this time there is no vertex sharing. For this geometry, Avalon calculates face normals and the result is flat-shading.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v -0.5 -0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v -0.5 0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v 0.5 0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v -0.5 -0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v 0.5 0.5 0.5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;v 0.5 -0.5 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;f 4 6 5&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;f 1 3 2&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;As WOC handles its own normals, it can calculate face or vertex normals on request. Arthur doesn’t have that feature yet but it’s on my wish-list. If you do experiment with OBJ files, remember that Avalon (and the OBJ file format)&amp;nbsp;uses a right-hand coordinate system and therefore triangles should be wound counter-clockwise. The ‘v’ and ‘f’ markers signify vertex data&amp;nbsp;(x,y,z values) and face data&amp;nbsp;(either triangles or quads) respectively. Make sure there’s a carriage-return between each set of data.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&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&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;I no longer need WOC’s animation features. But in WOC, just like in Avalon, a camera &lt;I&gt;is a&lt;/I&gt; model and can therefore be animated. WOC’s animations are provided by relays of signal-generating objects feeding into chains of functions, and ultimately bound to the properties of models. This way position, colour, etc can be animated. You can see some examples of this animation system in the &lt;/FONT&gt;&lt;A href="http://home.btconnect.com/stevewhi/graphicssamples/"&gt;&lt;FONT face=Arial&gt;Graphics Samples section of my website&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&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&gt;&lt;SPAN&gt;&lt;FONT face=Arial&gt;So what’s next? Well, because Avalon intrinsically provides most of WOC’s value proposition, there’s actually not a great deal more of WOC to port. There are one or two more geometry-generation methods to add (including my favorite, the ripple-grid). I’m very excited by what Avalon has to offer, and I’m looking forward to playing with its &lt;I&gt;picking&lt;/I&gt; features to finally do those experiments with 3D controls I’ve been wanting to do. Watch this space!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=407378" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author></entry><entry><title>Computing Real-Time Holographic Video Content With Off-The-Shelf PC Hardware</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/03/13/394878.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/03/13/394878.aspx</id><published>2005-03-14T00:52:00Z</published><updated>2005-03-14T00:52:00Z</updated><content type="html">&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN" style="FONT-FAMILY: Arial"&gt;If, like me, you've been awaiting an update on Mark Lucente's research, you'll find this&amp;nbsp;paper by Tyeler Quentmeyer et al fascinating: &lt;/span&gt;&lt;span lang="EN"&gt;&lt;a href="http://web.media.mit.edu/~vmb/papers/quentmeyerms.pdf"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;http://web.media.mit.edu/~vmb/papers/quentmeyerms.pdf&lt;/span&gt;&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&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"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN" style="FONT-FAMILY: Arial"&gt;Apparently (&lt;/span&gt;&lt;span lang="EN"&gt;&lt;a href="http://www.media.mit.edu/spi/"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;http://www.media.mit.edu/spi/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang="EN" style="FONT-FAMILY: Arial"&gt;) the Spatial Imaging Group at MIT disbanded about the time this paper was published (almost a year ago). I hope this important research is continuing somewhere and&amp;nbsp;is getting enough funding.&lt;/span&gt;&lt;span style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=394878" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="General" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/General/default.aspx" /></entry><entry><title>Scales</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/03/12/394463.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/03/12/394463.aspx</id><published>2005-03-12T20:59:00Z</published><updated>2005-03-12T20:59:00Z</updated><content type="html">&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;So I’ve talked about classes representing the ideas of &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;interval&lt;/i&gt;. This post I’ll cover &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.ScaleClass&lt;/b&gt;, &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Scale&lt;/b&gt; and &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.KeySignature&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"&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 class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;A &lt;i style="mso-bidi-font-style: normal"&gt;scale&lt;/i&gt; is an interesting interplay between notes and intervals within an octave. As an example, the notes C D E F G A B constitute the C major scale. But it is the set of intervals between these notes (the sum of which is an octave) which defines the essence of what it is to be a major scale. Specifically, these intervals are: maj2 maj2 min2 maj2 maj2 maj2 min2. Typically the intervals are summed cumulatively with the initial perfect unison and the final perfect octave assumed, so: maj2 maj3 per4 per5 maj6 maj7. That set of intervals, measured out above a tonic note, locates and names the notes of any major scale.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;Although a scale can be viewed as a series of notes or as a series of intervals, it’s practical to see the notes as the &lt;i style="mso-bidi-font-style: normal"&gt;scale&lt;/i&gt; and the intervals as the &lt;i style="mso-bidi-font-style: normal"&gt;scale class&lt;/i&gt;. So a scale can be defined as a sequence of notes, chosen out of the possible notes in the octave, and beginning on a tonic. And a scale class can be defined as the class of scales between whose notes appears the &lt;i style="mso-bidi-font-style: normal"&gt;same&lt;/i&gt; sequence of intervals. As I’ve said, that sequence of intervals sums to an octave no matter what the scale class.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;So, let’s look at a C# class representing &lt;i style="mso-bidi-font-style: normal"&gt;scale class&lt;/i&gt;. Greatly simplified, &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.ScaleClass&lt;/b&gt; looks like:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; ScaleClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_majorScale = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; ScaleClass("Major", "2 3 4 5 6 7");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_dorianMode = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; ScaleClass("Dorian Mode", "2 b3 4 5 6 b7");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_bluesScale = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; ScaleClass("Blues Scale", "b3 4 b5 5 b7");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass MajorScale { &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _majorScale; } } &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass _majorScale;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass IonianMode { &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _majorScale; } }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass DorianMode { &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _dorianMode; } } &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass _dorianMode;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass BluesScale { &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _bluesScale; } } &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; ScaleClass _bluesScale;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; ScaleClass(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; longName, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; intervalsString)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_longName = longName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_intervalsString = intervalsString;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; _longName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; _intervalsString;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;}&lt;o:p&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"&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; mso-layout-grid-align: none"&gt;&lt;font face="Arial"&gt;&lt;span lang="EN"&gt;The only real value this class provides is a place to store the &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;_intervalsString &lt;/span&gt;&lt;span lang="EN"&gt;field. This field contains a string representation of the sequence of intervals which give the scale class its identity. These intervals have the format of an optional sharp or flat symbol followed by a digital interval quantity. Alternatively they can be the solfeggio symbols: do, di, ra, re, ..., te, ti.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;The class &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Scale&lt;/b&gt; has a constructor with the signature:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;font face="Arial"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Scale(ScaleClass scaleClass, Note tonic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span lang="EN"&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;font face="Arial"&gt;&lt;span lang="EN"&gt;What this constructor is interested in is the tonic note and the &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;_intervalsString &lt;/span&gt;&lt;span lang="EN"&gt;from &lt;i style="mso-bidi-font-style: normal"&gt;scaleClass&lt;/i&gt;. It &lt;b style="mso-bidi-font-weight: normal"&gt;String.Split&lt;/b&gt;s &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;intervalsString&lt;/span&gt;&lt;span lang="EN"&gt; into a &lt;b style="mso-bidi-font-weight: normal"&gt;string[]&lt;/b&gt; the elements of which it then takes in turn and obtains an &lt;b style="mso-bidi-font-weight: normal"&gt;Interval&lt;/b&gt; from by means of the following method on &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Interval&lt;/b&gt;:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;font face="Arial"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;internal&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; Interval Interval.LookUp(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; abbreviation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&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&gt;&lt;span lang="EN" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA"&gt;&lt;font face="Arial"&gt;The constructor proceeds to add each resulting &lt;b style="mso-bidi-font-weight: normal"&gt;Interval&lt;/b&gt; in turn to the tonic &lt;b style="mso-bidi-font-weight: normal"&gt;Note&lt;/b&gt;, thus obtaining the degrees of the scale. It’s a little more complicated than than because &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Scale&lt;/b&gt; is actually composed of a doubly-linked cyclic list of &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.ScaleTone&lt;/b&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;span&gt;&lt;font face="Arial"&gt;&lt;img src="http://home.btconnect.com/stevewhi/music/voices/images/scaletone_design.JPG" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;span&gt;&lt;font face="Arial"&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"&gt;&lt;font face="Arial"&gt;So, of the list nodes (i.e. the &lt;i style="mso-bidi-font-style: normal"&gt;tones&lt;/i&gt;) in a &lt;b style="mso-bidi-font-weight: normal"&gt;Scale&lt;/b&gt;, those which are &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleDiatone&lt;/b&gt;s are the ones corresponding to the tonic note and the notes reached by adding the intervals of the scale class to it. All the rest are plain old &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleTone&lt;/b&gt;s.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;In order to support enumeration, &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Scale&lt;/b&gt; implements &lt;b style="mso-bidi-font-weight: normal"&gt;IEnumerable&lt;/b&gt; and its implementation of &lt;b style="mso-bidi-font-weight: normal"&gt;IEnumerable.GetEnumerator&lt;/b&gt; simply returns a new instance of the &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.ScaleToneEnumerator&lt;/b&gt; class. As is typical, &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleToneEnumerator&lt;/b&gt; &lt;b style="mso-bidi-font-weight: normal"&gt;Reset&lt;/b&gt;s its &lt;b style="mso-bidi-font-weight: normal"&gt;Current&lt;/b&gt; state to ‘one before the first element’ which in this case is the tone at the 11-o’clock position. It implements &lt;b style="mso-bidi-font-weight: normal"&gt;MoveNext&lt;/b&gt; by moving to &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleTone.Sharp&lt;/b&gt; until the 11-o’clock position is reached again.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;The last class I’ll talk about in this post is &lt;b style="mso-bidi-font-weight: normal"&gt;KeySignature&lt;/b&gt;. A key signature is a pattern of sharp or flat symbols written at the beginning of a musical staff to indicate which degrees of the scale are not natural. Strictly speaking, distinct key signatures exist only for fifteen major scales. Minor scales and the remaining modes re-use the key signatures of their relative major scale. I omitted this detail above for the sake of clarity, but one of the arguments to the &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleClass&lt;/b&gt; constructor is a value from the &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleClass.Mode&lt;/b&gt; enumeration, which looks like this:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;enum&lt;/span&gt; Mode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Major = 0,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dorian = 6,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Phrygian = 5,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Lydian = 4,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Mixolydian = 3,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Minor = 2,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Locrian = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;There is a field for each mode. The value given to each field represents the degree of the corresponding mode on which the mode’s relative major begins. For example, you may know that the major mode begins on the minor mode’s &lt;i style="mso-bidi-font-style: normal"&gt;third&lt;/i&gt; degree. This is why Minor has the value 2 (where 0 means &lt;i style="mso-bidi-font-style: normal"&gt;first&lt;/i&gt;). The constructor of the class &lt;b style="mso-bidi-font-weight: normal"&gt;Voices.Scale&lt;/b&gt; reads &lt;i style="mso-bidi-font-style: normal"&gt;n&lt;/i&gt;, the integer value of its &lt;b style="mso-bidi-font-weight: normal"&gt;ScaleClass&lt;/b&gt;’s &lt;b style="mso-bidi-font-weight: normal"&gt;Mode&lt;/b&gt;, and then finds the &lt;i style="mso-bidi-font-style: normal"&gt;nth&lt;/i&gt; degree of the scale being constructed. This way it identifies the major scale on which the scale is based and it is that scale which donates its key signature.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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"&gt;&lt;font face="Arial"&gt;The important parts of the KeySignature class are:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&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; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Note[] Accidentals&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;get&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _accidentals;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; Note[] _accidentals;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; Sharps&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _sharps; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&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" style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;internal&lt;/span&gt; &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; _sharps = &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;;&lt;o:p&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"&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;span lang="EN" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA"&gt;&lt;font face="Arial"&gt;The &lt;b style="mso-bidi-font-weight: normal"&gt;Accidentals&lt;/b&gt; property returns an array of &lt;b style="mso-bidi-font-weight: normal"&gt;Note&lt;/b&gt;s in key signature order, and the &lt;b style="mso-bidi-font-weight: normal"&gt;Sharps&lt;/b&gt; property tells us whether the accidentals are sharps or flats.&lt;/font&gt;&lt;/span&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=394463" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Music theory" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Music+theory/default.aspx" /><category term="Voices" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Voices/default.aspx" /><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry><entry><title>Even more registration-free COM articles!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/27/381251.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/27/381251.aspx</id><published>2005-02-27T20:42:00Z</published><updated>2005-02-27T20:42:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Arial&gt;So, I spent the past two weekends and every evening between&amp;nbsp;finishing these. Please check them out and let me know what you think.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;a href="https://blogs.msdn.com:443/stevewhitepsfd/articles/379258.aspx"&gt;Registration-Free Activation of COM Components: A Walkthrough&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;A href="https://blogs.msdn.com/stevewhitepsfd/articles/377003.aspx"&gt;Registration-Free Activation of .NET-Based Components: A&amp;nbsp;Walkthrough&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=381251" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry><entry><title>New registration-free COM article</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/20/377017.aspx" /><id>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/20/377017.aspx</id><published>2005-02-21T04:27:00Z</published><updated>2005-02-21T04:27:00Z</updated><content type="html">&lt;p&gt;&lt;font face="Arial"&gt;I posted the article "SxS Managed COM With Manifest Resource (WinXP and Win2K3)" some time ago and Jason Buxton was interested in applying it to Visual Basic 6.0 client applications. Well, I've put together an MSDN article proposal which addresses that question and is a general improvement on the original article.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;The new article is called &lt;A href="http://blogs.msdn.com/stevewhitepsfd/articles/377003.aspx"&gt;Registration-Free Activation of .NET-Based Components: A Walkthrough&lt;/a&gt; and can be found in the Software category of my &lt;em&gt;articles&lt;/em&gt; section. I'm planning accompanying articles named "&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;Registration-Free Activation of COM Components: A Walkthrough" and "&lt;/font&gt;&lt;/span&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;Registration-Free COM in Web Applications: A Walkthrough."&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=377017" width="1" height="1"&gt;</content><author><name>stevewhitepsfd</name><uri>http://blogs.msdn.com/members/stevewhitepsfd.aspx</uri></author><category term="Software" scheme="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx" /></entry></feed>