<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>White.Steve.Blog : Software</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx</link><description>Tags: Software</description><dc:language>en-GB</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Sparkle, development teams, and what ‘no code’ means</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/10/06/477630.aspx</link><pubDate>Thu, 06 Oct 2005 07:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:477630</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/477630.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=477630</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Microsoft Expression “Sparkle Interactive Designer” (&lt;I style="mso-bidi-font-style: normal"&gt;Sparkle&lt;/I&gt; for short) was announced and demonstrated at the Professional Developers’ Conference in &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;Los Angeles&lt;/st1:City&gt;&lt;/st1:place&gt; last month. To find out what this powerful tool is all about, see the &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/products/expression/en/default.aspx"&gt;&lt;FONT face=Arial&gt;Expression Home Page&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;, the &lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/showpost.aspx?postid=115387"&gt;&lt;FONT face=Arial&gt;Sparkle Team on Channel9&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;, and &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/winme/0509/25597/Eric_Rudder_Keynote_PDC2005_100k_300kMBR.asx"&gt;&lt;FONT face=Arial&gt;Eric Rudder’s PDC keynote&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;So, what is the Sparkle tool good for and who will use it? Well first of all, if you’re evaluating the Windows Presentation Foundation (WPF) today, you’ll have noticed that Visual Studio currently has no design surface for XAML source code. In time, Visual Studio &lt;I style="mso-bidi-font-style: normal"&gt;will&lt;/I&gt; have design support (codenamed ‘Cider’) for WPF suitable for the needs and wishes of software developers. What Sparkle will offer over and above Visual Studio’s WPF designer is a set of features aimed at professional user-experience designers.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;The kind of designers I’m talking about have creative and technical skills including graphic design, usability design, and interaction design. The &lt;/FONT&gt;&lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=116327"&gt;&lt;FONT face=Arial&gt;North Face demo&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; (also shown at PDC) is a beautiful and striking example of how WPF brings the development of creative interactions within reach and obviates a specialization in 3D computer graphics.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Developers with design sensibilities will also use Sparkle, just like designers with programming sensibilities already use Visual Studio. These skill combinations are very common – what’s less common is to be excessively talented in &lt;I style="mso-bidi-font-style: normal"&gt;both&lt;/I&gt; spheres. So Sparkle will not ‘turn developers into designers’ nor ‘require designers to be developers’ but it will give the members of large development teams the opportunity to specialize whilst preserving the &lt;I style="mso-bidi-font-style: normal"&gt;MSBuild&lt;/I&gt; format of projects transferred between Sparkle and Visual Studio.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Clemens Vasters has written an excellent blog entry about subject-area specialization in which he discusses what he calls &lt;/FONT&gt;&lt;A href="http://staff.newtelligence.net/clemensv/PermaLink,guid,fdf5f8bf-199c-47c3-8cbb-838fab12f83e.aspx"&gt;&lt;FONT face=Arial&gt;visualization developers&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;. Visualization is a component of interaction and the members of this sector of the development team may equally well be called &lt;I style="mso-bidi-font-style: normal"&gt;interaction designers&lt;/I&gt; and possibly, for the trickier coding, &lt;I style="mso-bidi-font-style: normal"&gt;interaction developers&lt;/I&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Which brings me onto what &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; means and, more importantly, what &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; means. The community regularly describes HTML, XAML, C#, VB.NET, etc as &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; which implies that any formalized, syntactically-constrained encoding is &lt;I style="mso-bidi-font-style: normal"&gt;code&lt;/I&gt; (whether the logic is declarative or imperative). But often, in demonstrations of WPF and Sparkle, the speaker (myself included!) points out that &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; was written and I think this deserves some clarification.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;Typing XAML into Notepad or Visual Studio is, arguably, coding and the &lt;I style="mso-bidi-font-style: normal"&gt;no code&lt;/I&gt; assertion is hard to support. Similarly, a Sparkle project with no code is an empty one. Rather, what’s compelling about WPF is that the semantics of the code is incredibly rich so you need less of it. What’s compelling about designing on a surface in Sparkle or Visual Studio is that the tool generates the code for you. It so happens that declarative code is more practical for tools to generate than imperative code and that a design surface is able, in real-time, to reflect edits to declarative source code whereas imperative source code is built before it is expressed. So it’s likely that great tool support, making XAML so friendly, is the reason we often overlook it as code.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=477630" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/WPF_2C00_+Silverlight+and+Blend/default.aspx">WPF, Silverlight and Blend</category></item><item><title>Avalon 3D File System Visualizer (FolderTreemap3D)</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/07/07/436519.aspx</link><pubDate>Thu, 07 Jul 2005 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:436519</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/436519.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=436519</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://home.btconnect.com/stevewhi/graphicssamples/FolderTreemap3D.zip"&gt;&lt;FONT face=Arial&gt;Download the FolderTreemap3D sample&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;(Requires Windows Server 2003 or Windows XP, &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=41070791-8912-4F94-AC46-7CE0E386D5C9&amp;amp;displaylang=en"&gt;&lt;FONT face=Arial&gt;.NET Framework 2.0 SDK Beta 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; (or Visual Studio 2005 Beta 2), and WinFX Beta 1 RC &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en"&gt;&lt;FONT face=Arial&gt;Runtimes&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; and &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/info.aspx?u=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F5%2F4%2F0%2F5407D6E4-740E-413E-8E91-EF7AC53A478A%2Fen_winfx_sdk_beta1_RC.iso&amp;amp;na=44&amp;amp;p=0&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=b789bc8d-4f25-4823-b6aa-c5ed"&gt;&lt;FONT face=Arial&gt;SDK&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;SPAN&gt;&lt;IMG src="http://home.btconnect.com/stevewhi/images/treemap_01.JPG"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.cs.umd.edu/users/ben/"&gt;&lt;FONT face=Arial&gt;Ben Shneiderman&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; developed the &lt;/FONT&gt;&lt;A href="http://www.cs.umd.edu/hcil/treemap-history/"&gt;&lt;FONT face=Arial&gt;treemap&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; style of visualization in the early 1990s in response to the common problem of a filled hard disk. For this application, Professor Shneiderman needed an alternative to the incumbent tools (i.e. File Manager and Explorer) which, although strong at quantitative presentation of one hierarchical level of files at a time, don’t offer the aggregation needed for a high-level, qualitative view. A treemap’s strength is the reverse: perspective (or context) is more important than precision. If you’ve ever trawled up and down through the levels of a hierarchy seeking the largest files and folders as candidates for deletion then you’ll appreciate the perspective a treemap gives.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;The ‘squarified’ treemap is a refinement which minimizes the aspect ratio of each node rectangle and this is the variation I have used. But with any flat treemap, the depth of hierarchical nesting of a node is not obvious to the viewer. It occurred to me that, if a node’s nesting level is represented by its distance along the z axis, then an orthographic 3D projection would appear to be a flat treemap when viewed from the front but would reveal the spacing along the z axis when rotated. I was also curious to see the same 3D model projected with perspective.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;I have used color to distinguish folder nodes (transparent) from file nodes (colored dark in proportion to their depth). Examine the image at the beginning of the post. The entire image is a visualization of the &lt;B style="mso-bidi-font-weight: normal"&gt;%windir%/Microsoft.NET/Windows&lt;/B&gt; folder which contains the Avalon runtimes. What does the image tell us? Well, first (and without having to expand any nodes) we can see that the &lt;B style="mso-bidi-font-weight: normal"&gt;\Windows&lt;/B&gt; folder contains a single child folder named &lt;B style="mso-bidi-font-weight: normal"&gt;\v6.0.4030&lt;/B&gt; which in turn contains the &lt;B style="mso-bidi-font-weight: normal"&gt;\Avalon&lt;/B&gt; folder and a number of files. The &lt;B style="mso-bidi-font-weight: normal"&gt;\Avalon&lt;/B&gt; folder contains one large &lt;B style="mso-bidi-font-weight: normal"&gt;.msi&lt;/B&gt; file at a deeper level than the files inside &lt;B style="mso-bidi-font-weight: normal"&gt;\v6.0.4030&lt;/B&gt;. We get a qualitative sense of the relative sizes of the files and folders – e.g. &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationCore.dll&lt;/B&gt; and &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationFramework.dll&lt;/B&gt; are approximately the same size as one another and both much smaller than &lt;B style="mso-bidi-font-weight: normal"&gt;avalon.msi&lt;/B&gt;. We can also see that there is a large number of small files which we could zoom closer to if we wanted to see their names.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;The following image moves up a folder and shows, amongst other things, the combined size of the Avalon runtimes (the &lt;B style="mso-bidi-font-weight: normal"&gt;\Windows&lt;/B&gt; folder) in relation to the remainder of the .NET Framework. We can also see that, for example, &lt;B style="mso-bidi-font-weight: normal"&gt;System.ServiceModel.dll&lt;/B&gt; is a little larger than &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationCore.dll&lt;/B&gt; and &lt;B style="mso-bidi-font-weight: normal"&gt;PresentationFramework.dll&lt;/B&gt;.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P align=center&gt;&lt;SPAN&gt;&lt;IMG src="http://home.btconnect.com/stevewhi/images/treemap_02.JPG"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;Here are the pieces which go into this sample:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0cm" type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A generic &lt;B style="mso-bidi-font-weight: normal"&gt;DatatreeNode&lt;/B&gt; class used to build a ‘datatree’ of the data to be visualized. Using this extension point, any data which can be represented as a hierarchy (e.g. your Exchange/Outlook folders) can be processed into a treemap.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A routine to recurse into a file system folder and build a datatree from it.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A &lt;B style="mso-bidi-font-weight: normal"&gt;TreemapNode&lt;/B&gt; class (and ancillary classes) used to build a treemap from a datatree.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A routine to arrange the treemap into layers for back-to-front rendering. As the scene uses semi-transparent materials, it is defined back to front to aid correct alpha blending.&lt;/FONT&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;A routine to walk the treemap layers from furthest (from the eye) to nearest and to process each node in each layer as follows:&lt;/SPAN&gt; &lt;/FONT&gt;
&lt;OL style="MARGIN-TOP: 0cm" type=a&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level2 lfo1; tab-stops: list 72.0pt"&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;Create a tree of &lt;B style="mso-bidi-font-weight: normal"&gt;Visual&lt;/B&gt;s consisting of a &lt;B style="mso-bidi-font-weight: normal"&gt;TextBlock&lt;/B&gt; inside a &lt;B style="mso-bidi-font-weight: normal"&gt;Viewbox&lt;/B&gt; inside a &lt;B style="mso-bidi-font-weight: normal"&gt;Border&lt;/B&gt;.&lt;/SPAN&gt; &lt;/FONT&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level2 lfo1; tab-stops: list 72.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;Create a &lt;B style="mso-bidi-font-weight: normal"&gt;VisualBrush&lt;/B&gt; from the above and use it as the material on a plane (a &lt;B style="mso-bidi-font-weight: normal"&gt;MeshGeometry3D&lt;/B&gt;) which is placed appropriately on the z axis.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;A custom &lt;B style="mso-bidi-font-weight: normal"&gt;Viewport3D&lt;/B&gt; in which to display and manipulate the scene (the same one I introduced in the &lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx"&gt;&lt;FONT face=Arial&gt;Nendo Nessie&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; post).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;There’s a lot of information to be seen in the images here, but even more information emerges when you are able to manipulate the model yourself with the mouse. Download and build the sample and evaluate it yourself. To toggle mouse manipulation mode, use Ctrl + right-mouse-click. See the &lt;a href="http://blogs.msdn.com/stevewhitepsfd/archive/2005/04/11/407378.aspx"&gt;Nendo Nessie&lt;/A&gt; post for more details.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;SPAN lang=EN-US&gt;F&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;urthermore, information is always lost when flattening (i.e. projecting) a 3D scene for display on a traditional CRT or LCD monitor. Flat displays rely on artificial depth cues (e.g. perspective or color) to tell the eye how far away an object is. The same 3D data shown on a stereoscopic or a holographic display would preserve depth information so that the eye and brain sense true depth and can more fluently read the scene.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;It would be an interesting exercise to use the sample’s treemap generation logic inside a custom Panel.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;I’ll leave you with another of Ben Shneiderman’s visualizations – &lt;/FONT&gt;&lt;A href="http://www.cs.umd.edu/hcil/members/bshneiderman/nsd/"&gt;&lt;FONT face=Arial&gt;structured flowcharts&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt; – which may offer an interesting future project for someone to realize in Avalon.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436519" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 2</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/19/430576.aspx</link><pubDate>Sun, 19 Jun 2005 12:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430576</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/430576.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=430576</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Command-line build 2: XAML-only NavigationApplication&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In the previous post I showed how to build a very basic C#-only Avalon application. At the end I mentioned that declaring and initializing UI is probably not best done with imperative code. This time I’ll go to the other extreme and declare a very simple application entirely in markup. In future posts I’ll settle for a mixture of markup and code-behind.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you’re familiar with ASP.NET then you’ll know about markup files and code-behind files. The idea is that UI is defined in markup, and application logic is separated out into the code-behind file. This way, in an idea world, a developer can drop a basic UI into markup, make it functional in the code-behind, then let a designer take the markup and make it beautiful. It also means that the UI and application logic needn’t be compiled at the same time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Although Windows Forms doesn’t have markup, it does have the &lt;B&gt;InitializeComponent&lt;/B&gt; method into which the Forms Designer writes a lot of UI initialization code. This gives some separation of static layout from application logic but, because the UI is initialized in imperative code, it’s not as toolable as markup. It also means the UI and application logic must be compiled together.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;XAML is Avalon’s markup. XAML can be used to declare any CLR object and it’s effectively a persistence format for CLR objects. When used with Avalon, XAML is a persistence format for Avalon objects, and Avalon offers far better flexibility and customization than ASP.NET or WinForms. XAML is XML so it is extremely toolable and it can be parsed and/or compiled separately from the application logic, even being loaded dynamically at runtime as a control tree.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;With the Beta 1 RC bits, the &lt;B&gt;Application&lt;/B&gt; we created in the previous post purely in C# can’t be done purely in XAML (I’m told it will be possible in future bits). However, we &lt;I&gt;can&lt;/I&gt; do a &lt;B&gt;NavigationApplication&lt;/B&gt; purely in XAML. A navigation application has a similar paradigm to a web application or a Wizard in that it has pages between which the user nagivates and a &lt;I&gt;Journal&lt;/I&gt; in which navigation history is remembered.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;First we’ll create a file in which to declare the application class. Create a folder called &lt;B&gt;XAML-only NavApp&lt;/B&gt; and, in it, create a new text file called &lt;B&gt;NavApp.xaml&lt;/B&gt;. Declare an empty &lt;B&gt;NavigationApplication&lt;/B&gt; element with a &lt;B&gt;StartupUri&lt;/B&gt; of &lt;B&gt;Page1.xaml&lt;/B&gt; like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;NavigationApplication xmlns="http://schemas.microsoft.com/winfx/avalon/2005" StartupUri="Page1.xaml"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In XAML, elements correspond to type names and attributes correspond to property names (unless recognised by XML, e.g. the default XML namespace declaration). What we’re doing here is declaring a partial type deriving from &lt;B&gt;System.Windows.Navigation.NavigationApplication&lt;/B&gt;. We’ll shortly be processing this markup through a XAML markup parser. The markup parser will know the &lt;B&gt;NavigationApplication&lt;/B&gt; type because we’ve specified a default XML namespace which identifies the Avalon types. I haven’t named the derived type so it’ll get a default name (actually &lt;B&gt;_Application&lt;/B&gt;). The markup parser will also assume we want a singleton instance of this class and it will generate the code to instantiate one also. We’ll look more closely at what gets generated from this XAML after we’ve built it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next, create &lt;B&gt;Page1.xaml&lt;/B&gt; containing a &lt;B&gt;Page&lt;/B&gt; element as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005" Text="Hello from Page1"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;TextBlock&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Hyperlink NavigateUri="Page2.xaml" Text="Go to Page2"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/TextBlock&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Page&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Again the Avalon XML namespace is required. The value of the &lt;B&gt;Page&lt;/B&gt; element’s &lt;B&gt;Text&lt;/B&gt; attribute will appear in the navigation application’s main window caption when this page is shown. Nested inside the &lt;B&gt;Page&lt;/B&gt; element is a &lt;B&gt;TextBlock&lt;/B&gt; element which is a control used to display simple text content. The markup parser has a set of rules by which it determines what a child element represents relative to its parent. A child element may be a complex property of its parent (e.g. &lt;B&gt;Button.Background&lt;/B&gt;); a member of the collection stored in its parent’s default property; part of its parent’s content tree; or something else.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;In this case the &lt;B&gt;TextBlock&lt;/B&gt; is interpreted as being the value of the &lt;B&gt;Page&lt;/B&gt;’s &lt;B&gt;Child&lt;/B&gt; property (which is of type &lt;B&gt;UIElement&lt;/B&gt;; and &lt;B&gt;TextBlock&lt;/B&gt; &lt;I&gt;is a&lt;/I&gt; &lt;B&gt;UIElement&lt;/B&gt;). Inside the &lt;B&gt;TextBlock&lt;/B&gt; is a &lt;B&gt;Hyperlink&lt;/B&gt; element which is interpreted as the &lt;B&gt;TextBlock&lt;/B&gt;’s content.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Again, this XAML is declaring a new partial type deriving from &lt;B&gt;Page&lt;/B&gt;. Whereas the markup parser will instantiate an application instance for us without being explicitly asked, it does not do so for other classes declared in XAML. However, the application’s &lt;B&gt;StartupUri&lt;/B&gt; is set to &lt;B&gt;Page1.xaml&lt;/B&gt; which is a fairly explicit request for an instance of our &lt;B&gt;Page&lt;/B&gt;-derived class and the markup parser will generate code which will result in one. As I’ll show in a moment, this instance is actually created at runtime by another parser.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next, create &lt;B&gt;Page2.xaml&lt;/B&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Page xmlns="http://schemas.microsoft.com/winfx/avalon/2005" Text="Hello from Page2"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now create a project file called &lt;B&gt;NavApp.csproj&lt;/B&gt; which contains:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;AssemblyName&amp;gt;NavApp&amp;lt;/AssemblyName&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputPath&amp;gt;.\&amp;lt;/OutputPath&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputType&amp;gt;winexe&amp;lt;/OutputType&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="System" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="WindowsBase" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationCore" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationFramework" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ApplicationDefinition Include="NavApp.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Page Include="Page1.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Page Include="Page2.xaml" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Project&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The &lt;B&gt;NavApp.csproj&lt;/B&gt; file contains the same Assembly references as the project file in the previous post, but it also has &lt;B&gt;ApplicationDefinition&lt;/B&gt; and &lt;B&gt;Page&lt;/B&gt; item types. These item types are built by code inside the &lt;B&gt;PresentationBuildTasks.dll&lt;/B&gt; I mentioned in the previous post, and the WinFX targets tell MSBuild about that dll.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Choose Start – All Programs – WinFX SDK – Release Build Environment and change directory to your &lt;B&gt;XAML-only NavApp&lt;/B&gt; folder. Issue the command &lt;B&gt;msbuild&lt;/B&gt; and confirm that the build succeeded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you can resist running the application right away you might be interested to look at the generated intermediate files in your &lt;B&gt;\obj\release&lt;/B&gt; folder. The &lt;B&gt;.baml&lt;/B&gt; files contain a binary version of the XAML (i.e. tokenized XAML). The &lt;B&gt;.g.cs&lt;/B&gt; files are generated C# source files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;When we built our project, the &lt;B&gt;Page&lt;/B&gt; XAML files were parsed into a corresponding &lt;B&gt;.g.cs&lt;/B&gt; source file and a corresponding &lt;B&gt;.baml&lt;/B&gt; file. Inside &lt;B&gt;Page1.g.cs&lt;/B&gt; you’ll see that a class called &lt;B&gt;_Page1&lt;/B&gt; has been generated. In this class is logic to load the page’s BAML from a managed resource embedded in the assembly. However, although &lt;B&gt;Connect&lt;/B&gt; is called (the purpose which is to give the class the opportunity to wire up any event handlers), &lt;B&gt;InitializeComponent&lt;/B&gt; is not, as can be witnessed by setting breakpoints. A class called &lt;B&gt;System.Windows.Navigation.NavigationService&lt;/B&gt; is actually used behind the scenes to load the BAML and parse it into an tree of user-interface elements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Inside &lt;B&gt;NavApp.g.cs&lt;/B&gt; (which was generated from &lt;B&gt;NavApp.xaml&lt;/B&gt;) the &lt;B&gt;_Application&lt;/B&gt; class is defined, deriving from &lt;B&gt;NavigationApplication&lt;/B&gt;. And in its constructor the &lt;B&gt;StartupUri&lt;/B&gt; is set to the same value we set in markup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;NavApp.Main.g.cs&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt; does not correspond to any XAML file but it is generated by virtue of the fact that we are building an application. Our &lt;B&gt;Main&lt;/B&gt; method is generated in this class along with a &lt;B&gt;ResourceLoader&lt;/B&gt; class which you can see being instantiated in the &lt;B&gt;_Application&lt;/B&gt; class. However, the &lt;B&gt;ResourceLoader&lt;/B&gt; is now a deprecated mechanism. In the &lt;B&gt;Main&lt;/B&gt; method our application singleton instance is created, and it is stored in a private static member by the &lt;B&gt;Application&lt;/B&gt; base class constructor. This enables the instance to be accessed via &lt;B&gt;System.Windows.Application.Current&lt;/B&gt; as you can see happening in &lt;B&gt;_Page1.MyApplication&lt;/B&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Also during the build process, the generated &lt;B&gt;.g.cs&lt;/B&gt; source files are then compiled into an assembly. All that remains of the markup is the BAML which is deserialized into CLR objects at runtime by the &lt;B&gt;System.Windows.Serialization.Parser&lt;/B&gt; class. This class can be used to (de)serialize any BAML or XAML at runtime.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If you now run the navigation application you will see the &lt;I&gt;chrome&lt;/I&gt; at the top of the window which contains the navigation buttons. The chrome actually belongs to an instance of a &lt;B&gt;NavigationWindow&lt;/B&gt; which has been automatically created for us, and our &lt;B&gt;Page&lt;/B&gt;s are placed inside that. The &lt;I&gt;Journal&lt;/I&gt; is the name for the mechanism which remembers our navigation history which you can see by using the navigation buttons’ drop-down buttons after you have navigated with the hyperlink.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Next time I’ll move into Visual Studio 2005 and combine XAML with code-behind in order to benefit from the advantages of each.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430576" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Building Avalon Apps: Basics and Behind-the-scenes. Part 1</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/06/18/430457.aspx</link><pubDate>Sat, 18 Jun 2005 14:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430457</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/430457.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=430457</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I thought it would be interesting to walk through building some very basic Avalon applications. Some topics I want to introduce include Avalon’s application model; the interplay between declarative XAML markup and imperative CLR code-behind; what happens at build time; and some behind-the-scenes details at runtime.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;The WinFX Beta 1 RC bits&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;To follow along you’ll need to install the WinFX Beta 1 RC &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=b789bc8d-4f25-4823-b6aa-c5edf432d0c1&amp;amp;displaylang=en"&gt;Runtimes&lt;/A&gt; and &lt;A href="http://www.microsoft.com/downloads/info.aspx?u=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F5%2F4%2F0%2F5407D6E4-740E-413E-8E91-EF7AC53A478A%2Fen_winfx_sdk_beta1_RC.iso&amp;amp;na=44&amp;amp;p=0&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=b789bc8d-4f25-4823-b6aa-c5ed"&gt;SDK&lt;/A&gt; on XP or Windows Server 2003 if you haven’t already.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Although Avalon and Indigo are each parts of WinFX (i.e. the Windows Frameworks), their assemblies are installed to slightly different destinations in the Beta 1 RC. For instance, Indigo’s &lt;B&gt;System.ServiceModel.dll&lt;/B&gt; can be found in &lt;B&gt;%WINDIR%\Microsoft.NET\Framework\v2.0.50215&lt;/B&gt;. But the Avalon runtimes (&lt;B&gt;WindowsBase.dll&lt;/B&gt;, &lt;B&gt;PresentationCore.dll&lt;/B&gt; and &lt;B&gt;PresentationFramework.dll&lt;/B&gt;, etc) can be found in &lt;B&gt;%WINDIR%\Microsoft.NET\Windows\v6.0.4030&lt;/B&gt;. This separation may become clearer on Longhorn but it suggests that Indigo is part of the .NET Framework whereas Avalon is part of WinFX proper. This is supported by the following table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE class=MsoTableSimple2 cellSpacing=0 cellPadding=0&gt;

&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Assembly&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyProductAttribute&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyVersion&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;AssemblyVersion of .NET F/W Referenced&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;System.ServiceModel&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft(R) .NET Framework&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;WindowsBase&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;PresentationCore&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;PresentationFramework&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Microsoft (R) Windows (R) Operating System&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;6.0.4030.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;2.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Another of Avalon’s assemblies is &lt;B&gt;PresentationBuildTasks.dll&lt;/B&gt; which contains the MSBuild Tasks which process XAML into CLR source code files and into a binary representation called BAML.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The first two applications will use command-line builds; I’ll get to Visual Studio 2005 later.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Command-line build 1: C#-only Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Let’s begin by building an Avalon application entirely in C#. Create a folder called &lt;B&gt;C#-only App&lt;/B&gt; and, in it, create a new text file called &lt;B&gt;App.cs&lt;/B&gt;. Add the following code to the file:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main() {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far there is nothing to distinguish this from a regular .NET application. It has a UI thread and an entry point. Now add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows&lt;/B&gt;. Notice the subtle difference here: if we were writing a Windows Forms application we would use &lt;B&gt;System.Windows.Forms&lt;/B&gt;. Next, in &lt;B&gt;Main&lt;/B&gt;, instantiate a new &lt;B&gt;Application&lt;/B&gt; (actually &lt;B&gt;System.Windows.Application&lt;/B&gt;) and call its &lt;B&gt;Run&lt;/B&gt; method. Your file should now look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;If we build and run this, we’ll have a running Avalon application but it will have no way of interacting with the user (unless you count Task Manager!). So let’s have the app show a window. In &lt;B&gt;Main&lt;/B&gt;, instantiate a new &lt;B&gt;Window&lt;/B&gt; (&lt;B&gt;System.Windows.Window&lt;/B&gt;) and call its &lt;B&gt;Show&lt;/B&gt; method. Your &lt;B&gt;Main&lt;/B&gt; method should look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(new Window()).Show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;We’ll be using the Microsoft Build Engine (MSBuild) to build our application, so create a project file called &lt;B&gt;App.csproj&lt;/B&gt; in your application folder. Inside it put the minimum contents to perform an Avalon build:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;AssemblyName&amp;gt;App&amp;lt;/AssemblyName&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputPath&amp;gt;.\&amp;lt;/OutputPath&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;OutputType&amp;gt;winexe&amp;lt;/OutputType&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="System" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="WindowsBase" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationCore" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Reference Include="PresentationFramework" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Compile Include="App.cs" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/ItemGroup&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&amp;lt;/Project&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The only thing of note, the only part which is different from a normal C# MSBuild project, is the set of assemblies referenced (the ones we talked about earlier).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Now, to build the application from a command-prompt choose Start – All Programs – WinFX SDK – Debug Build Environment and at the prompt change directory to your &lt;B&gt;C#-only App&lt;/B&gt; folder. Issue the command &lt;B&gt;msbuild&lt;/B&gt;. Confirm that the build succeeded.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Run &lt;B&gt;App.exe&lt;/B&gt; and note the default window which is shown. Now, to customize the window a little. Add a new class to &lt;B&gt;App.cs&lt;/B&gt; called &lt;B&gt;MyWindow&lt;/B&gt; which derives from &lt;B&gt;Window&lt;/B&gt;. In the class’s constructor set the window’s &lt;B&gt;Text&lt;/B&gt; to “Hello from MyWindow”.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class MyWindow : Window&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Change the code in &lt;B&gt;Main&lt;/B&gt; so it instantiates a &lt;B&gt;MyWindow&lt;/B&gt; instead of a &lt;B&gt;Window&lt;/B&gt;. Build and run again and note the window’s caption is the value you set the &lt;B&gt;Text&lt;/B&gt; property to.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far there’s nothing to distinguish this as an Avalon window so let’s put some Avalon controls inside it. Add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows.Controls&lt;/B&gt;. In &lt;B&gt;MyWindow&lt;/B&gt;’s constructor, declare an object reference and assign a new &lt;B&gt;Button&lt;/B&gt; (&lt;B&gt;System.Windows.Controls.Button&lt;/B&gt;) to it. Cast the object to a &lt;B&gt;ContentControl&lt;/B&gt; and set its &lt;B&gt;Content&lt;/B&gt; to “Some text content”. Finally set the &lt;B&gt;MyWindow&lt;/B&gt;’s &lt;B&gt;Content&lt;/B&gt; to the object.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;object o = new Button();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as ContentControl).Content = "Some text content";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Content = o;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Notice how both the &lt;B&gt;Button&lt;/B&gt; and the &lt;B&gt;MyWindow&lt;/B&gt; have a &lt;B&gt;Content&lt;/B&gt; property of type &lt;B&gt;object&lt;/B&gt;. This is because both derive from &lt;B&gt;System.Windows.Controls.ContentControl&lt;/B&gt;. This idea that there is no constraint on what can be contained within a control is Avalon’s evolution of text content. In the above code the &lt;B&gt;Button&lt;/B&gt;’s content is still plain old text but it could be any object whatsoever (including the root of a tree of content), e.g. a &lt;B&gt;Shape&lt;/B&gt;, a &lt;B&gt;Control&lt;/B&gt;, a &lt;B&gt;Panel&lt;/B&gt; or a business object. The &lt;B&gt;MyWindow&lt;/B&gt;’s content is a &lt;B&gt;Button&lt;/B&gt;, but would normally be a &lt;B&gt;Panel&lt;/B&gt; of some kind inside which the remainder of the window’s content would be laid out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;I made the variable &lt;B&gt;o&lt;/B&gt; have type &lt;B&gt;object&lt;/B&gt; to show that the &lt;B&gt;Content&lt;/B&gt; property of the &lt;B&gt;MyWindow&lt;/B&gt; is of type &lt;B&gt;object&lt;/B&gt;. But this also enables us to instantiate any &lt;B&gt;ContentControl&lt;/B&gt; and assign it to &lt;B&gt;o&lt;/B&gt;. Try instantiating a &lt;B&gt;CheckBox&lt;/B&gt; instead of a &lt;B&gt;Button&lt;/B&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Build and run. Notice that the &lt;B&gt;Button&lt;/B&gt; is filling the window. This is because the default behavior for &lt;B&gt;Button&lt;/B&gt;s is to stretch to fill their container. There are many rules around layout which I’ll cover in a later post. For now, though, cast the &lt;B&gt;Button&lt;/B&gt; object to a &lt;B&gt;FrameworkElement&lt;/B&gt; and set its horizontal and vertical alignment to &lt;B&gt;Center&lt;/B&gt; and, so that we can see it clearly, set its &lt;B&gt;LayoutTransform&lt;/B&gt; to &lt;B&gt;new ScaleTransform(5,5)&lt;/B&gt;. You’ll also need to add a &lt;B&gt;using&lt;/B&gt; statement for &lt;B&gt;System.Windows.Media&lt;/B&gt; which is the namespace containing the &lt;B&gt;ScaleTransform&lt;/B&gt; class. Your entire code file should finally look like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows.Controls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;using System.Windows.Media;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class EntryPoint&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[STAThread]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static void Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Application app = new Application();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(new MyWindow()).Show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;app.Run();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;class MyWindow : Window&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;internal MyWindow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Text = "Hello from MyWindow";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;object o = new Button();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as ContentControl).Content = "Some text content";&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).HorizontalAlignment = HorizontalAlignment.Center;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).VerticalAlignment = VerticalAlignment.Center;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(o as FrameworkElement).LayoutTransform = new ScaleTransform(5,5);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;this.Content = o;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;The casts are there only to highlight which classes define the various properties. If you like you can change &lt;B&gt;o&lt;/B&gt;’s type to &lt;B&gt;Button&lt;/B&gt; and remove all the casts. Build and run and notice the difference to the &lt;B&gt;Button&lt;/B&gt;’s layout and scale transformation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;So far the application consists exclusively of imperative code which would arguably be more suitable in the form of declarative XAML markup. In the next post I’ll look at a XAML-only application (a NavigationApplication in fact) and after that we’ll mix the two modes and begin to use Visual Studio 2005.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=430457" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Scales</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/03/12/394463.aspx</link><pubDate>Sat, 12 Mar 2005 20:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:394463</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/394463.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=394463</wfw:commentRss><description>&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;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Music+theory/default.aspx">Music theory</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Voices/default.aspx">Voices</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Even more registration-free COM articles!</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/27/381251.aspx</link><pubDate>Sun, 27 Feb 2005 20:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:381251</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/381251.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=381251</wfw:commentRss><description>&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;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>New registration-free COM article</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/20/377017.aspx</link><pubDate>Mon, 21 Feb 2005 04:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:377017</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/377017.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=377017</wfw:commentRss><description>&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;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Starting over with Voices.Interval</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/18/375730.aspx</link><pubDate>Fri, 18 Feb 2005 08:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:375730</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/375730.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=375730</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;In the previous post in the &lt;i style="mso-bidi-font-style: normal"&gt;Voices&lt;/i&gt; category I showed my re-imagined Voices.Note class and its close relatives. You can already see that the new design has a useful separation of &lt;i style="mso-bidi-font-style: normal"&gt;tone&lt;/i&gt; from &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&gt;. I had also mixed &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;scale&lt;/i&gt; into my initial, abandoned, design. I’ll come to &lt;i style="mso-bidi-font-style: normal"&gt;scale&lt;/i&gt; in the future but, in this post, I’ll show why &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt; is, and should remain, distinct from &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&gt;. At the same time I’ll introduce the second fundamental of music - &lt;i style="mso-bidi-font-style: normal"&gt;interval&lt;/i&gt;. By the way if you want to know more about music theory check out the articles I’ve posted under the &lt;b style="mso-bidi-font-weight: normal"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;Voices&lt;/i&gt; Help&lt;/b&gt; category. These articles will be developed further over time.&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;&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"&gt;So, the reason I’d made a horrific hybrid of &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&gt; the first time round (like Seth Brundle spliced with the fly) was because I hadn’t appreciated what solfeggio is, or at least what the best way to interpret solfeggio is. Warburton’s &lt;i style="mso-bidi-font-style: normal"&gt;Harmony&lt;/i&gt; is not alone in presenting solfeggio as a kind of algebra for notes. You’ll find many definitions describing the solfeggio syllables as the ‘notes of a scale’, and very few point out that they’re more usefully thought of as aliases for intervals above some scale tonic. So &lt;i style="mso-bidi-font-style: normal"&gt;do&lt;/i&gt; is equivalent to perfect unison; &lt;i style="mso-bidi-font-style: normal"&gt;di&lt;/i&gt; is augmented unison; &lt;i style="mso-bidi-font-style: normal"&gt;me&lt;/i&gt; is major third; &lt;i style="mso-bidi-font-style: normal"&gt;mé&lt;/i&gt; is minor third, and so on.&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"&gt;With &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;interval&lt;/i&gt; neatly unified, I’ll now turn to &lt;i style="mso-bidi-font-style: normal"&gt;interval&lt;/i&gt; itself and show how I implemented and optimised it in the Voices.Interval class. The kind of client code I want the Voices class library to be able to support is:&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; TEXT-INDENT: 36pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Note n1 = Note.C;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Interval interval = Interval.Second.Major;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Note n2 = n1 + interval.Inverse;&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"&gt;If you have experience of music theory you’ll know that an interval has two components – &lt;i style="mso-bidi-font-style: normal"&gt;quality&lt;/i&gt; (e.g. major) and &lt;i style="mso-bidi-font-style: normal"&gt;quantity&lt;/i&gt; (e.g. second). In my first, abandoned, version of Voices.Interval I gave the class just such fields. On top of those I gave it fields storing the number of compound intervals (for intervals greater than an octave) and the number of times the interval was diminished or augmented (which could be zero). It took me a long time and about 900 lines of C# to get the Interval class correct in its first version. Its methods (e.g. &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;DecrementQuantity&lt;/span&gt;&lt;span lang="EN"&gt; and &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;IncrementQuantity&lt;/span&gt;&lt;span lang="EN"&gt;), properties (e.g. &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Octaves&lt;/span&gt;&lt;span lang="EN"&gt;) and operators were long and full of tortuous boundary condition logic.&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"&gt;What I’d missed is that there was no need to represent the state of an interval so literally. It eventually occurred to me that every note is some interval above or below C4. And you can represent the private state of any interval – ascending or descending, simple or compound – by the note which is that interval away from C4. It only remained to implement the properties in terms of that internal state by reusing the Voice.Note class and the methods, properties and operators I’d already implemented on it. This change was done surprisingly quickly and it was a real education to me that &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; really are two aspects of the same idea. In lines of code the new class is well over a third shorter than its first incarnation. An extreme example is the &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Octaves&lt;/span&gt; &lt;span lang="EN"&gt;property’s &lt;i style="mso-bidi-font-style: normal"&gt;set&lt;/i&gt; clause which was reduced from 64 lines to 1 because Voices.Note has its own &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;Octaves&lt;/span&gt; &lt;span lang="EN"&gt;property.&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"&gt;The new Voices.Interval class, plus its nested and ancillary types, is around 2,500 lines of C# and it looks like this:&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 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; Interval : IComparable&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 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"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Ancillary Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IntervalException : ApplicationException&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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;enum&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IntervalQuantity&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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;enum&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IntervalQuality&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 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"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Nested Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; GeneralIntervalList : IList, IEnumerator&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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;abstract&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; GeneralInterval : IList, IEnumerator&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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Unison : GeneralInterval&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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Second : GeneralInterval&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 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 style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Fifteenth : GeneralInterval&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;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Fields&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&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;static&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;bool&lt;/span&gt; NameIsAbbreviated&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; NameIncludesCompoundText&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; NameIncludesDirection&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;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Constructors&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&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;Interval(Interval)&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;Interval(Interval interval, Int32 additionalAlteration)&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;Interval(Interval interval, Int32 additionalAlteration, Int32 additionalOctaves)&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;Interval(Interval interval, Int32 additionalAlteration, Int32 additionalOctaves, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; reverseDirection)&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;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Properties&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&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;static&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Unison GeneralUnison { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Second GeneralSecond { get; }&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; COLOR: blue; 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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Fifteenth GeneralFifteenth { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IsImmutable { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IsAscending { get; }&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;Interval Complement { get; }&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;Interval Inversion { get; }&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;Interval Reverse { get; }&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;Int32 Alteration { get; set; }&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;Int32 Octaves { get; set; }&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;IntervalQuantity Quantity { get; set; }&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;IntervalQuality Quality { get; set; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; CompoundTextTextual { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; CompoundTextDigital { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; AlterationText { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Name { get; }&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;Int32 Semitones { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IsCompound { get; }&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; CanBePerfect { get; }&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;Interval SimpleInterval { get; }&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;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;Public Methods&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&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;void&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; DecrementQuantity()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;void&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IncrementQuantity()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;void&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Diminish()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;void&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Augment()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; GetName(&lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; abbreviated)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; GetName(&lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; abbreviated, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; includesCompoundText)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; GetName(&lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; abbreviated, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; includesCompoundText, &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; includesDirection)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; Exists(IntervalQuantity quantity, IntervalQuality quality)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;string&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; ToString()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Interval &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;+(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Interval &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;-(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;==(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;!=(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;&amp;gt;(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;&amp;gt;=(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;&amp;lt;(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;static&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;bool&lt;/span&gt; &lt;span style="COLOR: blue"&gt;operator&lt;/span&gt;&amp;lt;=(Interval lhs, Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Equals(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; obj)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; Equals(Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;bool&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; IdenticalTo(Interval rhs)&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;int&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; GetHashCode()&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; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;int&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt; CompareTo(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; arg)&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"&gt;By the way, I made Voices.Note a value type as I know I’ll be using a lot of Note[]. I don’t suspect I’ll be doing that with Interval, so I’ll leave it a reference type until there’s any good reason to change it.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=375730" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Music+theory/default.aspx">Music theory</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Voices/default.aspx">Voices</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>My team is hiring in the UK!</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/07/368613.aspx</link><pubDate>Tue, 08 Feb 2005 03:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368613</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/368613.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=368613</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;Follow this &lt;/font&gt;&lt;a href="http://www.microsoft.com/careers/international/default.asp?lang=EN&amp;amp;loc=UKD"&gt;&lt;font face="Arial"&gt;link&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial"&gt; and under &lt;/font&gt;&lt;a title="" href="http://www.microsoft.com/careers/international/noop"&gt;&lt;span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"&gt;&lt;font face="Arial"&gt;Development&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;font face="Arial"&gt; you’ll see the job title Developer Consultant PSfD.&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;Tell them Steve sent you. :-)&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=368613" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/General/default.aspx">General</category></item><item><title>Side-by-side Assemblies Articles</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/05/367706.aspx</link><pubDate>Sat, 05 Feb 2005 23:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:367706</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/367706.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=367706</wfw:commentRss><description>&lt;p&gt;&lt;font face="Arial"&gt;Jason, thanks for your comment on the previous post. What particularly resonated with me was "Making it work for real would be a big deal where I work," because I'm part of Premier Support for Developers and our job is helping&amp;nbsp;enterprise and ISV Microsoft customers with their app development issues. Customers buy an annual contract (there is a range of&amp;nbsp;sizes) with my team and we work with them through the year so we get to know their systems.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;I've just posted two articles under the &lt;em&gt;Software&lt;/em&gt; category on the subject of SxS Managed COM - i.e. a native app activating an unregistered COM-Callable Wrapper which then delegates on to a managed class library. Generally the CCW would have to be registered but the SxS mechanism uses .manifest files to build in-memory structures known as Activation Contexts.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;The two articles mention associated .zip files. I haven't included a link to these but there are clear steps in the articles&amp;nbsp;(with&amp;nbsp;source code and explanations)&amp;nbsp;on how to produce the binaries for yourself. I hope these are of some use. Please note that the 'With Manifest File' article applies to Windows 2003 only and the 'With Manifest Resource' applies to both Windows 2003 and XP, so please choose the approach which fits your platform requirements.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=367706" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Side-by-side Assemblies</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/04/367302.aspx</link><pubDate>Sat, 05 Feb 2005 03:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:367302</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/367302.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=367302</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;Recently I’ve been researching into Isolated Applications and Side-by-side Assemblies [1] for one of my customers. I thought I’d share a few evidently little-known rules and gotchas around this technology. I actually have a lot of these, and I’m still collecting them, so I’ll start with just a few here and I’ll post some more in the future. I also plan to write an MSDN article on the subject so I’ll post the link to that in due course.&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;&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"&gt;First, &lt;b style="mso-bidi-font-weight: normal"&gt;Side-by-Side (SxS) with native COM components&lt;/b&gt;. So, on Windows XP, I seem to have to give my assemblies a multi-segment name (I’d be interested to know if anyone has experience to the contrary). The assembly name is what appears in the name attribute of your assembly manifest file’s &lt;i style="mso-bidi-font-style: normal"&gt;assemblyIdentity&lt;/i&gt; definition element, e.g.:&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"&gt;&amp;lt;assemblyIdentity&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;type = "win32"&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span lang="EN"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;name = "myCOMServer"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;version = "1.0.0.0"&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;processorArchitecture = "x86" /&amp;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"&gt;So, although this will work fine on Windows Server 2003 with a dll called myCOMServer.dll, on Windows XP you have to change the assembly name to myCOMServer.XXX (or some such multi-segment name). There’s no need to make any change to the dll’s name. By the way, changing the assembly name means: changing the name of the assembly manifest file to myCOMServer.XXX.manifest; and changing the name attribute of the &lt;i style="mso-bidi-font-style: normal"&gt;assemblyIdentity&lt;/i&gt; element in both the def (assembly manifest) and the ref (application manifest).&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"&gt;Another one is that, although the processorAchitecture attribute of the &lt;i style="mso-bidi-font-style: normal"&gt;assemblyIdentity&lt;/i&gt; element is documented as not required [2] [3], if you use it in one of the def or the ref, you have to use it in the other.&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; mso-layout-grid-align: none"&gt;&lt;span lang="EN"&gt;Now for &lt;b style="mso-bidi-font-weight: normal"&gt;SxS with managed COM components&lt;/b&gt;. This first one is obvious if you come at it with a CLR mindset, but if you come at it fresh from SxS with native COM then it may be less obvious. With SxS &lt;i style="mso-bidi-font-style: normal"&gt;native&lt;/i&gt;, the assembly name you put in your manifest files is independent from the name of your dll. With SxS &lt;i style="mso-bidi-font-style: normal"&gt;managed&lt;/i&gt;, the assembly name you put in your manifest files must be the name of your .NET assembly and therefore the name of your dll (there are issues with multi-part assemblies which I’ll defer to a later post).&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;&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"&gt;By no means obvious is the fact that for Windows XP it is &lt;i style="mso-bidi-font-style: normal"&gt;mandatory&lt;/i&gt; to embed the assembly manifest into the assembly as a Win32 resource file (by the way this is currently&amp;nbsp;&lt;i style="mso-bidi-font-style: normal"&gt;optional&lt;/i&gt; for Windows Server 2003, but please don't rely on it always being so - SP2 may cause Win2K3 to behave like XP in this regard). To do this, first create a resource file to reference your assembly manifest. Here’s an example of myAssembly.rc which looks like:&lt;/span&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;&amp;nbsp;&lt;/o:p&gt;&lt;/span&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;#include &amp;lt;windows.h&amp;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 style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;1 RT_MANIFEST myAssembly.manifest&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"&gt;This will compile into myAssembly.res when run through the resource compiler. So create a build script to build the resource and then embed it as a Win32 resource into your assembly. Something like:&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 style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;rc myAssembly.rc&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 style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB"&gt;csc /t:library /out:myAssembly.dll /win32res:myAssembly.res AssemblyInfo.cs Class1.cs&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 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"&gt;&lt;span lang="EN"&gt;[1] &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/isolated_applications_and_side_by_side_assemblies_start_page.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/isolated_applications_and_side_by_side_assemblies_start_page.asp&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;[2] &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/application_manifests.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/application_manifests.asp&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;[3] &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/assembly_manifests.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/assembly_manifests.asp&lt;/a&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=367302" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>Starting over with Voices.Note</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/02/01/364856.aspx</link><pubDate>Wed, 02 Feb 2005 04:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:364856</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/364856.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=364856</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;So this year I threw away my code and started again. I believe that the two fundamentals of music are &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; and that all else (scale, chord, etc) is build from them. Rhythm (i.e. time) is an orthogonal dimension and I’ll save that for much later. This post I’ll talk about my Note 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;?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;So, last post I showed a diagram of how I’d modelled a circle of notes. You can see the circle and &lt;i style="mso-bidi-font-style: normal"&gt;peanut&lt;/i&gt; shapes in that diagram: the &lt;i style="mso-bidi-font-style: normal"&gt;peanuts&lt;/i&gt; are there to show notes with enharmonic names. I think I’d failed to separate out the ideas of &lt;i style="mso-bidi-font-style: normal"&gt;tone&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt;, and &lt;i style="mso-bidi-font-style: normal"&gt;scale&lt;/i&gt; in my original classes. A static class diagram of just a few of them looks like:&lt;/font&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;&lt;/span&gt;&lt;span lang="EN"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&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/v0_design.JPG" /&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;font face="Arial"&gt;Furthermore, I’d written a &lt;i style="mso-bidi-font-style: normal"&gt;ChromaticScale&lt;/i&gt; and a &lt;i style="mso-bidi-font-style: normal"&gt;MajorScale&lt;/i&gt; class built from &lt;i style="mso-bidi-font-style: normal"&gt;ScaleToneName&lt;/i&gt;s. The MajorScale doubled as a representation of the natural note names (i.e. the white piano-keys). I then used CodeDom together with a set of &lt;i style="mso-bidi-font-style: normal"&gt;IntervalCycle&lt;/i&gt; instances with hardcoded intervals to generate classes for another ten scales including the modes and the minor scales.&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;My interval class left a lot to be desired and had few operators; the logic for generating a scale of ScaleToneNames from intervals was tortuous; the code which allowed Notes and Intervals to interact was not general; and the project was bloated with too many classes and too much code. I needed a re-think.&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, what’s the definition of a note? What comes to mind? A physical division on an instrument (piano-key, fretted guitar-string)? Or is a piano-key only a note when it’s played? Maybe you feel a note is something theoretical so that the same piano-key is sometimes the note C# and sometimes Db whether it’s sounded or not? Is a note something you can point at, press, and finger; or something you hear; or something you distinguish by its name and notate on paper? All these ideas are important but I think it’s necessary to give them unique names for the sake of clarity.&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 12-TET (twelve-tone equal temperament), the octave class is divided up into twelve pitch classes. Just like in the abbreviation &lt;i style="mso-bidi-font-style: normal"&gt;TET&lt;/i&gt;, you’ll almost always hear these pitch classes referred to as &lt;i style="mso-bidi-font-style: normal"&gt;tones&lt;/i&gt; so I’ll do the same to distinguish them from the idea of &lt;i style="mso-bidi-font-style: normal"&gt;note&lt;/i&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;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;Since an octave rolls around into its neighbours, it’s useful to consider only the octave class and to present it visually with its twelve tones arranged like the hour positions of a clock-face.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&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/twelve_tone_clock.JPG" /&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;font face="Arial"&gt;I’ve called this arrangement, and its corresponding C# class the TwelveToneClock. It’s composed of twelve Tones. As you can see, some tones have names and some don’t. So, derived from Tone are NamedTone (with a Name property) and UnnamedTone. Although the unnamed tones can be named in relation to the named ones (any of them in fact, but typically a neighbour), it’s also important to the theory of tonal harmony that a natural name can be overridden. For example, the tone at the twelve o’clock position is typically used as the note C natural, but a good musical model should allow for it to theoretically become the note B# or even Dbb. It’s in this (en)harmonic sense that I’ll define the Note 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;A Note, then, is defined as a reference to a NamedTone along with scalar properties representing the note’s octave number (approximately 1-8 on the piano, but capable of being much wider) and how many semitones that NamedNote has been sharpened or flattened (therefore a signed integer, typically in the range -1 to 1) known as its alteration. And here’s the relevant portion of the new static class diagram:&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;font face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&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/v1_note_design.JPG" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=364856" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Music+theory/default.aspx">Music theory</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Voices/default.aspx">Voices</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item><item><title>My first (false) start at the Voices project</title><link>http://blogs.msdn.com/stevewhitepsfd/archive/2005/01/30/363236.aspx</link><pubDate>Sun, 30 Jan 2005 09:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:363236</guid><dc:creator>stevewhitepsfd</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/stevewhitepsfd/comments/363236.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevewhitepsfd/commentrss.aspx?PostID=363236</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang="EN"&gt;&lt;font face="Arial"&gt;So, the middle of last November I started doing some thinking and designing and putting some C# classes together in a library. It was a bit of a false start as I’ll explain, so this year I started the project afresh with the benefit of what I’d learned. I’ll get to the starting-over in later posts but first I’ll talk about what I did wrong the first time around and what I failed to understand correctly at the time.&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;It was a combination of &lt;i style="mso-bidi-font-style: normal"&gt;note names&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;solfeggio&lt;/i&gt; that conspired to confuse me. It wasn’t about how notes are named in a diatonic scale, because I was only considering notes roaming untethered in their wild state. I was thinking about the possible names a note could have as it sat on the piano or on the guitar, and I came up with a good idea but then made a schoolboy error. The good idea was to abstract the notes away from their instrument and visualize them in a circle so that I was working with an instrument-agnostic format. My error followed from something I misunderstood in Annie O. Warburton’s book &lt;i style="mso-bidi-font-style: normal"&gt;Harmony&lt;/i&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;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 her book, Warburton introduces the solfeggio names &lt;i style="mso-bidi-font-style: normal"&gt;do&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;re&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;mi&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;fa&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;sol&lt;/i&gt;, &lt;i style="mso-bidi-font-style: normal"&gt;la&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal"&gt;ti&lt;/i&gt; (although she spells them her own way) as a kind of algebra for the seven notes in any major scale. For example, the C major scale begins C-D-E-F, and the B major scale begins B-C#-D#-E-, but what those two sequences of notes have in common – what makes them both &lt;i style="mso-bidi-font-style: normal"&gt;major&lt;/i&gt; – is the pattern of musical intervals between neighboring notes. So we can represent the notes of &lt;i style="mso-bidi-font-style: normal"&gt;any&lt;/i&gt; major scale as the algebraic symbols do-re-mi-fa- and so on, so long as we define the musical intervals between neighboring symbols as being those of the major scale. So far, so simple.&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;But there’s a scale called the &lt;i style="mso-bidi-font-style: normal"&gt;chromatic scale&lt;/i&gt;. It’s arguably not a true scale as it’s nothing more than all twelve notes of the octave in sequence. Its intervals are all the same size – physically a semitone; some are augmented unisons, some are minor seconds. Warburton writes that the solfeggio names in the ascending chromatic scale are do-di-re-ri-mi-fa- and so on, and in the descending chromatic scale they end fa-mi-mé-re-ra-do. With &lt;i style="mso-bidi-font-style: normal"&gt;do&lt;/i&gt; (the tonic) as the note C, these names become C-C#-D-D#-E-F-, etc., ascending and end F-E-Eb-D-Db-C descending. So some notes (e.g. C, D) have the same name in either direction and some (e.g. C#/Db, D#/Eb) change their name. Distracted and charmed by the altered solfeggio notes such as &lt;i style="mso-bidi-font-style: normal"&gt;di&lt;/i&gt; (which can be thought of as &lt;i style="mso-bidi-font-style: normal"&gt;do&lt;/i&gt; &lt;i style="mso-bidi-font-style: normal"&gt;sharp&lt;/i&gt; and represents C# in C major), I believed that the solfeggio names had all the possible note names covered – and that was mistake number one. I also believed, taking my lead from Warburton’s note spellings in the chromatic scale, that whenever you sharpened a C you got C# and whenever you sharpened C# you got D. Descending, I thought that whenever you flattened a D you got Db and whenever you flattened Db you got C. Of course, not all those are correct. It led me to a diagram of a &lt;i style="mso-bidi-font-style: normal"&gt;note-circle&lt;/i&gt; like this:&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/note_circle_wrong.JPG" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&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;The dotted arrows show the direction a note moves when it is sharpened or flattened by a semitone, and their destination shows what I thought the resultant name had to be. In fact, if you sharpen C# you do get a note with the same pitch as D but you call it C double-sharp (C## or Cx). There’s actually a lot more to sharpening and flattening notes than I’m telling here because the only meaningful harmonic operation on a note is to add a directed interval. But more on that in the future. In any case, I realized my design wasn’t quite right.&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;font face="Arial"&gt;&lt;span lang="EN"&gt;The diagram implies that there’s something special about the &lt;i style="mso-bidi-font-style: normal"&gt;peanut&lt;/i&gt; shapes because they have &lt;i style="mso-bidi-font-style: normal"&gt;two&lt;/i&gt; possible names. But I’d forgotten the existence of notes like Cb (same pitch as B), B# (same pitch as C) and Ebb (same pitch as D). In fact, theory allows for any note to be given many names. A diagram showing all the possible theoretical note names and arrows between them would be far too large and busy to be useful.&lt;/span&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&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;Next time I’ll look at the right way to model notes and intervals. Incidentally, what Warburton’s book doesn’t say explicitly, but you can figure out, is that the solfeggio names are not simply algebra for note-names. What’s important about them is the interval between one name and the next. But you can also accumulate those intervals and know what interval any solfeggio name is above the tonic of the scale. If you know a sequence of intervals above a tonic note then you know everything you need to know about a scale class and you can place the tonic on any of twenty-one note names and know twenty-one scales of that scale class. Therefore what solfeggio really represents is a set of aliases for intervals. If you’re unsure what an interval is then have a look at my &lt;/font&gt;&lt;A href="http://blogs.msdn.com/stevewhitepsfd/category/9128.aspx"&gt;&lt;font face="Arial"&gt;music training articles&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=363236" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Music+theory/default.aspx">Music theory</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Voices/default.aspx">Voices</category><category domain="http://blogs.msdn.com/stevewhitepsfd/archive/tags/Software/default.aspx">Software</category></item></channel></rss>