<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Peter Tweed</title>
        <link>http://geekswithblogs.net/PeterTweed/Default.aspx</link>
        <description>Exploring and explaining the mysteries of .NET</description>
        <language>en-US</language>
        <copyright>PeterTweed</copyright>
        <managingEditor>peterwtweed@aol.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Peter Tweed</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/PeterTweed/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Getting back to it</title>
            <link>http://geekswithblogs.net/PeterTweed/archive/2011/04/03/getting-back-to-it.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2011/04/03/getting-back-to-it.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2011/04/03/getting-back-to-it.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Hi folks - for the few followers I have, I thought it was about time to get back to you.  My blog will be interspersing my traditional .NET focussed entries with some more less traditional, but important to my day to day focus at work, entries about such crazy things as technology strategy, management challenges, program management learnings or reminders from simpler times and fun stuff such as mobile applications, cloud and non .NET technologies.&lt;/p&gt;
&lt;p&gt;Well enough for now.  I'll be back soon!!!!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/144684.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2011/04/03/getting-back-to-it.aspx</guid>
            <pubDate>Mon, 04 Apr 2011 05:55:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/144684.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2011/04/03/getting-back-to-it.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/144684.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Simple Navigation In Windows Phone 7</title>
            <category>Silverlight</category>
            <category>Windows Phone 7</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/05/17/simple-navigation-in-windows-mobile-7.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/05/17/simple-navigation-in-windows-mobile-7.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/05/17/simple-navigation-in-windows-mobile-7.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt; &lt;font size="3" face="Calibri"&gt;Take the Slalom Challenge at &lt;/font&gt;&lt;font size="3" face="Calibri"&gt;&lt;a href="http://www.slalomchallenge.com/"&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;www.slalomchallenge.com&lt;/font&gt;&lt;/a&gt;! &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;When moving to the mobile platform all applications need to be able to provide different views.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Navigating around views in &lt;a rel="tag" mce_href="http://technorati.com/tag/Windows%20Phone%207" href="http://technorati.com/tag/Windows%20Phone%207"&gt;Windows Phone 7&lt;/a&gt; is a very easy thing to do.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This post will introduce you to the simplest technique for navigation in Windows Phone 7 apps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Create a new Windows Phone Application project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;In the MainPage.xaml file copy the following xaml into the ContentGrid Grid:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Orientation&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Vertical"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center"&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; &lt;span style="color: blue"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBox&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="ValueTextBox"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="200" &amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBox&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="200"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Content&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Next Page"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Click&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Button_Click"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;This gives a text box for the user to enter text and a button to navigate to the next page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;3.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Copy the following event handler code to the MainPage.xaml.cs file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; Button_Click(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;NavigationService.Navigate(&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;Uri&lt;/span&gt;( &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515"&gt;"/SecondPage.xaml?val={0}"&lt;/span&gt;, ValueTextBox.Text), &lt;span style="color: #2b91af"&gt;UriKind&lt;/span&gt;.Relative));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;The event handler uses the NavigationService.Navigate() function.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This is what makes the navigation to another page happen.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The function takes a Uri parameter with the name of the page to navigate to and the indication that it is a relative Uri to the current page.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Note also the querystring is formatted with the value entered in the ValueTextBox control – in a similar manner to a standard web querystring.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;4.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Add a new Windows Phone Portrait Page to the project named SecondPage.xaml.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;5.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Paste the following XAML in the ContentGrid Grid in SecondPage.xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="GoBackButton"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="200"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Content&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Go Back"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Click&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Button_Click"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;This provides a button to navigate back to the first page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;6.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Copy the following event handler code to the SecondPage.xaml.cs file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; Button_Click(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;NavigationService.GoBack();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;This tells the application to go back to the previously displayed page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;7.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Add the following code to the constructor in SecondPage.xaml.cs:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.Loaded += &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;RoutedEventHandler&lt;/span&gt;(SecondPage_Loaded);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;8.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Add the following loaded event handler to the SecondPage.xaml.cs file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;void&lt;/span&gt; SecondPage_Loaded(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;if&lt;/span&gt; (NavigationContext.QueryString[&lt;span style="color: #a31515"&gt;"val"&lt;/span&gt;].Length &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(NavigationContext.QueryString[&lt;span style="color: #a31515"&gt;"val"&lt;/span&gt;], &lt;span style="color: #a31515"&gt;"Data Passed"&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;MessageBoxButton&lt;/span&gt;.OK);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;else&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;             &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;"{Empty}!"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"Data Passed"&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;MessageBoxButton&lt;/span&gt;.OK);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;This code pops up a message box displaying either the text entered on the first page or the message “{Empty}!” if no text was entered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;9.&lt;span style="font: 7pt 'Times New Roman'"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Run the application, enter some text in the text box and click on the next page button to see the application in action:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;o:p&gt; &lt;img alt="" width="205" height="400" src="http://gwb.blob.core.windows.net/petertweed/Win7Nav/Win7NavFirst.PNG" /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;img alt="" width="205" height="400" src="http://gwb.blob.core.windows.net/petertweed/Win7Nav/Win7NavStart.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;img alt="" width="205" height="400" src="http://gwb.blob.core.windows.net/petertweed/Win7Nav/Win7NavModal.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;img alt="" width="205" height="400" src="http://gwb.blob.core.windows.net/petertweed/Win7Nav/Win7Nav2nd.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;Congratulations!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;You have created a new Windows Phone 7 application with page navigation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139889.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/05/17/simple-navigation-in-windows-mobile-7.aspx</guid>
            <pubDate>Tue, 18 May 2010 05:35:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139889.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/05/17/simple-navigation-in-windows-mobile-7.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139889.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Silverlight MEF – Download On Demand</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/05/15/mef--download-on-demand.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/05/15/mef--download-on-demand.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/05/15/mef--download-on-demand.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;Take the Slalom Challenge at &lt;/font&gt;&lt;a href="http://www.slalomchallenge.com/"&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;www.slalomchallenge.com&lt;/font&gt;&lt;/a&gt;&lt;font size="3" face="Calibri"&gt;! &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;A common challenge with building complex applications in &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; is the initial download size of the xap file.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;MEF enables us to build composable applications that allows us to build complex composite applications.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Wouldn’t it be great if we had a mechanism to spilt out components into different Silverlight applications in separate xap files and download the separate xap file only if needed?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;MEF gives us the ability to do this.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This post will cover the basics needed to build such a composite application split between different silerlight applications and download the referenced silverlight application only when needed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Create a Silverlight 4 application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add references to the following assemblies:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.Initialization.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add a new Silverlight 4 application called ExternalSilverlightApplication to the solution that was created in step 1.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Ensure the new application is hosted in the web application for the solution and choose to not create a test page for the new application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;4.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Delete the App.xaml and MainPage.xaml files – they aren’t needed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;5.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add references to the following assemblies in the ExternalSilverlightApplication project:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.Initialization.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;6.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Ensure the two references above have their Copy Local values set to false.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;As we will have these two assmblies in the original Silverlight application, we will have no need to include them in the built ExternalSilverlightApplication build.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;7.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add a new user control called LeftControl to the ExternalSilverlightApplication project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;8.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Replace the LayoutRoot Grid with the following xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; x&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LayoutRoot"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Beige"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40" &amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Content&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left Content"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;9.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the LeftControl.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;10.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following attribute to the LeftControl class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Export&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This attribute tells MEF that the type LeftControl will be exported – i.e. made available for other applications to import and compose into the application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;11.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add a new user control called RightControl to the ExternalSilverlightApplication project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;12.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Replace the LayoutRoot Grid with the following xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; x&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LayoutRoot"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Green"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40"&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; &lt;span style="color: blue"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Foreground&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="White"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Right Control"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; FontSize&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="16"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center" &amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;13.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the RightControl.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;14.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following attribute to the RightControl class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Export&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;15.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;In your original Silverlight project add a reference to the ExternalSilverlightApplication project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;16.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Change the reference to the ExternalSilverlightApplication project to have it’s Copy Local value = false.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This will ensure that the referenced ExternalSilverlightApplication Silverlight application is not included in the original Silverlight application package when it it built.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The ExternalSilverlightApplication Silverlight application therefore has to be downloaded on demand by the original Silverlight application for it’s controls to be used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l1 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;In your original Silverlight project add the following xaml to the LayoutRoot Grid in MainPage.xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="65*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="235*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LoaderButton"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Content&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Download External Controls"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Click&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Button_Click"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Orientation&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Horizontal"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center" &amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LeftContent"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Red"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; BorderBrush&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Gray"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; CornerRadius&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="20"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="RightContent"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Red"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; BorderBrush&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Gray"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; CornerRadius&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="20"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;The borders will hold the controls that will be downlaoded, imported and composed via MEF when the button is clicked.&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l1 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the MainPage.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l1 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following properties to the MainPage class:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Import&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt; LeftUserControl { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Import&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt; RightUserControl { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This defines properties accepting LeftControl and RightControl types.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The attrributes are used to tell MEF the discovered type that should be applied to the property when composition occurs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;17.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following event handler for the button click to the MainPage.xaml.cs file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; Button_Click(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DeploymentCatalog&lt;/span&gt; deploymentCatalog =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DeploymentCatalog&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"ExternalSilverlightApplication.xap"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositionHost&lt;/span&gt;.Initialize(deploymentCatalog);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;deploymentCatalog.DownloadCompleted += (s, i) =&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;span style="color: blue"&gt;if&lt;/span&gt; (i.Error == &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositionInitializer&lt;/span&gt;.SatisfyImports(&lt;span style="color: blue"&gt;this&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;LeftContent.Child = LeftUserControl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;RightContent.Child = RightUserControl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;LoaderButton.IsEnabled = &lt;span style="color: blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;deploymentCatalog.DownloadAsync();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This is where the magic happens!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The deploymentCatalog object is pointed to the ExternalSilverlightApplication.xap file.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;It is then associated with the CompositionHost initialization.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;As the download will be asynchronous, an eventhandler is created for the DownloadCompleted event.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The deploymentCatalog object is then told to start the asynchronous download.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;The event handler that executes when the download is completed uses the CompositionInitializer.SatisfyImports() function to tell MEF to satisfy the Imports for the current class.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;It is at this point that the LeftUserControl and RightUserControl properties are initialized with composed objects from the downloaded ExternalSilverlightApplication.xap package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;18.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Run the application click the Download External Controls button and see the controls defined in the ExternalSilverlightApplication application loaded into the original Silverlight application.&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;img alt="" width="350" height="277" src="http://gwb.blob.core.windows.net/petertweed/MEF%20-%20download/mefdocrun.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo2"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;img alt="" width="350" height="277" src="http://gwb.blob.core.windows.net/petertweed/MEF%20-%20download/mefdocloaded.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Congratulations!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;You have implemented download on demand capabilities for composite applications using the MEF DeploymentCatalog class.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;You are now able to segment your applications into separate xap file for deployment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139838.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/05/15/mef--download-on-demand.aspx</guid>
            <pubDate>Sun, 16 May 2010 02:25:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139838.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/05/15/mef--download-on-demand.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139838.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Composing Silverlight Applications With MEF</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/05/08/composing-silverlight-applications-with-mef.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/05/08/composing-silverlight-applications-with-mef.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/05/08/composing-silverlight-applications-with-mef.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;Take the Slalom Challenge at &lt;/font&gt;&lt;a href="http://www.slalomchallenge.com/"&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;www.slalomchallenge.com&lt;/font&gt;&lt;/a&gt;&lt;font size="3" face="Calibri"&gt;! &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Anyone who has written an application with complexity enough to warrant multiple controls on multiple pages/forms should understand the benefit of composite application development.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;That is defining your application architecture that can be separated into separate pieces each with it’s own distinct purpose that can then be “composed” together into the solution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Composition can be useful in any layer of the application, from the presentation layer, the business layer, common services or data access.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Historically people have had different options to achieve composing applications from distinct well known pieces – their own version of dependency injection, containers to aid with composition like Unity, the composite application guidance for WPF and Silverlight and before that the composite application block.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Microsoft has been working on another mechanism to aid composition and extension of applications for some time now – the Managed Extensibility Framework or MEF for short.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;With &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; 4 it is part of the Silverlight environment.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;MEF allows a much simplified mechanism for composition and extensibility compared to other mechanisms – which has always been the primary issue for adoption of the earlier mechanisms/frameworks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This post will guide you through the simple use of MEF for the scenario of composition of an application – using exports, imports and composition.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Create a new Silverlight 4 application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add references to the following assemblies:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;System.ComponentModel.Composition.Initialization.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add a new user control called LeftControl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;4.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Replace the LayoutRoot Grid with the following xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; x&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LayoutRoot"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Beige"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40" &amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Content&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left Content"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Button&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;5.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the LeftControl.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;6.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following attribute to the LeftControl class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Export&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This attribute tells MEF that the type LeftControl will be exported – i.e. made available for other applications to import and compose into the application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;7.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add a new user control called RightControl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;8.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Replace the LayoutRoot Grid with the following xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; x&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LayoutRoot"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Green"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40"&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; &lt;span style="color: blue"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="40"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Foreground&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="White"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Right Control"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; FontSize&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="16"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center" &amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;9.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the RightControl.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;10.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following attribute to the RightControl class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Export&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;11.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following xaml to the LayoutRoot Grid in MainPage.xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Orientation&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Horizontal"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center"&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="LeftContent"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Red"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; BorderBrush&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Gray"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; CornerRadius&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="20"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="RightContent"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Red"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; BorderBrush&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Gray"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; CornerRadius&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="20"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;StackPanel&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: 'Times New Roman'"&gt;The borders will hold the controls that will be imported and composed via MEF.&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;12.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following statement to the top of the MainPage.xaml.cs file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;using&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; System.ComponentModel.Composition;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;13.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Add the following properties to the MainPage class:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Import&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;LeftControl&lt;/span&gt; LeftUserControl { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;[&lt;span style="color: #2b91af"&gt;Import&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt;))]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;RightControl&lt;/span&gt; RightUserControl { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This defines properties accepting LeftControl and RightControl types.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The attrributes are used to tell MEF the discovered type that should be applied to the property when composition occurs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;14.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Replace the MainPage constructore with the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; MainPage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;InitializeComponent();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CompositionInitializer&lt;/span&gt;.SatisfyImports(&lt;span style="color: blue"&gt;this&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;LeftContent.Child = LeftUserControl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;RightContent.Child = RightUserControl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;The CompositionInitializer.SatisfyImports(this) function call tells MEF to discover types related to the declared imports for this object (the MainPage object).&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;At that point, types matching those specified in the import defintions are discovered in the executing assembly location of the application and instantiated and assigned to the matching properties of the current object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-indent: -0.25in; margin-left: 0.5in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-fareast-font-family: Arial"&gt;&lt;span style="mso-list: Ignore"&gt;15.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Run the application and you will see the left control and right control types displayed in the MainPage:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;&lt;o:p&gt; &lt;img alt="" width="400" height="273" src="http://gwb.blob.core.windows.net/petertweed/MEF/MEFRun.PNG" /&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Congratulations!&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;You have used MEF to dynamically compose user controls into a parent control in a composite application model.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;In the next post we will build on this topic to cover using MEF to compose Silverlight applications dynamically in download on demand scenarios – so .xap packages can be downloaded only when needed, avoiding large initial download for the main application xap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;Take the Slalom Challenge at &lt;/font&gt;&lt;a href="http://www.slalomchallenge.com/"&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;www.slalomchallenge.com&lt;/font&gt;&lt;/a&gt;&lt;font size="3" face="Calibri"&gt;! &lt;/font&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139726.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/05/08/composing-silverlight-applications-with-mef.aspx</guid>
            <pubDate>Sun, 09 May 2010 00:43:06 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139726.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/05/08/composing-silverlight-applications-with-mef.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139726.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Searching for context in Silverlight applications</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/05/05/searching-for-context-in-silverlight-applications.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/05/05/searching-for-context-in-silverlight-applications.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/05/05/searching-for-context-in-silverlight-applications.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;A common behavior in business applications that have developed through the ages is for a user to be able to get information or execute commands in relation to some information/function displayed by right clicking the object in question and popping up a context menu that offers relevant options to choose.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;The &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; Toolkit April 2010 release introduced the context menu object.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This can be added to other UI objects and display options for the user to choose.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The menu items can be enabled or disabled as per your application logic and icons can be added to the menu items to add visual effect.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This post will walk you through how to use the context menu object from the Silverlight Toolkit.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;1. Create a new Silverlight 4 application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;2. Copy the following namespace definition to the user control object of the MainPage.xaml file:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;xmlns&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt; &lt;span style="color: red"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;3. Copy the following XAML into the LayoutRoot grid in MainPage.xaml:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; CornerRadius&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="15"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Background&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Blue"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="400"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="100"&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Foreground&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="White"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; FontSize&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="20"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Context Menu In This Border...."&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Center" &amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ContextMenuService.ContextMenu&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ContextMenu&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt; &amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;               &lt;/span&gt;&lt;span style="color: red"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;Header&lt;/span&gt;&lt;span style="color: blue"&gt;="Copy"&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;               &lt;/span&gt;&lt;span style="color: red"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;Click&lt;/span&gt;&lt;span style="color: blue"&gt;="CopyMenuItem_Click"&lt;/span&gt;&lt;span style="color: red"&gt; Name&lt;/span&gt;&lt;span style="color: blue"&gt;="copyMenuItem"&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem.Icon&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Image&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Source&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="copy-icon-small.png"/&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem.Icon&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Separator&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="pasteMenuItem"&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;               &lt;/span&gt;&lt;span style="color: red"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;Header&lt;/span&gt;&lt;span style="color: blue"&gt;="Paste"&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;               &lt;/span&gt;&lt;span style="color: red"&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;Click&lt;/span&gt;&lt;span style="color: blue"&gt;="PasteMenuItem_Click"&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem.Icon&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Image&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Source&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="paste-icon-small.png"/&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem.Icon&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;MenuItem&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;                &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ContextMenu&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;my&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;:&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ContextMenuService.ContextMenu&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Border&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;The above code associates a context menu with two menu items and a separator between them to the border object.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The menu items has icons associated with them to add visual appeal.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;The menu items have click event handlers that will be added in the MainPage.xaml.cs code behind in a later step.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;4. Add two icon sized images to the ClientBin directory of the web project hosting the Silverlight application, named copy-icon-small.png and paste-icon-small.jpg respectively.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I used copy and paste icons as the names suggest.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;5. Add the following code to the class in MainPage.xaml.cs file:&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; CopyMenuItem_Click(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;"Copy selected"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;private&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; PasteMenuItem_Click(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;"Paste selected"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;font size="3" face="Calibri"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;This code adds the event handlers for the menu items defined in step 3.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;6. Run the application, right click on the border and select a menu option and see the appropriate message box displayed.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="mso-no-proof: yes"&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;&lt;/v:path&gt;&lt;o:lock v:ext="edit" aspectratio="t"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;&lt;img alt="" width="400" height="273" src="http://gwb.blob.core.windows.net/petertweed/Context/Context.PNG" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;Congratulations it’s that easy!&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;font size="3" face="Calibri"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;font size="3" face="Calibri"&gt;Take the &lt;a rel="tag" mce_href="http://technorati.com/tag/Slalom%20Challenge" href="http://technorati.com/tag/Slalom%20Challenge"&gt;Slalom Challenge &lt;/a&gt;at &lt;/font&gt;&lt;a href="http://www.slalomchallenge.com/"&gt;&lt;font color="#0000ff" size="3" face="Calibri"&gt;www.slalomchallenge.com&lt;/font&gt;&lt;/a&gt;&lt;font size="3" face="Calibri"&gt;! &lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139686.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/05/05/searching-for-context-in-silverlight-applications.aspx</guid>
            <pubDate>Thu, 06 May 2010 05:51:36 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139686.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/05/05/searching-for-context-in-silverlight-applications.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139686.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Handling null values and missing object properties in Silverlight 4</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/04/26/handling-null-values-and-missing-object-properties-in-silverlight-4.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/04/26/handling-null-values-and-missing-object-properties-in-silverlight-4.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/04/26/handling-null-values-and-missing-object-properties-in-silverlight-4.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Before &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; 4 to bind a data object to the UI and display a message associated with either a null value or if the binding path was wrong, you would need to write a Converter.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;In Silverlight 4 we find the addition of the markup extensions TargetNullValue and FallbackValue that allows us to display a value when a null value is found in the bound to property and display a value when the property being bound to is not found.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This post will show you how to use both markup extensions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;1. Create a new Silverlight 4 application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;2. In the body of the MainPage.xaml.cs file replace the MainPage class with the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;partial&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;MainPage&lt;/span&gt; : &lt;span style="color: #2b91af"&gt;UserControl&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;      &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; MainPage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;InitializeComponent();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.Loaded += &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;RoutedEventHandler&lt;/span&gt;(MainPage_Loaded);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;void&lt;/span&gt; MainPage_Loaded(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;person&lt;/span&gt; p = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;person&lt;/span&gt;() { NameValue = &lt;span style="color: #a31515"&gt;"Peter Tweed"&lt;/span&gt; }; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.DataContext = p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;person&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; NameValue { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; TitleValue { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This code defines a class called person with two properties.  A new instance of the class is created, only defining the value for one of the properties and bound to the DataContext of the page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;3.  In the MainPage.xaml file copy the following XAML into the LayoutRoot grid:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="60*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="28*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="28*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="154*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="86*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="314*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Name Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Title Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Non Existant Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock4"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; NameValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; TargetNullValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='No Name!!!!!!!'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock5"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; TitleValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; TargetNullValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='No Title!!!!!!!'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock6"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; AgeValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; FallbackValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='No such property!'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt; This XAML defines three textblocks – two of which use the TargetNull and one that uses the FallbackValue markup extensions.  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;4. Run the application and see the person name displayed as defined for the person object, the expected string displayed for the TargetNullValue when no value exists for the boudn property and the expected string displayed for the FallbackValue when the property bound to is not found on the bound object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;It's that easy!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139522.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/04/26/handling-null-values-and-missing-object-properties-in-silverlight-4.aspx</guid>
            <pubDate>Mon, 26 Apr 2010 22:35:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139522.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/04/26/handling-null-values-and-missing-object-properties-in-silverlight-4.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139522.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Formatting made easy - Silverlight 4</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/04/25/formatting-made-easy---silverlight-4.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/04/25/formatting-made-easy---silverlight-4.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/04/25/formatting-made-easy---silverlight-4.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;One of the simplest tasks in business apps is displaying different types of data to be read in the format that the user expects them.  In &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; versions until Silverlight 4 this has meant using a Converter to format data during binding.  This involves writing code for the formatting of the data to bind, instead of simply defining the formatting to use for the data in question where you bind the data to the control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;In Silverlight 4 we find the addition of the StringFormat markup extension that allows us to do exactly this.  Of course the nice thing is the ability to use the common formatting conventions available in C# through the String.Format function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This post will show you how to use three of the common formatting conventions - currency, a defined number of decimal places for a number and a date format.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;Steps:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;1. Create a new Silverlight 4 application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;2. In the body of the MainPage.xaml.cs file replace the MainPage class with the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;partial&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;MainPage&lt;/span&gt; : &lt;span style="color: #2b91af"&gt;UserControl&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; MainPage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;InitializeComponent();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.Loaded += &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;RoutedEventHandler&lt;/span&gt;(MainPage_Loaded);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;void&lt;/span&gt; MainPage_Loaded(&lt;span style="color: blue"&gt;object&lt;/span&gt; sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;info&lt;/span&gt; i = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;info&lt;/span&gt;() { PriceValue = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;Decimal&lt;/span&gt;(9.2567), DoubleValue = 1.2345678, DateValue = &lt;span style="color: #2b91af"&gt;DateTime&lt;/span&gt;.Now }; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.DataContext = i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;info&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;decimal&lt;/span&gt; PriceValue { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;double&lt;/span&gt; DoubleValue { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DateTime&lt;/span&gt; DateValue { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;This code defines a class called info with different data types for the three properties.  A new instance of the class is created and bound to the DataContext of the page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;3.  In the MainPage.xaml file copy the following XAML into the LayoutRoot grid:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="60*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="28*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="28*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="30*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="154*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="86*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Width&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="314*" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Price Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Decimal Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="32,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Date Value:"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock4"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; PriceValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; StringFormat&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='C'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="2"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock5"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; DoubleValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; StringFormat&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='N3'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;&lt;span style="mso-spacerun: yes"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;TextBlock&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Column&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="1"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Grid.Row&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="3"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Height&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="23"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Left"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Margin&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="6,0,0,0"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Name&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="textBlock6"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; Text&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="{&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: 9.5pt"&gt;Binding&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; DateValue&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;,&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; StringFormat&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;='yyyy MMM dd'}"&lt;/span&gt;&lt;span style="font-family: Consolas; color: red; font-size: 9.5pt"&gt; VerticalAlignment&lt;/span&gt;&lt;span style="font-family: Consolas; color: blue; font-size: 9.5pt"&gt;="Top" /&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt; This XAML defines three textblocks that use the StringFormat markup extension.  The three examples use the C for currency, N3 for a number with 3 decimal places and yyy MM dd for a date that displays year 3 letter month and 2 number date.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;4. Run the application and see the data displayed with the correct formatting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt"&gt;It's that easy!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139508.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/04/25/formatting-made-easy---silverlight-4.aspx</guid>
            <pubDate>Mon, 26 Apr 2010 06:15:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139508.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/04/25/formatting-made-easy---silverlight-4.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139508.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Slalom Consulting San Francisco Custom Dev Challenge is live!</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/04/12/slalom-consulting-san-francisco-custom-dev-challenge-is-live.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/04/12/slalom-consulting-san-francisco-custom-dev-challenge-is-live.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/04/12/slalom-consulting-san-francisco-custom-dev-challenge-is-live.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The &lt;a target="_blank" mce_href="http://www.slalomchallenge.com" href="http://www.slalomchallenge.com/"&gt;Slalom Consulting San Francisco Custom Dev Challenge&lt;/a&gt; is live at &lt;a target="_blank" mce_href="http://www.slalomchallenge.com" href="http://www.slalomchallenge.com/"&gt;www.slalomchallenge.com&lt;/a&gt;!!!!!&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" mce_href="http://www.slalom.com" href="http://www.slalom.com/"&gt;Slalom Consulting&lt;/a&gt; employs world-class technical consultants who take on ground breaking projects.  Please take the Slalom Custom Dev Challenge to see how you compare to the level of knowledge we look for in our technical consultants.  The online quiz is focussed on General .NET at this time and will be growing to include other technical topics in the future.&lt;/p&gt;
&lt;p&gt;This application is written in C#, &lt;a rel="tag" mce_href="http://technorati.com/tag/Silverlight" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; and WCF running deployed in the cloud on Windows Azure and working with SQL Azure and Blob Storage.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139218.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/04/12/slalom-consulting-san-francisco-custom-dev-challenge-is-live.aspx</guid>
            <pubDate>Mon, 12 Apr 2010 17:27:47 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139218.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/04/12/slalom-consulting-san-francisco-custom-dev-challenge-is-live.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139218.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SharePoint 2010 is great! Now what do I do?</title>
            <category>Silverlight</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/04/03/sharepoint-2010-is-great-now-what-do-i-do.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/04/03/sharepoint-2010-is-great-now-what-do-i-do.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/04/03/sharepoint-2010-is-great-now-what-do-i-do.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So you have the power of SharePoint 2010 as a platform. What are you going to do now?&lt;/p&gt;
&lt;p&gt;How about build upon the power of the SharePoint product and implement solutions to business problems that are intuitive, easy to use, integrated, have a rich user experience and delivered over the web?&lt;/p&gt;
&lt;p&gt;Sounds good doesn’t it! Come to the &lt;a target="_blank" href="http://www.baynetug.org/DesktopModules/DetailXEvents.aspx?ItemID=423&amp;amp;mid=143"&gt;April East Bay .NET User Group meeting&lt;/a&gt; and watch to me show you how easy it is to build &lt;a rel="tag" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; applications on top of SharePoint 2010 that can be quickly developed, delivered and will wow your stakeholders.&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/139074.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/04/03/sharepoint-2010-is-great-now-what-do-i-do.aspx</guid>
            <pubDate>Sun, 04 Apr 2010 00:36:14 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/139074.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/04/03/sharepoint-2010-is-great-now-what-do-i-do.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/139074.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Silverlight Goes Mobile!</title>
            <category>Silverlight</category>
            <category>Windows Phone 7</category>
            <link>http://geekswithblogs.net/PeterTweed/archive/2010/03/26/silverlight-goes-mobile.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/PeterTweed/archive/2010/03/26/silverlight-goes-mobile.aspx'&gt;http://geekswithblogs.net/PeterTweed/archive/2010/03/26/silverlight-goes-mobile.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The most exciting announcements from Mix 2010 last week for me were the release of the Windows Phone 7 Series &lt;a target="_blank" mce_href="http://developer.windowsphone.com/windows-phone-7-series/" href="http://developer.windowsphone.com/windows-phone-7-series/"&gt;SDK &lt;/a&gt;and the news that the platform utilizes &lt;a rel="tag" href="http://technorati.com/tag/Silverlight"&gt;Silverlight&lt;/a&gt; for the application development technology. From the press and exposure that the platform is being given and the experience that is promised it looks like the &lt;a rel="tag" href="http://technorati.com/tag/WindowsPhone7Series"&gt;Windows Phone 7 Series&lt;/a&gt; could eventually compete with the iPhone.&lt;/p&gt;
&lt;p&gt;For me this is exciting as Silverlight can now be used to develop RIA apps, easily deployed desktop apps and mobile apps. As someone who delivers enterprise technology solutions this equates to a whole bunch of opportunity knocking at the door and asking to join the party.&lt;/p&gt;
&lt;p&gt;Watch this space for future posts on developing apps on the Windows Phone 7 Series platform!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/PeterTweed/aggbug/138949.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>PeterTweed</dc:creator>
            <guid>http://geekswithblogs.net/PeterTweed/archive/2010/03/26/silverlight-goes-mobile.aspx</guid>
            <pubDate>Sat, 27 Mar 2010 04:16:44 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/PeterTweed/comments/138949.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/PeterTweed/archive/2010/03/26/silverlight-goes-mobile.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/PeterTweed/comments/commentRss/138949.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>