<?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>The MossyBlog Times Archives 2007 - 2009 : Nexus</title><link>http://blogs.msdn.com/msmossyblog/archive/tags/Nexus/default.aspx</link><description>Tags: Nexus</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Silence is &lt;bleep&gt; Golden.</title><link>http://blogs.msdn.com/msmossyblog/archive/2008/10/09/silence-is-bleep-golden.aspx</link><pubDate>Thu, 09 Oct 2008 08:18:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8992458</guid><dc:creator>scbarnes</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/msmossyblog/comments/8992458.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msmossyblog/commentrss.aspx?PostID=8992458</wfw:commentRss><wfw:comment>http://blogs.msdn.com/msmossyblog/rsscomments.aspx?PostID=8992458</wfw:comment><description>&lt;p&gt;&lt;img height="269" alt="ari" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilenceisbleepGolden_1397E/ari_3.jpg" width="430" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;If you've watched Entourage you may chuckle. The point of this post is simply that I'm silent for a reason, I'm busy, really busy (PDC is coming so behind the scenes work needs to be done).&lt;/p&gt;  &lt;p&gt;That being said, I had lunch with &lt;a href="http://code.msdn.microsoft.com/mef"&gt;Glenn Block&lt;/a&gt; today and he's shown me an awesome work-around to a common problem amongst many Silverlight coders out there. I'm busting to tell you it, but I'll respect his wishes and simply leave you begging for more.&lt;/p&gt;  &lt;p&gt;Glenn and I have been talking about various ways one can approach Silverlight development and I plan on tricking him into helping me with the Project Nexus.&lt;/p&gt;  &lt;p&gt;On a side note, the lawyers came back and MS Project Nexus is not a good thing for me to use, given it may infringe on MS Project's trademark (which is fair enough). Also apparently Microsoft has already had a project named Nexus, so instead I've renamed the project to JARVIS (&lt;strong&gt;J&lt;/strong&gt;ust &lt;strong&gt;A&lt;/strong&gt; &lt;strong&gt;R&lt;/strong&gt;ather &lt;strong&gt;V&lt;/strong&gt;ery &lt;strong&gt;I&lt;/strong&gt;ntelligent &lt;strong&gt;S&lt;/strong&gt;ystem).&lt;/p&gt;  &lt;p&gt;Internally, I've gotten a lot of &amp;quot;how can I help&amp;quot; with this idea, and so once I can clear my workload for the onramp to PDC, I'll be back on top of the kickoff.&lt;/p&gt;  &lt;p&gt;I've also done some prototypes in the mean time to acid test a few theories and with the help of guys like &lt;a href="http://code.msdn.microsoft.com/mef"&gt;Glenn of MEF fame&lt;/a&gt;, I'm more confident I can get this idea off the ground.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Related Posts:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/msmossyblog/archive/2008/09/19/introducing-ms-project-nexus.aspx"&gt;Introducing - MS Project Nexus&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="Silverlight- How to write your own EventDispatcher" href="http://blogs.msdn.com/msmossyblog/archive/2008/06/24/silverlight-how-to-write-your-own-eventdispatcher.aspx"&gt;Silverlight- How to write your own EventDispatcher&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="Silverlight- How to Bind Controls to your own Custom Model" href="http://blogs.msdn.com/msmossyblog/archive/2008/06/21/silverlight-how-to-bind-controls-to-your-own-custom-model.aspx"&gt;Silverlight- How to Bind Controls to your own Custom Model&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8992458" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Nexus/default.aspx">Nexus</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/MVC/default.aspx">MVC</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/JARVISL/default.aspx">JARVISL</category></item><item><title>Introducing - MS Project Nexus</title><link>http://blogs.msdn.com/msmossyblog/archive/2008/09/19/introducing-ms-project-nexus.aspx</link><pubDate>Fri, 19 Sep 2008 11:04:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8958392</guid><dc:creator>scbarnes</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/msmossyblog/comments/8958392.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msmossyblog/commentrss.aspx?PostID=8958392</wfw:commentRss><wfw:comment>http://blogs.msdn.com/msmossyblog/rsscomments.aspx?PostID=8958392</wfw:comment><description>&lt;h3&gt;&amp;#160;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="195" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/IntroducingMSProjectNexus_F23/image_3.png" width="413" border="0" /&gt; &lt;/h3&gt;  &lt;h3&gt;Introduction.&lt;/h3&gt;  &lt;p&gt;In today&amp;#8217;s .NET ecosystem you the customer are basically digesting a lot of our new wave of products, and the on ramping can be at times a bumpy ride. As typically the products are isolated in various pockets on Microsoft.com or other areas of the Internet and at times we don&amp;#8217;t interlace the story from end to end as well as we should or could.&lt;/p&gt;  &lt;p&gt;The tagline for our Rich Platform story is essentially &lt;b&gt;&lt;i&gt;&lt;u&gt;&amp;#8220;learn once, apply anywhere&amp;#8221;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt; (yes Adobe now have one similar). Yet what does this mean? How does this really apply to the average developer out there in the .NET ethos?&lt;/p&gt;  &lt;p&gt;It simply means that with your current .NET skills you can take your knowledge, code and tools and reuse them throughout our many offerings ranging from PowerShell in Windows 2008 through to Silverlight on the web.&lt;/p&gt;  &lt;p&gt;That&amp;#8217;s all well in good to say out loud, especially from a marketing message, but how realistic is this? How likely is this to be true?&lt;/p&gt;  &lt;p&gt;Well, I&amp;#8217;m going to answer this and I&amp;#8217;m not going to do it via lip service either. I&amp;#8217;m going to write a complete end to end solution from scratch, in that I&amp;#8217;m going to write code that I will be able to use throughout our entire Rich Platform. It will be a &lt;strong&gt;&lt;u&gt;complete&lt;/u&gt;&lt;/strong&gt; ACME style solution that is a living breathing application as well.&lt;/p&gt;  &lt;p&gt;I&amp;#8217;m also going to call upon internal experts within the company (here at corporate head quarters) to help me throughout this adventure (think &amp;#8220;MTV Real world meets Code&amp;#8221;). &lt;/p&gt;  &lt;h3&gt;The Contract.&lt;/h3&gt;  &lt;p&gt;Just like in the old day&amp;#8217;s pre-Microsoft, all projects would start with a contract/charter of some sort. This contract essentially outlines what both you and your customer expect a solution to look like. How much is going to be paid and when you&amp;#8217;re expected to deliver.&lt;/p&gt;  &lt;p&gt;Well, I&amp;#8217;m going to draft up a contract now to the blogosphere, and in this contract I&amp;#8217;m going to outline what this beast will look like and what it will touch upon. You the readers can decide how this looks as well as I want to keep it 100% interactive via my blog!. &lt;/p&gt;  &lt;h3&gt;The Technology.&lt;/h3&gt;  &lt;p&gt;The idea for this crazy and maybe career limiting idea was that I wanted to highlight the entire ecosystem surrounding WPF and Silverlight but in a way that interlaces a complete story. In order to do this, it had to be a complete solution from end to end, each highlighting a scenario that&amp;#8217;s relevant to today&amp;#8217;s .NET developer &amp;amp; designer. The idea has to go beyond &amp;#8220;hello world&amp;#8221; and into deeper insights on how to orchestrate our pieces within Microsoft together. &lt;/p&gt;  &lt;p&gt;The pieces I&amp;#8217;m going to cover are the following (no particular order either):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;ASP.NET MVC + AJAX.&lt;/b&gt; I&amp;#8217;m going to make full use of the new toys here, and I&amp;#8217;m not going to apologize for it. The idea is to put the code I write here into place, and then look at ways to extend it outwards to desktop reach.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Silverlight. &lt;/b&gt;I want to also make full use of Silverlight mixed with ASP.NET AJAX and highlight points where both technologies can be used either together or where Silverlight can take over from AJAX but in a way that makes sense.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;WPF.&lt;/b&gt; We&amp;#8217;ve made a lot of effort to keep Silverlight and WPF as close to parity as possible, and so I&amp;#8217;m keen to highlight how the same code base can be re-used through both and again, above and beyond &amp;#8220;hello world&amp;#8221;.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;WinForms. &lt;/b&gt;This is one of the foundation successes we have here at Microsoft, and you the WinForms developer aren&amp;#8217;t forgotten. I&amp;#8217;m planning on making full use of WinForms as well, highlighting how one can go from a WinForms application to WPF, Silverlight or ASP.NET AJAX through relevant scenarios.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Windows Communication Foundation (WCF).&lt;/b&gt; This is a great solution and has quite a lot of power, and I&amp;#8217;ll look to expose how great this solution is from end to end with the previously mentioned Client &amp;amp; Browser based solutions.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;SQL Server 2008.&lt;/b&gt; Why not get into a bit of SQL Diagrams etc, as let&amp;#8217;s face it an average developer out there may want to know a few things about how to architect their SQL Database that makes sense. It won&amp;#8217;t be perfect, but let&amp;#8217;s see where this ends up.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;The Developer.&lt;/h3&gt;  &lt;p&gt;It will be me, sure I&amp;#8217;ll ask others to help me throughout (internal or external) but the overall objective here is to take an average developer like myself, and put me through the paces to see where I get stuck and how to navigate around the hurdles before me. The code won&amp;#8217;t be perfect, the architecture won&amp;#8217;t be the holy bible of code, but overall it will have a degree of cleanliness though.&lt;/p&gt;  &lt;p&gt;It&amp;#8217;s about proving a point that the code can be re-used and done in a way that at the very least holds up to basic design patterns in today&amp;#8217;s object orientated world.&lt;/p&gt;  &lt;p&gt;I will however make mistakes, but that&amp;#8217;s ok, as I&amp;#8217;ll be calling upon experts within Microsoft to point them out and say things &amp;#8220;Scott, this is why your code sucks, as you&amp;#8217;re not doing xyz right&amp;#8221;. Humility is a virtue that I&amp;#8217;m going to keep strong throughout this upcoming adventure.&lt;/p&gt;  &lt;h3&gt;The Designer.&lt;/h3&gt;  &lt;p&gt;I&amp;#8217;ve always been proud of the fact that I can do both design and code at the same time with equal skill. It freaks most people out when they see how it comes together and ego aside, it should as I&amp;#8217;ve worked very hard to keep both disciplines up to speed with one another. That being said, I&amp;#8217;m the designer and developer on this project. As I want to unearth how one can attack the design of an application in all of the above client &amp;amp; browser technologies via Microsoft. &lt;/p&gt;  &lt;p&gt;I will also call upon some of our User Experience experts internally to give me points and tips on how one should attack design with applications, and again expose this to the entire Microsoft ethos for critic and begin new conversations around Art &amp;amp; Science.&lt;/p&gt;  &lt;h3&gt;The End Goal.&lt;/h3&gt;  &lt;p&gt;&lt;b&gt;Knowledge&lt;/b&gt;. It&amp;#8217;s simply this, I want to just take a timeout from the usual Microsoft ecosystem and invite anyone whom is willing to watch over my shoulder as I head down the path of building a complete end to end solution from scratch. I want you all to share my hurdles, pain points, frustrations and successes. I also want to invite you into Microsoft Corporate Headquarters where I can introduce you to folks whom simply amaze me daily with their intelligence and talent.&lt;/p&gt;  &lt;p&gt;I&amp;#8217;ll introduce you to friends on the Windows Team whom design the next operating systems UI, through to Architects and developers on the Tools teams whose job is to make our lives easier and give me tips on how to keep productive and ship at the same time.&lt;/p&gt;  &lt;p&gt;This isn&amp;#8217;t a 2 or 3 blog post, this is going to be a yearlong blog series and this is all I&amp;#8217;ll work on for the next year (obviously my day to day duties put aside). &lt;/p&gt;  &lt;p&gt;Enough talk, time to launch MS Project Nexus (&lt;strong&gt;&lt;u&gt;msprojectnexus.com&lt;/u&gt;&lt;/strong&gt;).&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8958392" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Nexus/default.aspx">Nexus</category></item><item><title>Silverlight Experiment: Create a PullDown Menu using Storyboards.</title><link>http://blogs.msdn.com/msmossyblog/archive/2008/06/29/silverlight-experiment-create-a-pulldown-menu-using-storyboards.aspx</link><pubDate>Sun, 29 Jun 2008 07:09:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8666034</guid><dc:creator>scbarnes</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/msmossyblog/comments/8666034.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msmossyblog/commentrss.aspx?PostID=8666034</wfw:commentRss><wfw:comment>http://blogs.msdn.com/msmossyblog/rsscomments.aspx?PostID=8666034</wfw:comment><description>&lt;p&gt;This is a basic example of how to create a &amp;quot;PullDown Menu&amp;quot; using Silverlight and Expression Blend.&lt;/p&gt;  &lt;h1&gt;The Objectives&lt;/h1&gt;  &lt;ul&gt;   &lt;li&gt;The GUI will have a PullDown Menu (UserControl) under the main outer chrome. It's intended that when a user clicks on the &amp;quot;MainMenu&amp;quot; it will not only change state, but animate down or up (depending on the previous state it was resting in - default being Up). &lt;/li&gt;    &lt;li&gt;The End User will need to have the ability to interrupt the animation should they decide to cancel the action, as a result the menu will react to the End User's intended action and reflect the direction change as well as state change. &lt;/li&gt; &lt;/ul&gt;  &lt;h1&gt;The Expected Outcome.&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="326" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb.png" width="434" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="326" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb_1.png" width="434" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h1&gt;The Blueprints.&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="312" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb_3.png" width="444" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;1x &lt;strong&gt;OuterChrome&lt;/strong&gt; Control       &lt;ul&gt;       &lt;li&gt;1x TopLeft Corner Bitmap (Static) &lt;/li&gt;        &lt;li&gt;1x Top Bitmap (Stretch Horizontally) &lt;/li&gt;        &lt;li&gt;1x Left Bitmap (Stretch Vertically) &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;1x &lt;strong&gt;PullDownMenu&lt;/strong&gt; Container       &lt;ul&gt;       &lt;li&gt;1x InnerMenu Control (NxsRibbon) &lt;/li&gt;        &lt;li&gt;1x LowerBar Bitmap (Static) &lt;/li&gt;        &lt;li&gt;1x PullDown Tab Bitmap (Static) &lt;/li&gt;        &lt;li&gt;1x PullUp Tab Bitmap (static) &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h1&gt;The Process&lt;/h1&gt;  &lt;ol type="1"&gt;   &lt;li&gt;Create the the WireFrames.      &lt;ol type="A"&gt;       &lt;li&gt;Create a &lt;font color="#008080"&gt;UserControl&lt;/font&gt; in Blend, call it &lt;strong&gt;NxsApplication.xam&lt;/strong&gt;l (this will be your base)           &lt;ol type="i"&gt;           &lt;li&gt;Change its Metrics to be 1000px, 760px. &lt;/li&gt;            &lt;li&gt;Change the &lt;font color="#0000ff"&gt;NxsApplication.LayoutRoot&lt;/font&gt; from Grid to Canvas (as you want things to freely float).               &lt;br /&gt;              &lt;br /&gt;&lt;strong&gt;NxsApplication.xaml&lt;/strong&gt;               &lt;br /&gt;              &lt;br /&gt;              &lt;div class="csharpcode" style="overflow: auto; width: 100%"&gt;               &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RCIA.Containers.NxsApplication&amp;quot;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1000&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;760&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas.Background&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;LinearGradientBrush&lt;/span&gt; &lt;span class="attr"&gt;EndPoint&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0.5,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;StartPoint&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0.5,1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF000000&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;GradientStop&lt;/span&gt; &lt;span class="attr"&gt;Color&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF131313&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Offset&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;LinearGradientBrush&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas.Background&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
            &lt;/div&gt;
            &lt;style type="text/css"&gt;










.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;

      &lt;li&gt;Create a &lt;font color="#008080"&gt;UserControl&lt;/font&gt; in Blend, call it &lt;strong&gt;NxsShell.xaml&lt;/strong&gt; (this will be your Chrome) 

        &lt;ol type="i"&gt;
          &lt;li&gt;Keep &lt;font color="#0000ff"&gt;NxsShell.LayoutRoot&lt;/font&gt; type as Grid. &lt;/li&gt;

          &lt;li&gt;Inside &lt;font color="#0000ff"&gt;NxShell&lt;/font&gt;, define the Grid Definition as having the below (you basically want to use the Grid to help you scale-9 the overall assets). 

            &lt;br /&gt;

            &lt;br /&gt;&lt;strong&gt;NxsShell.xaml&lt;/strong&gt; 

            &lt;br /&gt;

            &lt;div class="csharpcode" style="overflow: auto; width: 100%"&gt;
              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RCIA.Controls.NxsShell&amp;quot;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;400&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:d&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:mc&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;mc:Ignorable&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:vsm&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clr-namespace:System.Windows;assembly=System.Windows&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RowDefinition&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RowDefinition&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ColumnDefinition&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ColumnDefinition&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ColumnDefinition&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FFFE0000&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF213986&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;ColumnSpan&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Row&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FFA42020&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF0943FF&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

              &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
            &lt;/div&gt;
          &lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;

      &lt;li&gt;Create a &lt;font color="#008080"&gt;UserControl&lt;/font&gt; in Blend, call it&lt;strong&gt; NxsRibbon.xaml&lt;/strong&gt; (this will be the container you place your ribbon into). 

        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;NxsRibbon.xaml&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;div class="csharpcode" style="overflow: auto; width: 100%; height: 326px"&gt;
          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RCIA.Controls.NxsRibbon&amp;quot;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1000&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;180&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:vsm&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clr-namespace:System.Windows;assembly=System.Windows&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;PullDown&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt; &lt;span class="attr"&gt;BeginTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:00&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;rectangle&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame&lt;/span&gt; &lt;span class="attr"&gt;KeyTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:01&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;130&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame.KeySpline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;KeySpline&lt;/span&gt; &lt;span class="attr"&gt;ControlPoint1&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;ControlPoint2&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame.KeySpline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;PullUp&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt; &lt;span class="attr"&gt;BeginTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:00&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;rectangle&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame&lt;/span&gt; &lt;span class="attr"&gt;KeyTime&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;00:00:01&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame.KeySpline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;KeySpline&lt;/span&gt; &lt;span class="attr"&gt;ControlPoint1&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0,1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;ControlPoint2&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1,1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame.KeySpline&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF0D0D0D&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;160&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;962&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Top&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;-115&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Fill&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF35E50C&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Stroke&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#FF000000&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;rectangle&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Rectangle.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TransformGroup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ScaleTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;SkewTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RotateTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TranslateTransform&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;TransformGroup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Rectangle.RenderTransform&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Rectangle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;23&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;81&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Left&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;911&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Canvas&lt;/span&gt;.&lt;span class="attr"&gt;Top&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;149&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Open...&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;btnTest&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
    &lt;style type="text/css"&gt;












.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

    &lt;ol&gt;
      &lt;li&gt;Inside &lt;font color="#0000ff"&gt;NxsRibbon.LayoutRoot&lt;/font&gt;, create a rectangle and a button. &lt;/li&gt;

      &lt;li&gt;Name the button &amp;quot;&lt;font color="#0000ff"&gt;btnTest&lt;/font&gt;&amp;quot;. &lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&amp;#160;&lt;/p&gt;
  &lt;/li&gt;

  &lt;li&gt;In &lt;font color="#0000ff"&gt;NxsAplication&lt;/font&gt; instantiate the GUI assets. 

    &lt;ol&gt;
      &lt;li&gt;In &lt;strong&gt;NxsApplication.xaml.cs&lt;/strong&gt; instantiate &lt;font color="#0000ff"&gt;NxsRibbonMenu&lt;/font&gt; &lt;font color="#008080"&gt;UserControl&lt;/font&gt;. As this will ensure it has the lowest z index. &lt;/li&gt;

      &lt;li&gt;In &lt;strong&gt;NxsApplication.xaml.cs&lt;/strong&gt; instantiate &lt;strong&gt;NxsShell&lt;/strong&gt; &lt;font color="#008080"&gt;UserControl&lt;/font&gt;. As this will ensure it has the highest z index. 

        &lt;br /&gt;

        &lt;br /&gt;&lt;strong&gt;NxsApplication.xaml.cs&lt;/strong&gt; 

        &lt;br /&gt;

        &lt;br /&gt;

        &lt;div class="csharpcode" style="overflow: auto; width: 100%; height: 303px"&gt;
          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; NxsApplication : UserControl&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    {&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; NxsShell NXS_SHELL;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; NxsRibbon NXS_RIBBON;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; NxsApplication()&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        {&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            InitializeComponent();&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;            &lt;span class="rem"&gt;// Add the Nexus Ribbon&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;            NXS_RIBBON = &lt;span class="kwrd"&gt;new&lt;/span&gt; NxsRibbon();&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.LayoutRoot.Children.Add(NXS_RIBBON);&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;            &lt;span class="rem"&gt;// Add in the Nexus Chrome.&lt;/span&gt;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;            NXS_SHELL = &lt;span class="kwrd"&gt;new&lt;/span&gt; NxsShell();&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            NXS_SHELL.Width = Width;&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;            NXS_SHELL.Height = Height;&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.LayoutRoot.Children.Add(NXS_SHELL);&lt;/pre&gt;

          &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        }&lt;/pre&gt;

          &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;    }&lt;/pre&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;

  &lt;li&gt;In &lt;strong&gt;NxsRibbon.xaml.cs&lt;/strong&gt; register the &lt;font color="#0000ff"&gt;btnTest&lt;/font&gt; to initiate the &lt;font color="#0000ff"&gt;PullDown&lt;/font&gt; and &lt;font color="#0000ff"&gt;PullUp&lt;/font&gt; Animations. &lt;/li&gt;

  &lt;li&gt;In &lt;strong&gt;NxsRibbon.xaml.cs&lt;/strong&gt; register the Animation state to ensure that if the user wishes to interrupt either the &lt;font color="#0000ff"&gt;PullDown&lt;/font&gt;/&lt;font color="#0000ff"&gt;PullUp&lt;/font&gt; animations that they react in a way that halts the current storyboard, switches to the opposite storyboard and then continues to play. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;strong&gt;NxsRibbon.xaml.cs 
      &lt;br /&gt;&lt;/strong&gt;

    &lt;br /&gt;

    &lt;div class="csharpcode" style="overflow: auto; width: 100%; height: 303px"&gt;
      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;   &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; NxsRibbon : UserControl&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        Boolean CURRENT_PULLDOWN_STATE;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        Boolean IN_MOTION;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; NxsRibbon()&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            InitializeComponent();&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.btnTest.Click += &lt;span class="kwrd"&gt;new&lt;/span&gt; RoutedEventHandler(onButtonTestClick);&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.PullDown.Completed += &lt;span class="kwrd"&gt;new&lt;/span&gt; EventHandler(PullDown_Completed);&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.PullUp.Completed += &lt;span class="kwrd"&gt;new&lt;/span&gt; EventHandler(PullUp_Completed);&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;            &lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            CURRENT_PULLDOWN_STATE = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;            IN_MOTION = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        }&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; PullUp_Completed(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            CURRENT_PULLDOWN_STATE = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            IN_MOTION = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        }&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; PullDown_Completed(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;            CURRENT_PULLDOWN_STATE = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;            IN_MOTION = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; onButtonTestClick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e) {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (IN_MOTION)&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;            {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (!CURRENT_PULLDOWN_STATE)&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;                {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;                    IN_MOTION = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;                    CURRENT_PULLDOWN_STATE = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;                    PullDown.Pause();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;                    PullUp.SeekAlignedToLastTick(PullDown.GetCurrentTime());&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;                    PullUp.Begin();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;                }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;                &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;                {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;                    IN_MOTION = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;                    CURRENT_PULLDOWN_STATE = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;                    PullUp.Pause();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;                    PullDown.SeekAlignedToLastTick(PullUp.GetCurrentTime());&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;                    PullDown.Begin();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt;                }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt;            }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!CURRENT_PULLDOWN_STATE)&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt;            {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  56:  &lt;/span&gt;                IN_MOTION = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  57:  &lt;/span&gt;                PullDown.Begin();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  58:  &lt;/span&gt;            }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  59:  &lt;/span&gt;            &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  60:  &lt;/span&gt;            {&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  61:  &lt;/span&gt;                IN_MOTION = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  62:  &lt;/span&gt;                PullUp.Begin();&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  63:  &lt;/span&gt;            }&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  64:  &lt;/span&gt;        }&lt;/pre&gt;

      &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  65:  &lt;/span&gt;    }&lt;/pre&gt;
    &lt;/div&gt;
    &lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;The Conclusion&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt; I found that it was faster to create the initial &lt;strong&gt;StoryBoard&lt;/strong&gt; for &lt;font color="#0000ff"&gt;PullDown&lt;/font&gt;. Once I was happy with the way it animated in/out, I then Duplicated the &lt;strong&gt;StoryBoard&lt;/strong&gt; (via this &lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="23" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_11.png" width="32" border="0" /&gt; ). I renamed the &lt;font color="#0000ff"&gt;PullDown&lt;/font&gt;_Copy to &lt;font color="#0000ff"&gt;PullUp&lt;/font&gt; and under the same icon (&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="23" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_11.png" width="32" border="0" /&gt;) I &amp;quot;Reversed&amp;quot; it. This basically figured out how to revert the various properties that are being changed to the appropriate state.&lt;/li&gt;

  &lt;li&gt;Keeping track of the &lt;font color="#008080"&gt;IN_MOTION&lt;/font&gt; and &lt;font color="#408080"&gt;CURRENT_PULLDOWN_STATE&lt;/font&gt; was relatively easy, and although I have a few ideas on how we can improve this concept going forward, it's pretty trivial to setup.&lt;/li&gt;

  &lt;li&gt;Adjusting the animation Easing via the &lt;strong&gt;KeySpline&lt;/strong&gt; editor can attract various results on both Up/Down. It pays to think more about how this will affect the End User firstly, but also the fundamental question you will need to answer going forward &amp;quot;Is this going to annoy them?&amp;quot; if the answer is yes, look to shorten the animation duration or adjust the Easing.

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_13.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb_5.png" width="205" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;The Outcome.&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_17.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="328" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb_7.png" width="450" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This took me less then 30mins to complete. You will also note that I used only basic elements found within XAML to setup the wire frames. I did this as this illustrates that an Interactive Persona can setup the various pieces required to ensure the animation and basic events are ready for the next step in the workflow.&amp;#160; &lt;br /&gt;

  &lt;br /&gt;This means that you could have someone sitting designing the textures and detailed composition of the artwork in their nominated Art Tool. At the same time you could have an Engineer writing the actual &lt;strong&gt;NxsRibbonMenu&lt;/strong&gt; so that it mimics the &lt;a href="http://en.wikipedia.org/wiki/Office_Fluent_Ribbon#Ribbon" target="_blank"&gt;Office Ribbon concept&lt;/a&gt;.&amp;#160; &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_15.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="226" alt="image" src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightCreateaPullDownMenuusingAnim_10C0F/image_thumb_6.png" width="450" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;Once all three have completed their individual contribution to the GUI, they are then able to meet for a &amp;quot;Happy meeting&amp;quot; where they basically look at how they are going integrate the pieces into the GUI.

  &lt;br /&gt;

  &lt;br /&gt;In this case, the Interactive Persona is able to swap out the rectangle placeholders and apply specific bitmap textures or whatever it is that is required to execute on the visual finish.

  &lt;br /&gt;

  &lt;br /&gt;Once that's completed, the same persona is also then able to swap out the dummy &lt;strong&gt;NxsRibbonMenu&lt;/strong&gt; place holder and implant the real Control, with it's own black boxed composition.&lt;/p&gt;

&lt;p&gt;This could highlight that using Expression Blend, Visual Studio and Silverlight that three individual personas are quite able to build, design and animate independent of one another. It does however also indicate that there needs to be a Interactive Architect in the room to ensure all the various placeholders and external pieces fit into their respective places within the overall Application composition.&lt;/p&gt;

&lt;h1&gt;Special Notes&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;Nexus is a home grown Silverlight framework being written by a few friends / co-workers of mine (we decided to collaborate on an idea to test some best practices out). This framework isn't likely to be publicly available but should it do so, I'll let you folks know at that appropriate point in time.&lt;/li&gt;

  &lt;li&gt;All visual assets are copyright to me. Basically if I see you stealing my art, I'll hunt you down as don't be that guy/gal whom does that. Ask though should you wish to use it, as I'm pretty open.&lt;/li&gt;

  &lt;li&gt;This was fun and that's what this whole RIA conversation is about, having fun.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8666034" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Expression+Blend/default.aspx">Expression Blend</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/XAML/default.aspx">XAML</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Art/default.aspx">Art</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/RIA+Handbook/default.aspx">RIA Handbook</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Animation/default.aspx">Animation</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Design/default.aspx">Design</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Frameworks/default.aspx">Frameworks</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Nexus/default.aspx">Nexus</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Silverlight: How to write your own EventDispatcher.</title><link>http://blogs.msdn.com/msmossyblog/archive/2008/06/24/silverlight-how-to-write-your-own-eventdispatcher.aspx</link><pubDate>Mon, 23 Jun 2008 20:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8643055</guid><dc:creator>scbarnes</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/msmossyblog/comments/8643055.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msmossyblog/commentrss.aspx?PostID=8643055</wfw:commentRss><wfw:comment>http://blogs.msdn.com/msmossyblog/rsscomments.aspx?PostID=8643055</wfw:comment><description>&lt;P&gt;&lt;A class="" href="http://bits.samiq.net/" mce_href="http://bits.samiq.net/"&gt;Gilbert Corrales&lt;/A&gt; and I metup last week here at Redmond and he and I&amp;nbsp; were talking to about how I wanted to make use of an &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; approach to routing events around the code base (the analogy we came&amp;nbsp; up with was "the difference between a cough and a sneeze" - well maybe not a sneeze heh).&lt;/P&gt;
&lt;P&gt;EventDispatcher then lead to a framework and before you knew it, we were up to around 2am in my office coding and this is what we ended up with (first cut).&lt;/P&gt;
&lt;H1&gt;Behold, thine EventDispatcher and all it's glory!&lt;/H1&gt;
&lt;P&gt;Assume for a second that you have a room full of blind people with no sound, and in the middle you essentially have a machine that handles notifications around Sneezing and Coughing (or any other bodily functions you can think of).&lt;/P&gt;
&lt;P&gt;Let's also say that &lt;STRONG&gt;PersonA&lt;/STRONG&gt; wants to know if anyone coughs (so he/she react) or that &lt;STRONG&gt;PersonB&lt;/STRONG&gt; wants to know if anyone Sneezes.&lt;/P&gt;
&lt;P&gt;First things first, lets take a look at the "Room" itself. As it will be the host in this equation (assume it's a really smart room that can detect &lt;STRONG&gt;BodilyFunctions&lt;/STRONG&gt; as they happen).&lt;/P&gt;
&lt;H1&gt;The Room&lt;/H1&gt;
&lt;DIV class=csharpcode style="OVERFLOW: auto; WIDTH: 430px"&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; TheRoom()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// Add People to the Dark Room.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;            Person personA = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Person();&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;            Person personB = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Person();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;            Person personC = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Person();&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// Define the curiousity of all Persons..&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;            personA.Name = &lt;SPAN class=str&gt;"Scott"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;            personA.DefineCuriousity(&lt;SPAN class=str&gt;"Sneeze"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  11:  &lt;/SPAN&gt;            personB.Name = &lt;SPAN class=str&gt;"Gilbert"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  12:  &lt;/SPAN&gt;            personB.DefineCuriousity(&lt;SPAN class=str&gt;"Sneeze"&lt;/SPAN&gt;);            &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;            personC.Name = &lt;SPAN class=str&gt;"David"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  14:  &lt;/SPAN&gt;            personC.DefineCuriousity(&lt;SPAN class=str&gt;"Cough"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  15:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  16:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  17:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// If someone Sneezes/Coughs, let's tell everyone in the room&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  18:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// about it via a DisplayBoard (in this case, 3 text fields).&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  19:  &lt;/SPAN&gt;            NexusEvent BodilyFunctionEvent = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; NexusEvent(OnBodilyFunction);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  20:  &lt;/SPAN&gt;            EventDispatcher.Subscribe(&lt;SPAN class=str&gt;"Sneeze"&lt;/SPAN&gt;, BodilyFunctionEvent);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  21:  &lt;/SPAN&gt;            EventDispatcher.Subscribe(&lt;SPAN class=str&gt;"Cough"&lt;/SPAN&gt;, BodilyFunctionEvent);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  22:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  23:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// Ok, for arguments sake, lets force a bodily function to occur.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  24:  &lt;/SPAN&gt;            personA.Sneeze();&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  25:  &lt;/SPAN&gt;            personB.Cough();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  26:  &lt;/SPAN&gt;            personC.Sneeze();            &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  27:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  28:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;H3&gt;The Room Dissection&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;We first &lt;FONT color=#0000ff&gt;(Lines 4-6)&lt;/FONT&gt; establish that there are in fact People in the room. This is basically a generic class called "&lt;STRONG&gt;Person&lt;/STRONG&gt;" which I'll dissect below (don't worry at this point). &lt;/LI&gt;
&lt;LI&gt;We secondly &lt;FONT color=#0000ff&gt;(Lines 9-14)&lt;/FONT&gt; determine whom these people are (names) and what they are curious to know (Sneeze or Cough). &lt;/LI&gt;
&lt;LI&gt;We thirdly need to make The Room aware that there is in fact people in the room &lt;FONT color=#0000ff&gt;(Lines 19-20)&lt;/FONT&gt; now and it now needs to listen for a Sneeze or Cough. Once that happens it will then embarrass them all by putting updating a Sign in the background outlining what just happened. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Pretty self-explanatory right?&lt;/P&gt;
&lt;P&gt;Let's now take a look at the Anatomy of a person and let's see what makes them tick (&lt;EM&gt;don't worry, if your squeamish or can't stand the sight of blood, that's ok, this is rated PG 13 and you won't be offended).&lt;/EM&gt;&lt;/P&gt;
&lt;H1&gt;The Person (with their innards exposed).&lt;/H1&gt;
&lt;DIV class=csharpcode style="OVERFLOW: auto; WIDTH: 430px"&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; Person&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;    {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; Name { get; set; }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; curiousity { get; set; }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;        &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; DefineCuriousity(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; eventType) {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// You can add your own Subscription Logic here&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// to each individual Person to react to a case of &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// either a sneeze or cough (ie Move Person 20px to the right&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;            &lt;SPAN class=rem&gt;// then let out a speech bubble "eeww!!!"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  11:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  12:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Sneeze()&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  14:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  15:  &lt;/SPAN&gt;            &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.PerformBodilyFunction(&lt;SPAN class=str&gt;"Sneeze"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  16:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  17:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  18:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Cough()&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  19:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  20:  &lt;/SPAN&gt;            &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.PerformBodilyFunction(&lt;SPAN class=str&gt;"Cough"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  21:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  22:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  23:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; PerformBodilyFunction(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; eventType)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  24:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  25:  &lt;/SPAN&gt;            PersonEventArgs prsn = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; PersonEventArgs();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  26:  &lt;/SPAN&gt;            prsn.PersonsBodilyFunction = eventType;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  27:  &lt;/SPAN&gt;            prsn.PersonsName = &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.Name;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  28:  &lt;/SPAN&gt;            EventDispatcher.Dispatch(eventType, prsn);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  29:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  30:  &lt;/SPAN&gt;    }&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;H3&gt;The Person Dissection&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;We give the person some basic metadata to help us humanize them. &lt;BR&gt;&lt;BR&gt;
&lt;P style="BORDER-RIGHT: #ff6600 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ff6600 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #ff6600 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #ff6600 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;EM&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;U&gt;Tip&lt;/U&gt;&lt;/STRONG&gt;: &lt;BR&gt;For those of you whom are new to .NET you will notice that the property Name only has a get; and set; but nothing else? well that's the power of VisualStudio working there. As when you use the &lt;FONT color=#0000ff&gt;"prop"&lt;/FONT&gt; approach to setters/getters it automates the battle for you, so no more creating set/get values with reference to hidden private properties).&lt;/FONT&gt; &lt;BR&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightHowtowriteyourownEventDispat_F507/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightHowtowriteyourownEventDispat_F507/image_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 10px; BORDER-RIGHT-WIDTH: 0px" height=160 alt=image src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightHowtowriteyourownEventDispat_F507/image_thumb.png" width=141 align=right border=0 mce_src="http://blogs.msdn.com/blogfiles/msmossyblog/WindowsLiveWriter/SilverlightHowtowriteyourownEventDispat_F507/image_thumb.png"&gt;&lt;/A&gt; These people are easily influenced via our &lt;EM&gt;Microsoft Jedi Mind Trick&lt;/EM&gt;, so we can define their curiosity for them and such they will react to our preference via the&lt;STRONG&gt; DefineCuriousity()&lt;/STRONG&gt; method. Once we tell them &lt;EM&gt;"You are curious about a Sneeze"&lt;/EM&gt; they will in turn agree, ask the &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; to sign them up for anyone whom sneezes (or in technical terms, any "Sneeze" event that may occur in the application). In the above example though, I've not bothered to add that logic - but you hopefully get the idea. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Each person has the ability to also have the &lt;STRONG&gt;Sneeze&lt;/STRONG&gt; or &lt;STRONG&gt;Cough&lt;/STRONG&gt; knocked out of them, as they are really fragile people (heh). The way in which we do that, again using the &lt;EM&gt;Microsoft Jedi Mind Trick &lt;/EM&gt;is to tell them "&lt;EM&gt;You suddenly have an overwhelming need to Sneeze.."&lt;/EM&gt; and such the &lt;STRONG&gt;Sneeze() &lt;/STRONG&gt;method gets fired (via The Room in this example) and as such they tell the &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; &lt;EM&gt;("I just sneezed, do what you will with that bit of information"); &lt;BR&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;Last but again, is the very act of &lt;STRONG&gt;PerformingBodilyFunction&lt;/STRONG&gt;, in this case the Person will setup a data packet to describe whom they are and what they just did (&lt;STRONG&gt;PersonEventArgs&lt;/STRONG&gt; which inherits &lt;STRONG&gt;NexusEventArgs&lt;/STRONG&gt;, a class that we made - see below). They then tell &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; that the event just occurred (Cough or Sneeze) and passes the &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; some metadata to help anyone whom needs to know whom they are &lt;BR&gt;
&lt;P style="BORDER-RIGHT: #ff6600 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ff6600 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #ff6600 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #ff6600 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;U&gt;Tip:&lt;/U&gt;&lt;/STRONG&gt; &lt;BR&gt;I prefer to keep string pointers as once you start embedding object references into various data packets that float around the code, sometimes you can get lost in a Garbage Collection nightmare. Play it safe, agree that its your job as a developer to keep public objects identifiable as much as you can and unique, so others can find you!)&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;H1&gt;The EventDispatcher&lt;/H1&gt;
&lt;P&gt;This concept is something I've used for many years in other languages, and it's quite a nice tool for your day to day RIA solutions. As depending on how you implement it, it can at times get you out of a bind fast and it also does a really nice job of enforcing a layer of abstraction where at times it doesn't appear to be required (yet later saves your bacon, as the age old &lt;EM&gt;"ooh glad I had that there now i think about it"&lt;/EM&gt; does apply with this ball of code)&lt;/P&gt;
&lt;DIV class=csharpcode style="OVERFLOW: auto; WIDTH: 430px; HEIGHT: 400px"&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   1:  &lt;/SPAN&gt;   &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   2:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// Event delegate definition for Nexus related events.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   3:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   4:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// &amp;lt;param name="args"&amp;gt;Arguments associated to the event.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   5:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;delegate&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; NexusEvent(NexusEventArgs args);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   6:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   7:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;   8:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// Implementation of a multi-broadcaster event dispatcher.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;   9:  &lt;/SPAN&gt;    &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  10:  &lt;/SPAN&gt;    &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; EventDispatcher&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  11:  &lt;/SPAN&gt;    {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  12:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  13:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// Holds a list of event handlers subscribed per event.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  14:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  15:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; Dictionary&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;, List&amp;lt;NexusEvent&amp;gt;&amp;gt; _subscribers = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Dictionary&amp;lt;&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;, List&amp;lt;NexusEvent&amp;gt;&amp;gt;();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  16:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  17:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  18:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// Subscribes a handler to an event for deferred execution.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  19:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  20:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="evtName"&amp;gt;Name of the event to which the handler will be subscribed to.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  21:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="eHandler"&amp;gt;Handler to be executed everytime the event gets dispatched&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  22:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Subscribe(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; evtName, NexusEvent eHandler)&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  23:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  24:  &lt;/SPAN&gt;            List&amp;lt;NexusEvent&amp;gt; handlers;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  25:  &lt;/SPAN&gt;            &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  26:  &lt;/SPAN&gt;            &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (!_subscribers.TryGetValue(evtName, &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt; handlers))&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  27:  &lt;/SPAN&gt;            {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  28:  &lt;/SPAN&gt;                handlers = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; List&amp;lt;NexusEvent&amp;gt;();                &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  29:  &lt;/SPAN&gt;                _subscribers.Add(evtName, handlers);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  30:  &lt;/SPAN&gt;            }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  31:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  32:  &lt;/SPAN&gt;            handlers.Add(eHandler);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  33:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  34:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  35:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  36:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// Removes a command from an event for deferred execution.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  37:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  38:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="evtName"&amp;gt;Name of the event to which the handler will unsubscribed from.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  39:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="eHandler"&amp;gt;Handler to be removed from been dispatched.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  40:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; RemoveSubscription(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; evtName, NexusEvent eHandler)&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  41:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  42:  &lt;/SPAN&gt;            List&amp;lt;NexusEvent&amp;gt; handlers;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  43:  &lt;/SPAN&gt;            &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  44:  &lt;/SPAN&gt;            &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (_subscribers.TryGetValue(evtName, &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt; handlers))&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  45:  &lt;/SPAN&gt;            {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  46:  &lt;/SPAN&gt;                handlers.Remove(eHandler);&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  47:  &lt;/SPAN&gt;            }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  48:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  49:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  50:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  51:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// Broadcasts an event thru its correspondant subscribers.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  52:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  53:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="evtName"&amp;gt;Name of the event to be broadcasted.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  54:  &lt;/SPAN&gt;        &lt;SPAN class=rem&gt;/// &amp;lt;param name="args"&amp;gt;Arguments associated to the event been propagated.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  55:  &lt;/SPAN&gt;        &lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Dispatch(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; evtName, NexusEventArgs args)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  56:  &lt;/SPAN&gt;        {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  57:  &lt;/SPAN&gt;            List&amp;lt;NexusEvent&amp;gt; handlers;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  58:  &lt;/SPAN&gt;            &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  59:  &lt;/SPAN&gt;            &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (_subscribers.TryGetValue(evtName, &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt; handlers))&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  60:  &lt;/SPAN&gt;            {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  61:  &lt;/SPAN&gt;                args.EventName = evtName;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  62:  &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  63:  &lt;/SPAN&gt;                &lt;SPAN class=kwrd&gt;foreach&lt;/SPAN&gt; (NexusEvent d &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; handlers)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  64:  &lt;/SPAN&gt;                {&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  65:  &lt;/SPAN&gt;                    d(args);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  66:  &lt;/SPAN&gt;                }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  67:  &lt;/SPAN&gt;            }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=lnum&gt;  68:  &lt;/SPAN&gt;        }&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=lnum&gt;  69:  &lt;/SPAN&gt;    }&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;H1&gt;The EventDispatcher Dissection.&lt;/H1&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#408080&gt;NexusEventArgs&lt;/FONT&gt; is simply a class file that has two properties within itself. First being Data (Dictionary) and Second being &lt;FONT color=#0000ff&gt;EventName&lt;/FONT&gt; (ie "what was my triggers name?".&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#408080&gt;Subscribe&lt;/FONT&gt; &amp;amp; &lt;FONT color=#408080&gt;RemoveSubscription&lt;/FONT&gt; are pretty much as you see it. They essentially register an &lt;STRONG&gt;eventName&lt;/STRONG&gt; against an object and then keeps such registration in memory until you remove them. It's important to note here, that you really want to think about how you implement this class as memory hoarding can occur fast if you mistreat this class.&lt;/LI&gt;
&lt;LI&gt;&lt;FONT color=#008080&gt;Dispatch&lt;/FONT&gt;. As seen earlier in the code, this method will basically take a proposed &lt;STRONG&gt;eventName&lt;/STRONG&gt;, cycle through it's internal dictionary, locate the appropriate objects which it needs to then notify of such event and then simply do so. &lt;/LI&gt;&lt;/UL&gt;
&lt;H1&gt;Cautionary Disclaimer and Words of Wisdom.&lt;/H1&gt;
&lt;UL&gt;
&lt;LI&gt;Since &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; uses static approach to keeping itself a live throughout your application, it's important to note that you need to be a good code-citizen. In that you need to think of ways to Subscribe and &lt;STRONG&gt;RemoveSubscription&lt;/STRONG&gt; from the &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; in a manner that can allow the Garbage Collection to safely remove an object.&amp;nbsp; In that if you try and remove an object that has a subscription to &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt;, it will only remove the reference to the said object, but the object will continue to stay a live as it still resides inside the &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt;. Consider looking into more how the "&lt;A href="http://msdn.microsoft.com/en-us/library/system.idisposable.dispose.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.idisposable.dispose.aspx"&gt;IDisposable&lt;/A&gt;" concept works (something I'm working on now in how to position &lt;STRONG&gt;EventDispatcher&lt;/STRONG&gt; so it keeps things clean overall).&lt;/LI&gt;
&lt;LI&gt;You could consider the idea of forcing EventDispatcher to live within specific domains, in that say you had a ShoppingCart and a WishList, both share the same concept in terms of approach and execution (whilst same Events?). You could have a ShoppingEventDispatcher and a WishListEventDispatcher if you wanted to, which basically lets you use the same code base but with different domains to be housed within. Simply inherit the original EventDispatcher, change the way the events are stored internally so that they are stored based on "Domain" and all is forgiven. That and consider using a FrontController.Dispatch() approach to dispatching events vs an EventDispatcher.Dispatch() which keeps the two housed within (ie also consider keeping the FrontController static, whilst the two individual EventDispatchers as being instance based. That way if you decide to nuke the FrontController the two EventDispatchers will die with it).&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8643055" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Frameworks/default.aspx">Frameworks</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/Nexus/default.aspx">Nexus</category><category domain="http://blogs.msdn.com/msmossyblog/archive/tags/C_2300_/default.aspx">C#</category></item></channel></rss>