<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jesse Liberty &#187; XML</title>
	<atom:link href="http://jesseliberty.com/Tags/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://jesseliberty.com</link>
	<description>Code To Live. Live To Code.</description>
	<lastBuildDate>Tue, 31 Jan 2012 17:18:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Extending the SLHVP Player to be a Platform</title>
		<link>http://jesseliberty.com/2010/01/04/extending-the-slhvp-player-to-be-a-platform/</link>
		<comments>http://jesseliberty.com/2010/01/04/extending-the-slhvp-player-to-be-a-platform/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 21:02:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[HyperVideo Player]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This post is part of the Silverlight HyperVideo Platform  documentation [Updated 1/5 10:50 GMT-5] Everything Flows, Nothing Stands Still – Plato Nothing Endures, But Change &#8211; Diogenes The past few days have seen quite a flurry of design activity, and &#8230; <a href="http://jesseliberty.com/2010/01/04/extending-the-slhvp-player-to-be-a-platform/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post is part of the <a href="http://silverlighthvp.codeplex.com/documentation" target="_blank">Silverlight HyperVideo Platform  documentation</a></p>
<p><em>[Updated 1/5 10:50 GMT-5]</em></p>
<p><strong>Everything Flows, Nothing Stands Still</strong> – Plato<br />
<strong>Nothing Endures, But Change &#8211; </strong>Diogenes</p>
<p>The past few days have seen quite a flurry of design activity, and I’m quite sure some folks who have been following closely have been confused. This note will clarify, and also discuss design decisions made to move the project forward, and why these decisions were made. I have created a <a href="http://silverlighthvp.codeplex.com/Thread/View.aspx?ThreadId=79723" target="_blank">new discussion</a> on the CodePlex site and I would invite your comments and feedback there, if that is convenient for  you.</p>
<p><strong>Original Goals:</strong></p>
<ul>
<li>Build a HyperVideo player which would provide a better way to play our instructional (How Do I) videos and</li>
<li>Annotate the process from design to completion in a series of blog posts, as a way to discuss virtually every aspect of Silverlight</li>
</ul>
<h3>OpenSource and <a href="http://codeplex.com/" target="_blank">CodePlex</a></h3>
<p>We decided to move the project to CodePlex (which took a few  months to get licensed) and open the project up to community involvement.  This is a wonderful thing, and has created unanticipated opportunities.</p>
<p>My perspective on this project, buttressed by management expectations, is to foster as much community contribution as possible, but to take personal responsibility for every line of code in the project, to set coding standards, and so forth.</p>
<p>The project is being built with <a href="http://mef.codeplex.com" target="_blank">MEF</a> which makes it composible and extensible. I envision 6 classifications for code created by the community</p>
<ol>
<li>Code accepted into the <strong>core project</strong> (process has been detailed on the <a href="http://silverlighthvp.codeplex.com/wikipage?title=TheDeveloperPage" target="_blank">Developer Page</a>.</li>
<li>Code accepted into the <strong>plug-in extensions</strong> within the project</li>
<li>Code that needs further work to meet coding standards but we anticipate accepting</li>
<li>Modules that have been rejected as inconsistent with the project, but which can be housed outside of the project (even on another CodePlex project)</li>
<li>Modules that a person or company develops intending to make them proprietary but to work with the project.</li>
</ol>
<p>Key to this is that the first two represent code that will be in a release from the project, and the fifth option is open to any organization, commercial or otherwise, so long as they follow the <a href="http://opensource.org/licenses/ms-pl.html" target="_blank">Ms-PL</a> license.</p>
<h3>The Contributions and Influence of WL</h3>
<p>As you may know, we have a commitment from WL (an e-learning startup) for 100 hours/week of developer time. They already have some code working that they are interested in adapting to this project and contributing to the core. Their stated intention is to contribute all this work into <a href="http://opensource.org/licenses/ms-pl.html" target="_blank">Ms-PL</a> licensed code housed on CodePlex and also to try to build a product or products using the SLHVP as the engine.  That, as I read the <a href="http://opensource.org/licenses/ms-pl.html" target="_blank">Ms-PL</a> is more than appropriate.</p>
<p>Two concerns comes to mind, and this was surfaced by WL itself from day 1:</p>
<ol>
<li>Will they distort the project to meet their own needs in a way that either precludes a more general use or freights the code with only tangentially relevant parts and/or</li>
<li>Will they add complexity that we otherwise would not have</li>
</ol>
<p>After working carefully with them and examining what they need and want, and what will be best for the project, I can unequivocally answer no to #1 and I can give a more nuanced answer to #2.</p>
<p>The short version is that they bring a more complex design, and with it they bring far greater flexibility and mission-appropriate features. Thus, yes, the project will end up more complex with their involvement, but it will <em>not</em> end up with unneeded or irrelevant complexity.  To be specific, all the additional complexity will be in service to features that are appropriate for the project.</p>
<h3>Expanding the Scope</h3>
<p>This would not work if I were to cling to an initial limited vision of the product, but it works great if we lift our vision a little higher.</p>
<blockquote><p>I had a boss who said (paraphrasing):  “If the railroad companies had realized they were not in the rail business but the transportation business, we’d all be flying Union Pacific Airways.”</p></blockquote>
<p>One very important aspect of my role in Microsoft is to provide “educational material” such as videos and <a href="http://silverlight.net/learn/tutorials/mini/1/" target="_blank">mini-tutorials</a>, but an arguably more important job is to explore new ways of conveying this information that greatly enhance customer satisfaction and involvement. That can be done by responding to user-suggestions and concerns (which we try hard to do) and also by exploring relatively radical new ways of conveying this information.</p>
<h3>The Silverlight HyperVideo <em>Platform</em></h3>
<p>Over the past couple weeks the project has been re-conceptualized in somewhat broader terms, as evidenced by the new summary statement:</p>
<table border="2" cellspacing="5" cellpadding="5" width="400">
<tbody>
<tr>
<td width="400" valign="top"><strong>The SLHVP is an extensible HyperVideo platform to orchestrate media, data, user-experiences, and social-interaction into compelling applications.</strong></td>
</tr>
</tbody>
</table>
<p>What this means is that the SLHVP now anticipates providing more than just video and web links, but also, over time, animation and possibly interactive elements. To accomplish this, we are working towards the following key aspects of the design; most of which should be in place by the January 20 release</p>
<ul>
<li>The application is a shell that loads its components via <a href="http://mef.codeplex.com" target="_blank">MEF</a></li>
<li>Each component stands alone, is configured from its own xml file</li>
<li>All configuration information is provided from one or more databases using <a href="http://silverlight.net/getstarted/riaservices/" target="_blank">WCF RIA Services</a></li>
<li>Each component publishes its events, and each event provides information for consuming modules in a class derived from EventArgs</li>
<li>Event management will be mediated by a class associated with the application; we are exploring Prism’s EventAggregator</li>
<li>Each component consumes those events that are of interest to it</li>
</ul>
<p><span style="text-decoration: underline;">We have identified the following modules for the first release</span></p>
<ul>
<li>The Viewer – responsible for instantiating Frames
<ul>
<li>Frames are a way to display one or more control within the viewer – full design to come soon</li>
</ul>
</li>
<li>The Derived <a href="http://smf.codeplex.com" target="_blank">SMF</a> video player – essentially the <a href="http://smf.codeplex.com" target="_blank">SMF</a> player adapted to work within our architecture
<ul>
<li>This will be the primary way to display videos</li>
</ul>
</li>
<li><span style="text-decoration: line-through;">Frame will support a “Location Reached” event that can be triggered by (among other things)</span> We will need to handle the following occurrences and others much like them  [updated 1/5 – please see <a href="http://silverlighthvp.codeplex.com/Thread/View.aspx?ThreadId=79723&amp;ANCHOR#Post273325" target="_blank">this discussion</a>]
<ul>
<li>An injected marker being reached</li>
<li>A marker being reached</li>
<li>A position (elapsed time) in the video being reached</li>
<li>A location event from within a frame being fired</li>
</ul>
</li>
<li>The ItemsListView that displays all the items that will be displayed in this session (this could be a single video, a series of videos, etc.)  The ItemListView will be subclassed to allow for various types of lists, including ordered lists and maps.  For V1 we will most likely have just an ordered list (display video a, b, c in that order)</li>
<li>The PostiionListView – either a stand alone module/viewer or one combined with the ItemsListView that allows seeking to specific locations within an item – this would be used, for example to seek to a specific topic within a video</li>
<li>The LinksView – some items (notably videos) will have a set of links that will either appear all at once or, more likely, as the topic they relate to is mentioned in the Frame.  These links will, typically, pause the current frame and cause a new frame to be created – e.g., will open a new video or a web page, or animation, etc.</li>
</ul>
<p>The current (not yet released) code has a single xml file for creating all of these modules, but even if that is what we release on Jan 20, <span style="text-decoration: line-through;">by early February each module will have its own configuration file. The format for these files will be well-established, and we’ve nearly finalized that already. </span> [updated 1/5 – please see <a href="http://silverlighthvp.codeplex.com/Thread/View.aspx?ThreadId=79723&amp;ANCHOR#Post273325" target="_blank">this discussion</a>]</p>
<p>As the first set of code comes from WL and our other contributors I will expand upon these descriptions and update our feature and task list accordingly.</p>
<p>Thank you all for your ongoing support and patience as we sort this out. I anticipate a great burst of productivity over the next six weeks or so.  Please be sure to see the newly <a href="http://silverlighthvp.codeplex.com/wikipage?title=ReleaseSchedule" target="_blank">updated schedule</a>.</p>
<div class="wlWriterHeaderFooter" style="margin: 0px; padding: 0px 0px 0px 0px;">This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons  license.</a></div>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2010/01/04/extending-the-slhvp-player-to-be-a-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration Files for Silverlight HVP</title>
		<link>http://jesseliberty.com/2010/01/03/configuration-files-for-silverlight-hvp/</link>
		<comments>http://jesseliberty.com/2010/01/03/configuration-files-for-silverlight-hvp/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 19:05:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[HyperVideo Player]]></category>
		<category><![CDATA[Mini-Tutorial]]></category>
		<category><![CDATA[Patterns & Skills]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[HVP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This mini-tutorial is part of the Silverlight HyperVideo Project documentation. Taking Risks One of the great pleasures, and total terrors of documenting this open-source application is that occasionally I have to offer up some half-baked ideas that risk displaying how &#8230; <a href="http://jesseliberty.com/2010/01/03/configuration-files-for-silverlight-hvp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_71410D94.jpg"><img style="margin: 10px 0px; display: inline; border: 0px;" title="MiniTutorialLogo" src="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_thumb_771BB12D.jpg" border="0" alt="MiniTutorialLogo" width="240" height="69" /></a></p>
<p><a href="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_7AB9CC0A.jpg"><img style="margin: 10px 0px; display: inline; border: 0px;" title="SLHvpLogo" src="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_thumb_7A4D9915.jpg" border="0" alt="SLHvpLogo" width="217" height="240" /></a><br />
This <a href="http://silverlight.net/learn/tutorials/mini/1/">mini-tutorial</a> is part of the <a href="http://slhvp.com" target="_blank">Silverlight HyperVideo </a><a href="http://silverlighthvp.codeplex.com/documentation" target="_blank">Project documentation</a>.</p>
<h3>Taking Risks</h3>
<p>One of the great pleasures, and total terrors of documenting this open-source application is that occasionally I have to offer up some half-baked ideas that risk displaying how little I know about a particular topic, but which are necessary to generate discussion. Caveat: this is such an entry.  I could have put this into the <a href="http://silverlighthvp.codeplex.com/documentation" target="_blank">project documentation</a> but I saw an opportunity to widen the audience on a topic that is important to Silverlight Programmers, even if not part of Silverlight itself.</p>
<p><span id="more-217"></span></p>
<h3>Goal</h3>
<p>We want the modules in the <a href="http://slhvp.com" target="_blank">Silverlight HVP</a> to be as flexibile as possible. Towards that end we’ve adopted two strategies:</p>
<ul>
<li>Using the <a href="http://mef.CodePlex.com" target="_blank">Managed Extensibility Framework</a> (MEF) to make every module composable and extensible.</li>
<li>Using XML files to provide Just In Time configuration for each module.</li>
</ul>
<h3>XML Schemas</h3>
<p>It will greatly simplify everyone’s work if we have agreed upon schemas, at least for the configuration files we know about:</p>
<ul>
<li>slhvpInit.xml – initialize the application</li>
<li>slhvpTOC.xml – create a table of contents for a video</li>
<li>slhvpLinks.xml – establish which links will appear while a video runs and what to do when the user clicks on each</li>
</ul>
<p>As a necessary first step, I’ve sketched out examples of slhvpTOC.xml and slhvpLinks.xml – these are not intended to be complete, but to generate <a href="http://silverlighthvp.codeplex.com/Thread/List.aspx" target="_blank">discussion</a>. They are posted here as a way to invite more folks into that discussion.</p>
<h3>slhvpTOC.xml (draft example)</h3>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum1" style="color: #606060;">   1:</span> <span style="color: #0000ff;">&lt;?</span><span style="color: #800000;">xml</span> <span style="color: #ff0000;">version</span><span style="color: #0000ff;">="1.0"</span> <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">="utf-8"</span>?<span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum2" style="color: #606060;">   2:</span> <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigFile</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">="TOC Configuration File"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum3" style="color: #606060;">   3:</span>             <span style="color: #ff0000;">Guid</span><span style="color: #0000ff;">="687DA074-8F94-43a9-AC23-46DF823F8A65"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum4" style="color: #606060;">   4:</span>             <span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">=http://slhvp.com/TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum5" style="color: #606060;">   5:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigurationMetaData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum6" style="color: #606060;">   6:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Version</span><span style="color: #0000ff;">&gt;</span>0.0.1<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Version</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum7" style="color: #606060;">   7:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Purpose</span> <span style="color: #ff0000;">Summary</span><span style="color: #0000ff;">="Create a Table of Contents for a video"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum8" style="color: #606060;">   8:</span>     <span style="color: #0000ff;">&lt;!</span>[CDATA[</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum9" style="color: #606060;">   9:</span>     This configuration file is used to create the table of contents. The topics are listed as links, which cause</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum10" style="color: #606060;">  10:</span>   the video to seek forward or backward to the designated topic.</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum11" style="color: #606060;">  11:</span>     ]]<span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum12" style="color: #606060;">  12:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Module</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">="slHVP Standard TOC Module version 0.1"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum13" style="color: #606060;">  13:</span>             <span style="color: #ff0000;">Guid</span><span style="color: #0000ff;">="D3E2AC2B-FD34-40b4-BC42-308F7956C7D9"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum14" style="color: #606060;">  14:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">CreatedDate</span> <span style="color: #ff0000;">Format</span><span style="color: #0000ff;">="AmericanShort"</span> <span style="color: #ff0000;">Date</span><span style="color: #0000ff;">="01/01/2001"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum15" style="color: #606060;">  15:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Conditions</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum16" style="color: #606060;">  16:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Condition</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">="Advanced"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum17" style="color: #606060;">  17:</span>                  <span style="color: #ff0000;">Value</span><span style="color: #0000ff;">="True"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum18" style="color: #606060;">  18:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Conditions</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum19" style="color: #606060;">  19:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigurationMetaData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum20" style="color: #606060;">  20:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum21" style="color: #606060;">  21:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigurationData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum22" style="color: #606060;">  22:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">TOCEntries</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum23" style="color: #606060;">  23:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum24" style="color: #606060;">  24:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> TOC <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum25" style="color: #606060;">  25:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum26" style="color: #606060;">  26:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekToTime</span><span style="color: #0000ff;">&gt;</span>00:00:10:000<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SeekToTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum27" style="color: #606060;">  27:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum28" style="color: #606060;">  28:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> Introduction <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum29" style="color: #606060;">  29:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum30" style="color: #606060;">  30:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum31" style="color: #606060;">  31:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> TOC <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum32" style="color: #606060;">  32:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum33" style="color: #606060;">  33:</span>         <span style="color: #008000;">&lt;!-- Seek directly to an injected or existing marker --&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum34" style="color: #606060;">  34:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekToMarker</span> <span style="color: #ff0000;">ID</span><span style="color: #0000ff;">="LINQ"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum35" style="color: #606060;">  35:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum36" style="color: #606060;">  36:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> Introduction to LinQ <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum37" style="color: #606060;">  37:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum38" style="color: #606060;">  38:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum39" style="color: #606060;">  39:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> TOC <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum40" style="color: #606060;">  40:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum41" style="color: #606060;">  41:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">SeekToTime</span><span style="color: #0000ff;">&gt;</span>00:20:10:010<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SeekToTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum42" style="color: #606060;">  42:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">SeekTo</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum43" style="color: #606060;">  43:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> MVVM <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum44" style="color: #606060;">  44:</span>       <span style="color: #008000;">&lt;!-- Designate that this entry in toc is only idsplayed if </span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum45" style="color: #606060;">  45:</span> <span style="color: #008000;">      the Advanced condition has been set to true --&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum46" style="color: #606060;">  46:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Visibility</span> <span style="color: #ff0000;">Condition</span><span style="color: #0000ff;">="Advanced"</span> <span style="color: #ff0000;">RequiredValue</span><span style="color: #0000ff;">="True"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum47" style="color: #606060;">  47:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">TOC</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum48" style="color: #606060;">  48:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">TOCEntries</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum49" style="color: #606060;">  49:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigurationData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum50" style="color: #606060;">  50:</span> <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigFile</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum51" style="color: #606060;">  51:</span></pre>
<p><!--CRLF--></p>
</div>
</div>
<p>The file consists of a header (lines 2-4) and two major sections – the meta-data (lines 5-19) and the listing of the (abridged) Table of Contents entries (lines 22 – 48). Notice that the final TOC entry (lines 38-47) is visible only if the condition “Advanced” is set to true, which it is in the Conditions section int eh meta-data (lines 15-18.</p>
<h3>slhvpLinks.xml (draft)</h3>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum1" style="color: #606060;">   1:</span> <span style="color: #0000ff;">&lt;?</span><span style="color: #800000;">xml</span> <span style="color: #ff0000;">version</span><span style="color: #0000ff;">="1.0"</span> <span style="color: #ff0000;">encoding</span><span style="color: #0000ff;">="utf-8"</span>?<span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum2" style="color: #606060;">   2:</span> <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigFile</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">="Links Configuration File"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum3" style="color: #606060;">   3:</span>             <span style="color: #ff0000;">Guid</span><span style="color: #0000ff;">="83ca650e-25ff-414d-adef-7aa790f9d858"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum4" style="color: #606060;">   4:</span>             <span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">="http://slhvp.com/Links"</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum5" style="color: #606060;">   5:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigurationMetaData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum6" style="color: #606060;">   6:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Version</span><span style="color: #0000ff;">&gt;</span>0.0.1<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Version</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum7" style="color: #606060;">   7:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Purpose</span> <span style="color: #ff0000;">Summary</span><span style="color: #0000ff;">="Link time to hyperlink to action"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum8" style="color: #606060;">   8:</span>     <span style="color: #0000ff;">&lt;!</span>[CDATA[</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum9" style="color: #606060;">   9:</span>     This configuration file is used to create linkage among an elapsed time in a How Do I video with</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum10" style="color: #606060;">  10:</span>     the text of a new link to display at that time and then with the action to take based on the new link being clicked.</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum11" style="color: #606060;">  11:</span>     ]]<span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum12" style="color: #606060;">  12:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Module</span> <span style="color: #ff0000;">Name</span><span style="color: #0000ff;">="slHVP Standard Link Module version 0.1"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum13" style="color: #606060;">  13:</span>             <span style="color: #ff0000;">Guid</span><span style="color: #0000ff;">="FB252D52-A603-4bf4-89C8-AA64E52D0343"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum14" style="color: #606060;">  14:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">CreatedDate</span> <span style="color: #ff0000;">Format</span><span style="color: #0000ff;">="AmericanShort"</span> <span style="color: #ff0000;">Date</span><span style="color: #0000ff;">="01/01/2001"</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum15" style="color: #606060;">  15:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Conditions</span> <span style="color: #0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum16" style="color: #606060;">  16:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigurationMetaData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum17" style="color: #606060;">  17:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum18" style="color: #606060;">  18:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">ConfigurationData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum19" style="color: #606060;">  19:</span>   <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Links</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum20" style="color: #606060;">  20:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum21" style="color: #606060;">  21:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> Hyperlink <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum22" style="color: #606060;">  22:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum23" style="color: #606060;">  23:</span>         <span style="color: #008000;">&lt;!--Time format is hh:mm:ss:msmsms--&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum24" style="color: #606060;">  24:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span>00:00:00:000<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum25" style="color: #606060;">  25:</span>         <span style="color: #008000;">&lt;!--Undefined end time - visible to end of video--&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum26" style="color: #606060;">  26:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">EndTime</span><span style="color: #0000ff;">&gt;</span>0<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">EndTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum27" style="color: #606060;">  27:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum28" style="color: #606060;">  28:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> About this video <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum29" style="color: #606060;">  29:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span> WebPage <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum30" style="color: #606060;">  30:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">URL</span><span style="color: #0000ff;">&gt;</span> http://jliberty.com/aboutHyperlink.htm <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">URL</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum31" style="color: #606060;">  31:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum32" style="color: #606060;">  32:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum33" style="color: #606060;">  33:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> Hyperlink <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum34" style="color: #606060;">  34:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum35" style="color: #606060;">  35:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span>00:05:11:010<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum36" style="color: #606060;">  36:</span>         <span style="color: #008000;">&lt;!--End time of 0 or missing end time both mean no end time, run to end--&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum37" style="color: #606060;">  37:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum38" style="color: #606060;">  38:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> What is Linq <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum39" style="color: #606060;">  39:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span> Video <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum40" style="color: #606060;">  40:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">URL</span><span style="color: #0000ff;">&gt;</span> http://silverlight.net/learn/video#103 <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">URL</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum41" style="color: #606060;">  41:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum42" style="color: #606060;">  42:</span>     <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum43" style="color: #606060;">  43:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span> Hyperlink <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum44" style="color: #606060;">  44:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum45" style="color: #606060;">  45:</span>         <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span>00:12:00:110<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">StartTime</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum46" style="color: #606060;">  46:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Time</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum47" style="color: #606060;">  47:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span> Linq Programming Animation <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Text</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum48" style="color: #606060;">  48:</span>       <span style="color: #008000;">&lt;!-- video pauses and is replaced by animation frame --&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum49" style="color: #606060;">  49:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span> Animation <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Action</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum50" style="color: #606060;">  50:</span>       <span style="color: #008000;">&lt;!--Required either a URL or a guid to a frame--&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum51" style="color: #606060;">  51:</span>       <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">GUID</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum52" style="color: #606060;">  52:</span>         E40D045A-4AC4-4ea9-8501-58F0E0407F61</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum53" style="color: #606060;">  53:</span>       <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">GUID</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum54" style="color: #606060;">  54:</span>     <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Link</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum55" style="color: #606060;">  55:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Links</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum56" style="color: #606060;">  56:</span>   <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigurationData</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum57" style="color: #606060;">  57:</span> <span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">ConfigFile</span><span style="color: #0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum58" style="color: #606060;">  58:</span></pre>
<p><!--CRLF--></p>
</div>
</div>
<p>You can see that this format is quite similar to the TOC format, and one open question is whether we need an inclusive schema.</p>
<p>In this file, each Link has a type, where some of the possible values are</p>
<ul>
<li>HyperLink (link to a URL)</li>
<li>Animation (link to a frame that supports animation</li>
<li>Text (link to a frame that displays non-html text)</li>
</ul>
<h3>Purpose of this posting</h3>
<p>To reiterate, briefly, I have two goals with this posting:</p>
<ol>
<li>Generate discussion about what needs to be in the configuration files and whether this is a reasonable starting point and</li>
<li>Follow through on the implications of my thinking about markers, links, etc.</li>
</ol>
<p>Note that this topic is also under discussion <a href="http://silverlighthvp.codeplex.com/Thread/View.aspx?ThreadId=77016" target="_blank">here</a> which is a great place to continue the discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2010/01/03/configuration-files-for-silverlight-hvp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight HVP Design, Refinements</title>
		<link>http://jesseliberty.com/2009/12/29/silverlight-hvp-design-refinements/</link>
		<comments>http://jesseliberty.com/2009/12/29/silverlight-hvp-design-refinements/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:30:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[HVP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Design Update&#160; This was posted on Dec. 29 and updated on Dec. 30.&#160;The significant changes are to the Configuration and Marker Events sections This blog post extends the&#160; previous post in which I discussed the IMarkerEventHandler interface and how it &#8230; <a href="http://jesseliberty.com/2009/12/29/silverlight-hvp-design-refinements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_5DA2D85C.jpg" mce_href="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_5DA2D85C.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=MiniTutorialLogo border=0 alt=MiniTutorialLogo src="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_thumb_241FC865.jpg" width=240 height=69 mce_src="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorialLogo_thumb_241FC865.jpg"/></a> </p>
<p><a href="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_47D8EFFF.jpg" mce_href="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_47D8EFFF.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SLHvpLogo border=0 alt=SLHvpLogo src="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_thumb_0E55E008.jpg" width=217 height=240 mce_src="http://blogs.silverlight.net/blogs/jesseliberty/SLHvpLogo_thumb_0E55E008.jpg"/></a> </p>
<h1>Design Update&nbsp; </h1>
<p><em>This was posted on Dec. 29 and updated on Dec. 30.</em>&nbsp;<em>The significant changes are to the Configuration and Marker Events sections</em></p>
<p>This blog post extends the&nbsp; <a href="http://blogs.silverlight.net/blogs/jesseliberty/archive/2009/12/28/silverlight-hvp-design-update.aspx" target=_blank mce_href="http://blogs.silverlight.net/blogs/jesseliberty/archive/2009/12/28/silverlight-hvp-design-update.aspx">previous post</a> in which I discussed the IMarkerEventHandler interface and how it might be implemented. </p>
<h3>Readers and Frames</h3>
<p>The design calls for one or more Pages each of which may have any number of UI modules. The default case is to have a TableOfContents module, a LinksDisplay module and a Reader module. </p>
<p>A <em>Reader </em>houses <em>Frames</em> where a <em>Frame </em>is a set of controls.&nbsp; The Reader knows which frame to create and manages the lifetime of Frames. </p>
<p>A given frame has a known set of controls. For example, Frame-Type-1 might house the&nbsp; HVP-extended version of the <a href="http://smf.codeplex.com/" target=_blank mce_href="http://smf.codeplex.com/">Silverlight Media Framework</a> player (as described in <a href="http://blogs.silverlight.net/blogs/jesseliberty/archive/2009/12/19/hvp-core-scaffolding.aspx" target=_blank mce_href="http://blogs.silverlight.net/blogs/jesseliberty/archive/2009/12/19/hvp-core-scaffolding.aspx">this blog post</a>) and Frame-Type-2 might display an html page and have a set of navigation controls.&nbsp;&nbsp; (More on readers and Frames early in January)</p>
<h3>Configuration</h3>
<p>We anticipate using XML configuration files (delivered via <a href="http://silverlight.net/getstarted/riaservices/" target=_blank mce_href="http://silverlight.net/getstarted/riaservices/">WCF RIA Services</a> and instantiated by <a href="http://mef.codeplex.com/" target=_blank mce_href="http://mef.codeplex.com">MEF</a> into a collection of business objects that for now I’ll call&nbsp; HVPLayout.&nbsp; </p>
<h3>Marker Events</h3>
<p>The meaning and actions to be taken by a Frame in response to hitting a marker in the video will be managed by the IMarkerEventHandler (MEH) implementing class. as described in the previous post mentioned earlier.&nbsp; </p>
<p>One approach is to have the Marker Event Handler class&nbsp; own a collection of HVPMarkerEvent business objects, each representing one association between a marker, its time, its type (link, etc.) and whatever other information the MEH class will need to raise the appropriate event.&nbsp; A second approach, and one that is gaining a lot of traction, is to bring in the EventAggregator from <a href="http://msdn.microsoft.com/en-us/library/dd458809.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/dd458809.aspx">Prism</a>.</p>
<h3>Supporting Legacy Videos</h3>
<p>The Silverlight HyperVideo Player will continue to support existing videos that do not have markers nor our config files by having a default layout in which there is a reader that takes up the entire page, and that reader contains a Frame that itself contains nothing but our extension to the <a href="http://smf.codeplex.com/" target=_blank mce_href="http://smf.codeplex.com">SMF</a> player. </p>
<h3>Other Technologies</h3>
<p>We are actively looking at when using an IoC (Inversion of Control) container such as <a href="http://ninject.org/" target=_blank mce_href="http://ninject.org/">Ninject</a> would provide services that are not otherwise available. For now, we believe <a href="http://mef.codeplex.com/" target=_blank mce_href="http://mef.codeplex.com">MEF</a> will provide the Container services, configuration and interaction with Unit Test that we need.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/12/29/silverlight-hvp-design-refinements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Silverlight HVP Spec</title>
		<link>http://jesseliberty.com/2009/11/15/the-silverlight-hvp-spec/</link>
		<comments>http://jesseliberty.com/2009/11/15/the-silverlight-hvp-spec/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 05:43:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[HVP]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The Silverlight HyperVideo Player: A Community Project The Silverlight HVP Elevator Pitch: The Silverlight&#160; HyperVideo Player (HVP) will do for Silverlight How Do I Videos what Hypertext did for the Internet: it will provide simple, fast, and easy to use &#8230; <a href="http://jesseliberty.com/2009/11/15/the-silverlight-hvp-spec/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><font color=#ff0000>The Silverlight HyperVideo Player: A Community Project</font></strong></p>
<p><a href="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorial_62D07292.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=MiniTutorial border=0 alt=MiniTutorial src="http://blogs.silverlight.net/blogs/jesseliberty/MiniTutorial_thumb_32A927CF.jpg" width=240 height=70/></a> </p>
<h1>The Silverlight HVP <a href="http://en.wikipedia.org/wiki/Elevator_pitch" target=_blank>Elevator Pitch</a>:</h1>
<p>The Silverlight&nbsp; <font color=#ff0000><strong>H</strong></font>yper<font color=#ff0000><strong>V</strong></font>ideo <font color=#ff0000><strong>P</strong></font>layer (HVP) will do for <a href="http://silverlight.net/learn/videos/silverlight-videos/" target=_blank mce_href="http://silverlight.net/learn/videos/silverlight-videos/">Silverlight How Do I Videos</a> what Hypertext did for the Internet: it will provide simple, fast, and easy to use links to additional, supplementary or related information.&nbsp; </p>
<p>As an example, the user might be watching a video on data binding and the term “Dependency Property” is mentioned and at the same time a link appears. If the user clicks on that link, the video is paused and an explanation of Dependency Properties is provided. </p>
<p><font color=#ff0000><strong>Update 11/20</strong>: We have received our MS-PL allowing me to move this project to CodePlex.&nbsp;I will update again with a link once it is in place.&nbsp; &nbsp;Other updates in-line in red.</font></p>
<p mce_keep="true">&nbsp;</p>
<h3>Summary of Purpose </h3>
<p>While I have covered HyperVideo in <a href="http://blogs.silverlight.net/blogs/jesseliberty/archive/tags/Hypervideo/default.aspx" target=_blank>numerous blog postings</a> and <a href="http://blogs.silverlight.net/blogs/jesseliberty/archive/tags/Hypervideo/default.aspx" target=_blank>videos</a> in the past, this project will follow the creation and delivery of a complete application.&nbsp; spinning out mini-tutorials and videos on an extremely wide range of topics.</p>
<p>The project will be designed, developed and delivered in collaboration with many others, both inside of Microsoft and out.&nbsp; </p>
<h1>Scope and Deliverables</h1>
<p>This document will serve as the draft&nbsp; “spec” for the first phases of development. I have intentionally under-documented the spec because of the immutable law that the likelihood of a spec being followed is inversely proportional to its size and (b) the requirements and design will evolve as the community adds ideas and refinement.&nbsp; </p>
<h3>Contributing to the Spec and to the Project</h3>
<p>Contributions, refinements and critiques of this document are not only welcome, they are its lifeblood.&nbsp; For now, I’ll ask that you respond in the comments, , as things evolve I’ll roll out a better mechanism for tracking all of the feedback.</p>
<p>Contributions to the project will be described by the end of the month; for now, if the comments section is insufficient, please feel free to <a href="mailto:jliberty@microsoft.com" target=_blank>write to me directly</a>.</p>
<h3>Core Functionality</h3>
<p>The Silverlight HVP will be a modular, extensible, and robust Rich Internet Application that can deliver HyperVideo on any platform that is supported by Silverlight.&nbsp; Initial requirements include:</p>
<ul>
<li>Present any existing <a href="http://silverlight.net/learn/videos/silverlight-videos/" target=_blank mce_href="http://silverlight.net/learn/videos/silverlight-videos/">Silverlight How Do I Videos</a> <em>as is. </em>
<ul>
<li>That is, the Silverilght HVP will be backwards compatible with the existing player </li>
<li>Any existing video can be enhanced to provide a Table of Contents and/or Hyperlinks either through encoding or marker injection at which point it will be indistinguishable from videos created specifically for the Silverlight HVP </li>
</ul>
</li>
<li><a href="http://blogs.silverlight.net/blogs/jesseliberty/TOCTree_3680BD1E.png" mce_href="http://blogs.silverlight.net/blogs/jesseliberty/TOCTree_3680BD1E.png"><img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 0px 10px 10px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="TOC Tree" border=0 alt="TOC Tree" align=right src="http://blogs.silverlight.net/blogs/jesseliberty/TOCTree_thumb_1F5542A0.png" width=240 height=197 mce_src="http://blogs.silverlight.net/blogs/jesseliberty/TOCTree_thumb_1F5542A0.png"/></a>Display a <strong>Table of Contents</strong> (TOC) for each video, with <a href="http://en.wikipedia.org/wiki/Affordance" target=_blank mce_href="http://en.wikipedia.org/wiki/Affordance">affordances</a> for users to move from one topic to the next
<ul>
<li>Current plan is to separate the TOC from the links, presenting the complete Table of Contents when the video begins, but revealing the links as their context arises.&nbsp; </li>
<li>For sufficiently complex Tables of Content we may want to provide the ability to collapse and expand subtopics </li>
</ul>
</li>
<li>Display a list of topics as they are mentioned in the video, with each topic’s name acting as a <strong><em>HyperVideo</em> Link.</strong></li>
<li>Full support for <a href="http://www.microsoft.com/enable/" target=_blank mce_href="http://www.microsoft.com/enable/">Closed Captioning</a> and all standard video controls (e.g.,, stop, pause, skip etc.)</li>
<li>TOC and Hypervideo Links will be decoupled from the markers in the video so that the links can be modified without changing or re-encoding the video </li>
</ul>
<h1>Potential Features</h1>
<p>There are literally dozens of potential additional features, some of which are key to adoption of the player in various settings; others either won’t make it into early versions of the product or will be developed by the community once the open source mechanism is in place. </p>
<p>[Images in this spec are for illustration purposes and are not final visualizations of the application]</p>
<h1>Not Just An Application</h1>
<p>A primary goal of this project is not only the end product, but the opportunity for discussing Silverlight skills in the context of a real-world application.&nbsp; Building the Silverlight HyperVideo Player will force consideration of a number of interesting aspects of Silverlight and related technologies. </p>
<h1>Some Thoughts on Implementation</h1>
<p>There are numerous ways to add markers to video in Silverlight; in the course of developing the Silverlight HVP we will consider two.&nbsp; The easier approach is to use Expression Encoder to do the initial heavy lifting.&nbsp; Encoder is designed to record four pieces of information about each marker, the first two of which matter to us. </p>
<ol>
<li><img style="MARGIN: 10px 0px 10px 10px; DISPLAY: inline" title=Markers border=0 alt=Markers align=right src="http://silverlight.net/blogs/jesseliberty/Markers_thumb_070F5A31.gif" width=210 height=102 mce_src="http://silverlight.net/blogs/jesseliberty/Markers_thumb_070F5A31.gif"/>The elapsed time into the video at which the marker appears </li>
<li>A “value” that can have an intrinsic meaning or not as you choose (more about this below) </li>
</ol>
<p>The other two pieces of meta-data in a marker are the thumbnail and keyframe for each marker; these are typically used to create and manage “chapters” in long videos. </p>
<h3>Working With Markers</h3>
<p>The Media Element (or a control derived from the Media Element) will fire an event each time a marker is encountered. The HyperVideo player will respond to that event by following the link or opening the associated video as indicated in the metadata that relates a given marker to a given action. </p>
<p>During development of the Silverlight HVP we will explore at least two ways of managing the metadata: storing it in a relational database and storing it in an XML file.</p>
<p>As an off-the-cuff example, the MetaData might be stored in an XML file that looks more or less like this:</p>
<pre>&lt;VidepPlayerMetaData&gt;
   &lt;VideoInfo&gt;
     &lt;Title="Data Binding" /&gt;
     &lt;URL="http://foo.bar.com" /&gt;
   &lt;/VideoInfo&gt;
   &lt;Markers&gt;
      &lt;Marker Val="DBX09-001" Action="Play" URL="http://silverlight.net/learn/videos/v1027" /&gt;
      &lt;Marker Val="DBX09-002" Action="Play" URL="http://silverlight.net/learn/videos/h1375" /&gt;
      &lt;Marker Val="DBX09-003" Action="Link" URL="http://en.wikipedia.org/LCA" /&gt;
      &lt;Marker Val="DBX09-004"  /&gt;
      &lt;Marker Val="DBX09-005" Action="Play" URL="http://silverlight.net/learn/videos/v1288" /&gt;
   &lt;/Markers&gt;
&lt;/VidepPlayerMetaData&gt;</pre>
<p mce_keep="true">&nbsp;</p>
<h3>Encoder can create a working player to get us started. </h3>
<p>At its heart, the player is a control or a set of controls that can be skinned to change its appearance and can be subclassed to change its behavior. Doing so demonstrates best practices, and significantly simplifies the development effort. </p>
<h5><strong>The UI Sketch</strong></h5>
<p>Of course, the player created by Encoder is just the starting point it will serve as an essential <strong><a href="http://blogs.silverlight.net/blogs/jesseliberty/SilverlightHVP_2A4B7674.jpg" mce_href="http://blogs.silverlight.net/blogs/jesseliberty/SilverlightHVP_2A4B7674.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 0px 10px 10px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SilverlightHVP border=0 alt=SilverlightHVP align=right src="http://blogs.silverlight.net/blogs/jesseliberty/SilverlightHVP_thumb_0C00BF7E.jpg" width=244 height=185 mce_src="http://blogs.silverlight.net/blogs/jesseliberty/SilverlightHVP_thumb_0C00BF7E.jpg"/></a></strong>component within a larger application.&nbsp; The UI design at this point is only a first approximation, subject to significant change, but the rough sketch is enough for me to get started on development.</p>
<p>“You start coding, I’ll go find out what they want.”</p>
<p>The sketch calls for four windows and a menu.</p>
<ul>
<li>The primary player (top center)</li>
<li>The Table of Contents (top left)</li>
<li>The Links window (top right)</li>
<li>The linked-to (target) window (bottom)</li>
</ul>
<p>Each window will&nbsp; be resizable, movable, and dockable.</p>
<h5>Deliverables and Due Dates:</h5>
<p>It is tempting to say that too little is known to create a set of milestones and delivery dates; but projects with no dates have a known finish time: <em>never</em>.&nbsp; </p>
<p>Been there, done that, still have the scars.&nbsp; </p>
<p>Far better to stake yourself to a timetable, then be held accountable; if not to hitting the dates, then to explaining&nbsp; what has changed that justifies a change.</p>
<p>Thus, after many seconds of careful consideration, here is the timeline for the first iteration of this project. </p>
<blockquote>
<table border=1 cellSpacing=0 cellPadding=2 width=400>
<tbody>
<tr>
<td vAlign=top width=303><strong>Task</strong></td>
<td vAlign=top width=97><strong>Due</strong></td>
</tr>
<tr>
<td vAlign=top width=303>This overview spec completed &amp; published</td>
<td vAlign=top width=97>11/15</td>
</tr>
<tr>
<td vAlign=top width=303><font color=#ff0000>Proof of concept</font> deployed&nbsp; on SilverlightGeek.me</td>
<td vAlign=top width=97>1/1</td>
</tr>
<tr>
<td vAlign=top width=303>Delivery of final UI Assets</td>
<td vAlign=top width=97>1/21</td>
</tr>
<tr>
<td vAlign=top width=303>First Release</td>
<td vAlign=top width=97><font color=#ff0000>Mix10</font></td>
</tr>
</tbody>
</table>
</blockquote>
<p>My plans of course go well beyond Mix, but this is, I hope,&nbsp; a good start.&nbsp; I welcome and urge you to join me in an open technical discussion of any and all of this project.</p>
<p>The fine print:</p>
<ul>
<li>Project Turing, and the feedback it engendered, served as a great testing ground for building this kind of application. It was not intended that Turing would be completed, and I’ll suspend it indefinitely.&nbsp; It is my intent that this project will roll out as an application. </li>
<li>I believe this project has tremendous potential, and I’m committed to it, but I’ve been on enough great projects that were stopped before seeing the light of day, that I make these commitments knowing that not everything is under my control (the great delusion is I still think <em>anything </em>is under my control)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/11/15/the-silverlight-hvp-spec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating A Form – Level 100</title>
		<link>http://jesseliberty.com/2009/08/04/creating-a-form-%e2%80%93-level-100/</link>
		<comments>http://jesseliberty.com/2009/08/04/creating-a-form-%e2%80%93-level-100/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 20:26:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[Xaml]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[(click on the image to see other Mini-tutorials) &#160; Turing Page [Novice: 4]&#160; FAQ&#160; Table of Contents &#160; &#160; &#160; &#160; In Novice Page 3 we were about to create a form.&#160; Here is&#160; the form we’ll create: Layout Is &#8230; <a href="http://jesseliberty.com/2009/08/04/creating-a-form-%e2%80%93-level-100/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img title=MiniTutorialLogo border=0 alt=MiniTutorialLogo src="http://silverlight.net/blogs/jesseliberty/MiniTutorialLogo_50448465.jpg" width=304 height=90 mce_src="http://silverlight.net/blogs/jesseliberty/MiniTutorialLogo_50448465.jpg"/> <br />(click on the image to see other Mini-tutorials)</p>
<p mce_keep="true">&nbsp;</p>
<p><strong></strong></p>
<p><strong><img style="MARGIN: 0px 25px 0px 0px" title=ProjectTuringLogo border=0 alt=ProjectTuringLogo align=left src="http://silverlight.net/blogs/jesseliberty/ProjectTuringLogo_2BB2F6E1.jpg" width=113 height=125 mce_src="http://silverlight.net/blogs/jesseliberty/ProjectTuringLogo_2BB2F6E1.jpg"/> </strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong></strong></p>
<p><strong>Turing Page </strong>[Novice: 4]&nbsp; <a href="http://silverlight.net/blogs/jesseliberty/pages/turing-FAQ.aspx" target=_blank>FAQ</a>&nbsp; <a href="http://silverlight.net/blogs/jesseliberty/pages/Turing-Project-Table-Of-Contents.aspx" target=_blank mce_href="http://silverlight.net/blogs/jesseliberty/pages/Turing-Project-Table-Of-Contents.aspx">Table of Contents</a></p>
<p mce_keep="true">&nbsp;</p>
<p mce_keep="true">&nbsp;</p>
<p mce_keep="true">&nbsp;</p>
<p mce_keep="true">&nbsp;</p>
<p><i></i></p>
<p><em></em></p>
<p>In Novice Page 3 we were about to create a form.&nbsp; Here is&nbsp; the form we’ll create:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/TuringBlogEntryForm_145BE8E2.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/TuringBlogEntryForm_145BE8E2.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=TuringBlogEntryForm border=0 alt=TuringBlogEntryForm src="http://silverlight.net/blogs/jesseliberty/TuringBlogEntryForm_thumb_0CD07975.jpg" width=254 height=359 mce_src="http://silverlight.net/blogs/jesseliberty/TuringBlogEntryForm_thumb_0CD07975.jpg"/></a> </p>
<h4>Layout Is Easiest In Expression Blend</h4>
<p>To create this form, I’ll begin by opening Expression Blend 3 and creating a new Silverlight Application,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/NewBlendProject_683EEBF0.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/NewBlendProject_683EEBF0.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=NewBlendProject border=0 alt=NewBlendProject src="http://silverlight.net/blogs/jesseliberty/NewBlendProject_thumb_19CA5986.jpg" width=304 height=214 mce_src="http://silverlight.net/blogs/jesseliberty/NewBlendProject_thumb_19CA5986.jpg"/></a> </p>
<p>If you’ve not reconfigured Blend it will open with numerous panels, some tabbed, some open as shown here:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendDesignSurfaceSquashed_31EDC3E1.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendDesignSurfaceSquashed_31EDC3E1.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendDesignSurfaceSquashed border=0 alt=BlendDesignSurfaceSquashed src="http://silverlight.net/blogs/jesseliberty/BlendDesignSurfaceSquashed_thumb_1F38CA2A.jpg" width=304 height=214 mce_src="http://silverlight.net/blogs/jesseliberty/BlendDesignSurfaceSquashed_thumb_1F38CA2A.jpg"/></a> </p>
<h4>A Quick Tour of Expression Blend</h4>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendToolboxClosed_1ECC9735.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendToolboxClosed_1ECC9735.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 10px 25px 10px 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendToolboxClosed border=0 alt=BlendToolboxClosed align=left src="http://silverlight.net/blogs/jesseliberty/BlendToolboxClosed_thumb_49A4FB47.jpg" width=47 height=175 mce_src="http://silverlight.net/blogs/jesseliberty/BlendToolboxClosed_thumb_49A4FB47.jpg"/></a>On the far left is the toolbar a small piece of which is shown here. Notice that some of the controls have a tiny white triangle next to them. Clicking on the triangle opens up related tools.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendToolboxOpen_096EE1CD.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendToolboxOpen_096EE1CD.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendToolboxOpen border=0 alt=BlendToolboxOpen src="http://silverlight.net/blogs/jesseliberty/BlendToolboxOpen_thumb_1DF4314B.jpg" width=186 height=243 mce_src="http://silverlight.net/blogs/jesseliberty/BlendToolboxOpen_thumb_1DF4314B.jpg"/></a> </p>
<p>In the second image I’ve clicked on the triangle next to button and opened a panel with controls related to button.</p>
<p>Next to the toolbox are a number of tabbed panels including&nbsp; Projects, Assets, States and Parts, below which is the Objects and Timeline Panel&nbsp; </p>
<p>Note that the files in the Blend project are identical to the files in a Visual Studio project and you can and will have these files open in both applications at the same time.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendProjectsWindow_569EDB58.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendProjectsWindow_569EDB58.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendProjectsWindow border=0 alt=BlendProjectsWindow src="http://silverlight.net/blogs/jesseliberty/BlendProjectsWindow_thumb_5632A863.jpg" width=304 height=305 mce_src="http://silverlight.net/blogs/jesseliberty/BlendProjectsWindow_thumb_5632A863.jpg"/></a> </p>
<p>In the center of the screen is the <em>Design Surface</em> otherwise known as the <em>Art board</em>.&nbsp; </p>
<p>Also note the tiny control in the upper left corner of the Art-board that lets you switch between a grid and a canvas. Also note that surrounding the grid area (white) is a border (blue). You can use the border area to create rows and columns very quickly, as you’ll see in just a moment.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendGridWindow_6EC245B3.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendGridWindow_6EC245B3.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendGridWindow border=0 alt=BlendGridWindow src="http://silverlight.net/blogs/jesseliberty/BlendGridWindow_thumb_276CEFC1.jpg" width=244 height=203 mce_src="http://silverlight.net/blogs/jesseliberty/BlendGridWindow_thumb_276CEFC1.jpg"/></a> </p>
<p>Expression Blend allows you to work in a WYSIWYG environment, but it also produces Xaml that corresponds to everything you do on the design surface. You can switch to split mode to see both the design and the Xaml. </p>
<p>In fact, e<em>very visible object</em> in Silverlight is a CLR object that can be created in three ways:</p>
<p>1. In Code (as you’ll see much later in the book)</p>
<p>2. In Xaml (the markup language that we’ll be talking about quite a bit in this chapter)</p>
<p>3. By Drag and Drop into the design surface. </p>
<p>The design surface and the Xaml are two reflections of the exact same information. Dragging a control onto the design surface generates Xaml, and modifying the Xaml will be reflected on the Design surface. </p>
<p>The far upper right has three tabs:&nbsp; the properties window where you set the properties of any object on the design surface,&nbsp; Resources and&nbsp; Data.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BlendPropertiesWindow_2E1FF944.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BlendPropertiesWindow_2E1FF944.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BlendPropertiesWindow border=0 alt=BlendPropertiesWindow src="http://silverlight.net/blogs/jesseliberty/BlendPropertiesWindow_thumb_749CE94C.jpg" width=205 height=304 mce_src="http://silverlight.net/blogs/jesseliberty/BlendPropertiesWindow_thumb_749CE94C.jpg"/></a> </p>
<h4>Xaml</h4>
<p>XAML is the markup language for Silverlight. Think of it as HTML on steroids. </p>
<p>Xaml is an XML markup language (and thus is highly toolable; that is, it works very well with tools like Expression Blend and Visual Studio).</p>
<p>Xaml is highly expressive and can be used to describe not only layout (where to place controls) and standard forms-based controls (buttons, etc.) as well as graphics (ellipses, rectangles, etc.) but can also be used to declare transformations and animations of those objects, and much more.</p>
<h3>Creating a Form for Data Input</h3>
<p>Our goal is to create a simple form for data input, in which users will enter information about their favorite book.</p>
<p>We’ll build the form using the methodology of <em>successive approximation</em> also known by the technical term <em>Get it working and keep it working</em>. To tackle this, we’ll divide the work into three stages: laying out the controls, wiring up the events, and then, in subsequent chapters, connecting the data to data objects. </p>
<h4>Layout Panels</h4>
<p>There are quite a number of layout panels available, though the most common are</p>
<p>· Panel – the abstract base class for other, more specialized panels</p>
<p>· Canvas – Used for absolute positioning</p>
<p>· Stack Panel – For stacking objects on top of or next to one another</p>
<p>· Tab Panel – for tabbed layouts</p>
<p>· Docking Panel &#8211; for docking objects to the top, bottom or sides of your panel</p>
<p>· Grid – Probably the most frequently used panel. The grid allows you to create rows and columns and fill each “cell” with other controls. </p>
<p>Visual Studio and Expression Blend create a Grid panel for you by default. A grid is very much like an HTML Table, but a bit more powerful. </p>
<h4>Creating Rows And Columns</h4>
<p>Let’s start in the art board in Expression. To ensure that we have a grid, first hover over the small button at the top left corner. It will tell you if you are in Grid or Canvas mode; you want Grid.</p>
<p><b><a href="http://silverlight.net/blogs/jesseliberty/clip_image0024_221E0910.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/clip_image0024_221E0910.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002[4] border=0 alt=clip_image002[4] src="http://silverlight.net/blogs/jesseliberty/clip_image0024_thumb_5AC8B31D.jpg" width=244 height=165 mce_src="http://silverlight.net/blogs/jesseliberty/clip_image0024_thumb_5AC8B31D.jpg"/></a></b></p>
<p>You can now designate where you want your rows and columns. While hovering over the border a yellow line is drawn to show where your row will be created. </p>
<p><b><a href="http://silverlight.net/blogs/jesseliberty/clip_image003_617BBCA0.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/clip_image003_617BBCA0.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: 0px" title=clip_image003 border=0 alt=clip_image003 src="http://silverlight.net/blogs/jesseliberty/clip_image003_thumb_533D43B0.jpg" width=231 height=193 mce_src="http://silverlight.net/blogs/jesseliberty/clip_image003_thumb_533D43B0.jpg"/></a></b></p>
<p><strong></strong></p>
<p>If you click, the line turns blue and the row is written to the Xaml. </p>
<p><b><a href="http://silverlight.net/blogs/jesseliberty/clip_image004_44FECAC0.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/clip_image004_44FECAC0.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://silverlight.net/blogs/jesseliberty/clip_image004_thumb_4BB1D443.jpg" width=180 height=168 mce_src="http://silverlight.net/blogs/jesseliberty/clip_image004_thumb_4BB1D443.jpg"/></a></b></p>
<p>The small open-lock symbol indicates that the rows are using relative spacing rather than absolute. </p>
<h4>&nbsp;</h4>
<h4>Looking At The Xaml Produced</h4>
<p>To see the markup produced by drawing these lines, click on the “split” option on the small bar to the right of the art-board </p>
<p><b><a href="http://silverlight.net/blogs/jesseliberty/clip_image005_0052307F.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/clip_image005_0052307F.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image005 border=0 alt=clip_image005 src="http://silverlight.net/blogs/jesseliberty/clip_image005_thumb_7213B78E.jpg" width=149 height=170 mce_src="http://silverlight.net/blogs/jesseliberty/clip_image005_thumb_7213B78E.jpg"/></a></b></p>
<p>Split mode can be a big help in relating the Xaml to the design.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/SplitModenoarrows_63D53E9E.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/SplitModenoarrows_63D53E9E.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="SplitMode no arrows" border=0 alt="SplitMode no arrows" src="http://silverlight.net/blogs/jesseliberty/SplitModenoarrows_thumb_434DFEEC.jpg" width=304 height=206 mce_src="http://silverlight.net/blogs/jesseliberty/SplitModenoarrows_thumb_434DFEEC.jpg"/></a> <br />(click on image to see larger version)</p>
<h4>&nbsp;</h4>
<h4>Creating The Rows and Putting In The Prompts</h4>
<p>Looking at the image of the form at the top of this entry, you can see that you’ll need 11 rows. Go ahead and click on the left margin about 10 or 11 times, creating somewhat evenly spaced rows. Then move to the border on top, and click to create a pair of columns.&nbsp; </p>
<p>As you add controls you can adjust the relative heights of each row (or the width of each column) to fit. </p>
<p>Start filling in the cells by adding the prompts for each row. Begin on the second row and reserve the first row for the title. </p>
<h4>Adding Prompts</h4>
<p>Click on TextBlock in the toolbox </p>
<p><a href="http://silverlight.net/blogs/jesseliberty/PickingATextBlock_3ED77E25.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/PickingATextBlock_3ED77E25.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=PickingATextBlock border=0 alt=PickingATextBlock src="http://silverlight.net/blogs/jesseliberty/PickingATextBlock_thumb_77822832.jpg" width=304 height=217 mce_src="http://silverlight.net/blogs/jesseliberty/PickingATextBlock_thumb_77822832.jpg"/></a></p>
<p>Then drag with the mouse down to create a TextBlock in the left cell of the second row. Don’t worry about size or placement, you’ll fix that in the properties window. </p>
<p><a href="http://silverlight.net/blogs/jesseliberty/DraggingTextBlock_7715F53D.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/DraggingTextBlock_7715F53D.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=DraggingTextBlock border=0 alt=DraggingTextBlock src="http://silverlight.net/blogs/jesseliberty/DraggingTextBlock_thumb_5DADF203.jpg" width=304 height=142 mce_src="http://silverlight.net/blogs/jesseliberty/DraggingTextBlock_thumb_5DADF203.jpg"/></a> </p>
<p>With that in place, click next to it and then turn to the Properties window.&nbsp; Name the TextBlock <em>FullNamePrompt </em>and set the alignments, margins and font size as shown here:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/LayoutForPrompts_0167199E.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/LayoutForPrompts_0167199E.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=LayoutForPrompts border=0 alt=LayoutForPrompts src="http://silverlight.net/blogs/jesseliberty/LayoutForPrompts_thumb_5CD58C19.jpg" width=304 height=372 mce_src="http://silverlight.net/blogs/jesseliberty/LayoutForPrompts_thumb_5CD58C19.jpg"/></a> </p>
<p>Once this is set, copy the control in the Objects and Timeline panel and then paste half a dozen copies,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/copyTextBlocks_75652969.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/copyTextBlocks_75652969.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=copyTextBlocks border=0 alt=copyTextBlocks src="http://silverlight.net/blogs/jesseliberty/copyTextBlocks_thumb_74F8F674.jpg" width=184 height=304 mce_src="http://silverlight.net/blogs/jesseliberty/copyTextBlocks_thumb_74F8F674.jpg"/></a> </p>
<p>The advantage of making these copies, and then editing each in the properties window is that you preserve the Alignments and Margins, font and font size; you then only have to set the name, text and row for each. </p>
<p>(A better solution is to use a style, which we’ll get to later in this series, and which you can read about now <a href="http://silverlight.net/blogs/jesseliberty/archive/2008/07/05/styles-and-templates.aspx" target=_blank mce_href="http://silverlight.net/blogs/jesseliberty/archive/2008/07/05/styles-and-templates.aspx">here</a> or see a video about styles <a href="http://beta.silverlight.net/learn/videos/silverlight-videos/creating-styles" target=_blank mce_href="http://beta.silverlight.net/learn/videos/silverlight-videos/creating-styles">here</a>).</p>
<h4>Adding the Input Controls</h4>
<p>When you’ve set all your prompts on the left side, it is time to add the input controls on the right.&nbsp; The first five entry rows are TextBoxes,</p>
<p>[Note that entry is done with a TextBox and the prompts are TextBlocks – the two words are very similar but the controls are quite different]</p>
<p>Drag the first TextBox into place, and set its alignment to right and bottom), set the left margin to 5 and the other three to zero, and finally, set its with to 150 and its height to 25. </p>
<p>Next make four copies, and adjust their name and row for the next four data entry fields.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/TextBoxes_5F9B410C.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/TextBoxes_5F9B410C.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=TextBoxes border=0 alt=TextBoxes src="http://silverlight.net/blogs/jesseliberty/TextBoxes_thumb_3B09B388.jpg" width=304 height=182 mce_src="http://silverlight.net/blogs/jesseliberty/TextBoxes_thumb_3B09B388.jpg"/></a> </p>
<h4>Date Picker</h4>
<p>The sixth entry row, DateOfEntry) will get a DatePicker. To create one, click on the Chevron, which opens the advanced controls, and click on DatePicker,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/DatePicker_1E8CC1A8.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/DatePicker_1E8CC1A8.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=DatePicker border=0 alt=DatePicker src="http://silverlight.net/blogs/jesseliberty/DatePicker_thumb_59E02766.jpg" width=304 height=176 mce_src="http://silverlight.net/blogs/jesseliberty/DatePicker_thumb_59E02766.jpg"/></a> </p>
<p>This control has a lot of flexibility in its display; much of which can be set in the properties window,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/DatePickerProps_2B86A1B9.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/DatePickerProps_2B86A1B9.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=DatePickerProps border=0 alt=DatePickerProps src="http://silverlight.net/blogs/jesseliberty/DatePickerProps_thumb_5D120F4E.jpg" width=304 height=268 mce_src="http://silverlight.net/blogs/jesseliberty/DatePickerProps_thumb_5D120F4E.jpg"/></a> </p>
<p>For now, though, we’ll go with the defaults as shown.</p>
<h4>Radio Buttons, Check Boxes and Stack Panels</h4>
<p>The input for Level is three Radio Buttons. You can find a complete write up of using Radio Buttons here, but the key things to know are that you want all the Radio Buttons to share the same GroupName (so that they are mutually exclusive), you want one to have IsChecked clicked and, most important, you’ll want to put all the radio buttons into a stack panel. The stack panel will have its alignment set to stretch with no margins and its orientation set to horizontal. </p>
<p><a href="http://silverlight.net/blogs/jesseliberty/RadioButtons_0A932F12.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/RadioButtons_0A932F12.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=RadioButtons border=0 alt=RadioButtons src="http://silverlight.net/blogs/jesseliberty/RadioButtons_thumb_5C39A964.jpg" width=304 height=196 mce_src="http://silverlight.net/blogs/jesseliberty/RadioButtons_thumb_5C39A964.jpg"/></a> </p>
<p>Similarly the versions input is a pair of check boxes, and they too sit in a stack panel.</p>
<h4>ListBox and ListBoxItems</h4>
<p>Finally, the Tags are chosen from a ListBox (for now). To add the ListBox open the Chevron and drag the ListBox into place, and for now you can hardwire the choices by clicking on the Items collection and adding ListBoxItems.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/ItemsCollectionEditor_5BCD766F.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/ItemsCollectionEditor_5BCD766F.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=ItemsCollectionEditor border=0 alt=ItemsCollectionEditor src="http://silverlight.net/blogs/jesseliberty/ItemsCollectionEditor_thumb_3B4636BD.jpg" width=304 height=158 mce_src="http://silverlight.net/blogs/jesseliberty/ItemsCollectionEditor_thumb_3B4636BD.jpg"/></a> <br />(Click on the image to see a larger version)</p>
<p><strong>Save everything. </strong>Keep Blend open, but also open this same project in Visual Studio</p>
<p>Take a look at the markup&nbsp; in MainPage.xaml, you should find that the structure and syntax of Xaml is pretty easy to pick up when you compare the Xaml to the WYSIWYG design.&nbsp; </p>
<h4>Pretty Xaml</h4>
<p>I find it much easier to read the Xaml if each property is on a line by itself. To accomplish that, open Tools-&gt;Options and click on the arrow next to Text Editor. Then open up Xaml and Formatting and click on General to set the rule that formatting should be done when you paste from clipboard or complete a tag and click on Spacing to set the rule that each attribute should be on a line of its own; as shown in the following composite image:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/OptionsComposite_21DE3383.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/OptionsComposite_21DE3383.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=OptionsComposite border=0 alt=OptionsComposite src="http://silverlight.net/blogs/jesseliberty/OptionsComposite_thumb_1A52C416.jpg" width=304 height=280 mce_src="http://silverlight.net/blogs/jesseliberty/OptionsComposite_thumb_1A52C416.jpg"/></a> </p>
<p>The Xaml that is produced becomes easier to handle, though it takes up a lot more room, as shown in the following small excerpt:</p>
<div id=codeSnippetWrapper>
<div style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px" id=codeSnippet>
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum1>   1:</span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">TextBox</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Topic"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum2>   2:</span>          <span style="COLOR: #ff0000">Height</span><span style="COLOR: #0000ff">="25"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum3>   3:</span>          <span style="COLOR: #ff0000">HorizontalAlignment</span><span style="COLOR: #0000ff">="Left"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum4>   4:</span>          <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="5,0,0,0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum5>   5:</span>          <span style="COLOR: #ff0000">VerticalAlignment</span><span style="COLOR: #0000ff">="Bottom"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum6>   6:</span>          <span style="COLOR: #ff0000">Width</span><span style="COLOR: #0000ff">="150"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum7>   7:</span>          <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Column</span><span style="COLOR: #0000ff">="1"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum8>   8:</span>          <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Row</span><span style="COLOR: #0000ff">="7"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum9>   9:</span>          <span style="COLOR: #ff0000">TextWrapping</span><span style="COLOR: #0000ff">="Wrap"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum10>  10:</span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">ListBox</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Tags"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum11>  11:</span>          <span style="COLOR: #ff0000">HorizontalAlignment</span><span style="COLOR: #0000ff">="Left"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum12>  12:</span>          <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="8,0,0,0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum13>  13:</span>          <span style="COLOR: #ff0000">Width</span><span style="COLOR: #0000ff">="125"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum14>  14:</span>          <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Column</span><span style="COLOR: #0000ff">="1"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum15>  15:</span>          <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Row</span><span style="COLOR: #0000ff">="9"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum16>  16:</span>          <span style="COLOR: #ff0000">BorderThickness</span><span style="COLOR: #0000ff">="1,5"</span><span style="COLOR: #0000ff">&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum17>  17:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">ListBoxItem</span>  <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Silverlight"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum18>  18:</span>                   <span style="COLOR: #ff0000">VerticalAlignment</span><span style="COLOR: #0000ff">="Bottom"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum19>  19:</span>                   <span style="COLOR: #ff0000">FontFamily</span><span style="COLOR: #0000ff">="Georgia"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum20>  20:</span>                   <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="Silverlight"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum21>  21:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">ListBoxItem</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Expression"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum22>  22:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="Expression"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum23>  23:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">ListBoxItem</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="VisualStudio"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum24>  24:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="Visual Studio"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum25>  25:</span>                  <span style="COLOR: #ff0000">IsSelected</span><span style="COLOR: #0000ff">="True"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum26>  26:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">ListBoxItem</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Blogs"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum27>  27:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="Blogs"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum28>  28:</span> <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">ListBox</span><span style="COLOR: #0000ff">&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum29>  29:</span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">StackPanel</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="ButtonsStack"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum30>  30:</span>             <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum31>  31:</span>             <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Column</span><span style="COLOR: #0000ff">="1"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum32>  32:</span>             <span style="COLOR: #ff0000">Grid</span>.<span style="COLOR: #ff0000">Row</span><span style="COLOR: #0000ff">="8"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum33>  33:</span>             <span style="COLOR: #ff0000">Orientation</span><span style="COLOR: #0000ff">="Horizontal"</span><span style="COLOR: #0000ff">&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum34>  34:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RadioButton</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Level100"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum35>  35:</span>                  <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="5,0,0,0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum36>  36:</span>                  <span style="COLOR: #ff0000">VerticalAlignment</span><span style="COLOR: #0000ff">="Bottom"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum37>  37:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="100"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum38>  38:</span>                  <span style="COLOR: #ff0000">GroupName</span><span style="COLOR: #0000ff">="Levels"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum39>  39:</span>                  <span style="COLOR: #ff0000">HorizontalAlignment</span><span style="COLOR: #0000ff">="Left"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum40>  40:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RadioButton</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Level300"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum41>  41:</span>                  <span style="COLOR: #ff0000">Height</span><span style="COLOR: #0000ff">="17"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum42>  42:</span>                  <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="5,0,0,0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum43>  43:</span>                  <span style="COLOR: #ff0000">Width</span><span style="COLOR: #0000ff">="40"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum44>  44:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="300"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum45>  45:</span>                  <span style="COLOR: #ff0000">d:LayoutOverrides</span><span style="COLOR: #0000ff">="Height"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum46>  46:</span>                  <span style="COLOR: #ff0000">HorizontalAlignment</span><span style="COLOR: #0000ff">="Left"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum47>  47:</span>                  <span style="COLOR: #ff0000">VerticalAlignment</span><span style="COLOR: #0000ff">="Bottom"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum48>  48:</span>                  <span style="COLOR: #ff0000">IsChecked</span><span style="COLOR: #0000ff">="True"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum49>  49:</span>                  <span style="COLOR: #ff0000">GroupName</span><span style="COLOR: #0000ff">="Levels"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum50>  50:</span>     <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">RadioButton</span> <span style="COLOR: #ff0000">x:Name</span><span style="COLOR: #0000ff">="Level400"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum51>  51:</span>                  <span style="COLOR: #ff0000">Height</span><span style="COLOR: #0000ff">="17"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum52>  52:</span>                  <span style="COLOR: #ff0000">HorizontalAlignment</span><span style="COLOR: #0000ff">="Left"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum53>  53:</span>                  <span style="COLOR: #ff0000">Margin</span><span style="COLOR: #0000ff">="5,0,0,0"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum54>  54:</span>                  <span style="COLOR: #ff0000">VerticalAlignment</span><span style="COLOR: #0000ff">="Bottom"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum55>  55:</span>                  <span style="COLOR: #ff0000">Width</span><span style="COLOR: #0000ff">="40"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum56>  56:</span>                  <span style="COLOR: #ff0000">Content</span><span style="COLOR: #0000ff">="400"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum57>  57:</span>                  <span style="COLOR: #ff0000">d:LayoutOverrides</span><span style="COLOR: #0000ff">="Height"</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum58>  58:</span>                  <span style="COLOR: #ff0000">GroupName</span><span style="COLOR: #0000ff">="Levels"</span> <span style="COLOR: #0000ff">/&gt;</span></pre>
<p><!--CRLF-->
<pre style="BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: left; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: white; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; FONT-FAMILY: 'Courier New', courier, monospace; DIRECTION: ltr; BORDER-TOP-STYLE: none; COLOR: black; FONT-SIZE: 8pt; BORDER-LEFT-STYLE: none; OVERFLOW: visible; PADDING-TOP: 0px"><span style="COLOR: #606060" id=lnum59>  59:</span> <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">StackPanel</span><span style="COLOR: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>Your form is ready to go. Click Control-F5 to test it.</p>
<p mce_keep="true">&nbsp;</p>
<table border=0 cellSpacing=2 cellPadding=2>
<tbody>
<tr>
<td width=100><strong>Novice</strong></td>
<td width=150>Previous: &nbsp;Data Entry</td>
<td width=150>Next&nbsp;Data</td>
</tr>
<tr>
<td width=100><strong>Advanced</strong></td>
<td width=150>Previous:&nbsp;Two Levels </td>
<td width=150>Next:&nbsp;Data</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/08/04/creating-a-form-%e2%80%93-level-100/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animated Visual State Transitions with the Transitioning Content Control</title>
		<link>http://jesseliberty.com/2009/04/29/animated-visual-state-transitions-with-the-transitioning-content-control/</link>
		<comments>http://jesseliberty.com/2009/04/29/animated-visual-state-transitions-with-the-transitioning-content-control/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:16:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[VSM]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[&#160; The Silverlight Toolkit is innovative in many ways, not least of which is that controls are released in one of four quality bands: Mature: ready for release Stable: suitable for most scenarios Preview: suitable for most basic usage scenarios, &#8230; <a href="http://jesseliberty.com/2009/04/29/animated-visual-state-transitions-with-the-transitioning-content-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<style type=text/css>
div.live { border : blue solid medium; width:400; height:150 }
</style>
<p><a href="http://silverlight.net/blogs/jesseliberty/1Files1/minitutorial.jpg"><img border=0 src="http://silverlight.net/blogs/jesseliberty/1Files1/minitutorial.jpg"/></a>&nbsp;</p>
<p>The Silverlight Toolkit is innovative in many ways, not least of which is that controls are released in one of four <em>quality bands</em>:</p>
<ul>
<li><strong>Mature</strong>: ready for release </li>
<li><strong>Stable</strong>: suitable for most scenarios </li>
<li><strong>Preview</strong>: suitable for most basic usage scenarios, may have moderate number of breaking changes as the control is developed. </li>
<li><strong>Experimental</strong>: intended for evaluation purposes<strong></strong> </li>
</ul>
<p>The control I’ll be considering today was developed (and described <a href="http://www.sitechno.com/blog/" target=_blank mce_href="http://www.sitechno.com/blog/">here</a>) by Ruurd Boeke and is currently in the Experimental band. You can expect that the API will change quite a bit, but that said, it is an enormously useful control right now; and thus I’ve submitted a video and this write-up. </p>
<h3>What’s It For?</h3>
<p>The goal of the Transitioning Content control is to make it easy to add animation when you are changing content within a control as demonstrated <a href="http://silverlight.net/samples/sl3/toolkitcontrolsamples/run/default.html" target=_blank mce_href="http://silverlight.net/samples/sl3/toolkitcontrolsamples/run/default.html">here</a>.&nbsp;[You’ll need to click on <strong>DomainUpDown</strong> on the left (and surprisingly, <em>not</em> on TransitioningContent!) and <strong>Animations</strong> on top. The following cropped image illustrates where to click, but provides only a shadow of the impact</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/DemoTransition_24EA0E5B.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/DemoTransition_24EA0E5B.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; WIDTH: 401px; DISPLAY: inline; HEIGHT: 225px; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=DemoTransition border=0 alt=DemoTransition src="http://silverlight.net/blogs/jesseliberty/DemoTransition_thumb_163F6276.jpg" width=495 height=367 mce_src="http://silverlight.net/blogs/jesseliberty/DemoTransition_thumb_163F6276.jpg"/></a> </p>
<h3>Getting There In 3 Steps</h3>
<p>To make this crystal clear, and to show how easy it really is to use this control, we’ll build the example three times: first with a Content Control, then with a Transitioning Content Control, and finally, adding data binding and the ability to transition more complex objects.</p>
<h3>Starting Simple</h3>
<p>Version 0 begins with a grid with two columns. The left column contains a ContentControl and the right a button. Here is the complete Xaml:</p>
<pre>&lt;UserControl x:Class="tccDemo.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Width="300" Height="150"&gt;  &lt;StackPanel Background="Bisque"&gt;

   <font color=#0000ff> &lt;ContentControl x:Name="cc1"         Content="Click button to change."         HorizontalAlignment="Center"         Margin="20"         FontSize="18" /&gt;

    &lt;Button x:Name="doChange"            Content="Change"            Width="80"            Height="30"            HorizontalAlignment="Center"            FontSize="14"/&gt;</font>    &lt;/StackPanel&gt;&lt;/UserControl&gt;</pre>
<p>The job of the ContentControl is to hold a single piece of content: in this case a string. The button’s job is to cause that content to change, which we do programmatically in the button’s click event handler in MasterPage.xaml.cs, shown in full:</p>
<pre>using System;using System.Windows;using System.Windows.Controls;

namespace tccDemo{  public partial class MainPage : UserControl  {    public MainPage()    {      InitializeComponent();      doChange.Click += new RoutedEventHandler( doChange_Click );    }

<font color=#0000ff>    void doChange_Click( object sender, RoutedEventArgs e )    {      Random random = new Random();      cc1.Content = random.NextDouble().ToString();    }</font>  }  // end class}    // end namespace</pre>
<p>Each time the button is clicked, a new value is displayed.</p>
<p><!--</p>
<p>[ Demo here – visible only if you are running Silverlight 3 ]</p>
<div class=live><iframe style="WIDTH: 270px; HEIGHT: 120px" src="http://silverlight.services.live.com/invoke/20712/TransitioningDemo0/iframe.html" frameBorder=0 scrolling=no mce_src="http://silverlight.services.live.com/invoke/20712/TransitioningDemo0/iframe.html"></iframe></div>
<h3>Changing from Content to TransitioningContent</h3>
<p>The TransitioningContent control is, essentially, a skinnable custom control that derives from content control. </p>
<p>&#8211;></p>
<p>For more on Skinnable Custom Controls, see the blog series that starts here, or consider these videos (click on the image to go to the video): </p>
<table border=0 cellSpacing=0 cellPadding=1 width=455>
<tbody>
<tr>
<td vAlign=top width=226><a href="http://silverlight.net/learn/learnvideo.aspx?video=116200" target=_blank mce_href="http://silverlight.net/learn/learnvideo.aspx?video=116200"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SkinnableCustomControlsPart1a border=0 alt=SkinnableCustomControlsPart1a src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart1a_23A5757C.jpg" width=189 height=176 mce_src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart1a_23A5757C.jpg"/></a></td>
<td vAlign=top width=225><a href="http://silverlight.net/learn/learnvideo.aspx?video=141967" target=_blank mce_href="http://silverlight.net/learn/learnvideo.aspx?video=141967"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SkinnableCustomControlsPart2a border=0 alt=SkinnableCustomControlsPart2a src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart2a_5C501F89.jpg" width=182 height=178 mce_src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart2a_5C501F89.jpg"/></a></td>
</tr>
<tr>
<td vAlign=top width=226><a href="http://silverlight.net/learn/learnvideo.aspx?video=149875" target=_blank mce_href="http://silverlight.net/learn/learnvideo.aspx?video=149875"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SkinnableCustomControlsPart3 border=0 alt=SkinnableCustomControlsPart3 src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart3_42E81C4F.jpg" width=179 height=178 mce_src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart3_42E81C4F.jpg"/></a></td>
<td vAlign=top width=225><a href="http://silverlight.net/learn/learnvideo.aspx?video=149876" target=_blank mce_href="http://silverlight.net/learn/learnvideo.aspx?video=149876"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=SkinnableCustomControlsPart4 border=0 alt=SkinnableCustomControlsPart4 src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart4_427BE95A.jpg" width=178 height=178 mce_src="http://silverlight.net/blogs/jesseliberty/SkinnableCustomControlsPart4_427BE95A.jpg"/></a></td>
</tr>
</tbody>
</table>
<p>Before we dive into the TransitioiningContent control and how it does its work, let’s look at how to use it. We start by replacing the ContentControl with a TransitioningContentControl, but to do this we need to add a reference to <em>System.Windows.Controls.Layout.Toolkit</em> in the references and a namespace to the top of the Xaml file</p>
<pre>xmlns:layout="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"</pre>
<p>With that in place we can modify MainPage.xaml to replace the ContentControl with the TransitioningContentControl and replace the Change button with two buttons: one for Up and one for down. Here is the complete Xaml:</p>
<pre>&lt;UserControl x:Class="tccDemo.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:layout="clr-namespace:System.Windows.Controls;      assembly=System.Windows.Controls.Layout.Toolkit"    Width="400" Height="200"&gt;  &lt;StackPanel Background="Bisque"&gt;    &lt;<font color=#0000ff>layout:TransitioningContentControl   x:Name="tcc"</font>             HorizontalAlignment="Center"            Margin="30"            FontSize="18"            Content="Click buttons to change content" /&gt;

    &lt;Button x:Name="UpButton"            Content="Up"            Width="100"            Height="30"            Margin="10"            FontSize="14"/&gt;    &lt;Button x:Name="DownButton"            Content="Down"            Width="100"            Height="30"            Margin="10"            FontSize="14"/&gt;  &lt;/StackPanel&gt;&lt;/UserControl&gt;</pre>
<p>The code is modified only to set the Transition property of the TransitioningContentControl.&nbsp; Here is the complete code behind file:</p>
<pre>using System;using System.Windows;using System.Windows.Controls;

namespace tccDemo{  public partial class MainPage : UserControl  {    public MainPage()    {      InitializeComponent();      UpButton.Click += new RoutedEventHandler( UpButton_Click );      DownButton.Click += new RoutedEventHandler( DownButton_Click );    }

    void DownButton_Click( object sender, RoutedEventArgs e )    {      tcc.Transition = "DownTransition";      Random random = new Random();      tcc.Content = random.NextDouble().ToString();    }

    void UpButton_Click( object sender, RoutedEventArgs e )    {      tcc.Transition = "UpTransition";      Random random = new Random();      tcc.Content = random.NextDouble().ToString();    }

  }}</pre>
<p>Here is the effect:</p>
<p><!--</p>
<div class=Live><iframe style="WIDTH: 400px; HEIGHT: 200px" src="http://silverlight.services.live.com/invoke/20712/Transitioning%20Content%20Control%20Demo%20Part%201/iframe.html" frameBorder=0 scrolling=no mce_src="http://silverlight.services.live.com/invoke/20712/Transitioning%20Content%20Control%20Demo%20Part%201/iframe.html"></iframe><br />
&#8211;></p>
<h3>Adding DataBinding and Objects</h3>
<p>In both of the examples so far, the content has been a simple string. It is possible, however, to provide a more complex object, by modifying the TransitioningContentControl and using an explicit ContentTemplate. </p>
<pre>&lt;layout:TransitioningContentControl                x:Name="tcc"             Margin="20"             FontSize="18"             HorizontalAlignment="Center"             Content="Use buttons..."&gt;  &lt;layout:TransitioningContentControl.ContentTemplate&gt;    &lt;DataTemplate&gt;      &lt;StackPanel &gt;        &lt;TextBlock Text="{Binding Title }"              FontFamily="Georgia"              FontSize="14" /&gt;        &lt;TextBlock Text="{Binding Author }"              FontFamily="Georgia"              FontSize="14" /&gt;      &lt;/StackPanel&gt;    &lt;/DataTemplate&gt;  &lt;/layout:TransitioningContentControl.ContentTemplate&gt;&lt;/layout:TransitioningContentControl&gt;</pre>
<p>This follows all the normal conventions of using a ContentTemplate. We fill it with a DataTemplate which holds a StackPanel, allowing us to place two TextBlocks, both of which use binding syntax to indicate that they are going to bind to the Title and Author properties of whatever object they are given, respectively.</p>
<p>The rest of the Xaml file is unchanged. </p>
<p>We need a data object, and so we create as simple a data object as possible to illustrate this idea; noting that of course you can get your data from a database, from an XML file, etc.&nbsp; Here is the complete contents of Book.cs including the static property we’ll use to obtain some pre-created data,</p>
<pre>using System.Collections.Generic;

namespace tccDemo{  public class Book  {    public string Title { get; set; }    public string Author { get; set; }

    public static  List&lt;Book&gt; Books    {      get      {        List&lt;Book&gt; theBooks = new List&lt;Book&gt;();        theBooks.Add( new Book()              { Title = "The Raw Shark Texts", Author = "Steven Hall" } );        theBooks.Add( new Book()              { Title = "Columbine", Author = "Dave Cullen" } );        theBooks.Add( new Book()              { Title = "Unfriendly Fire", Author = "Dr. Nathaniel Frank" } );        theBooks.Add( new Book()              { Title = "The Inheritance", Author = "Dave Sanger" } );        theBooks.Add( new Book()              { Title = "Sir Gawain and the Green Knight",                  Author = "Simon Armitage" } );        theBooks.Add( new Book()               { Title = "The Superorganism", Author = "Holldobler and Wilson" } );        return theBooks;      }    }  }}</pre>
<p mce_keep="true">&nbsp;</p>
<p>MainPage.xaml.cs is modified somewhat more significantly, to hold a membervariable of type List&lt;Book&gt; (thus avoiding having to “get” the data repeatedly) and a counter as a convenience so that we can cycle through our somewhat meager collection.&nbsp; Here is the complete MainPage.xaml.cs</p>
<pre>using System.Collections.Generic;using System.Windows;using System.Windows.Controls;

namespace tccDemo{  public partial class MainPage : UserControl  {

    private List&lt;Book&gt; books = Book.Books;    private int counter = 0;

    public MainPage()    {      InitializeComponent();      tcc.Transition = "Normal";      tcc.Content = books[counter++];      UpButton.Click += new RoutedEventHandler( UpButton_Click );      DownButton.Click += new RoutedEventHandler( DownButton_Click );    }

    void UpButton_Click( object sender, RoutedEventArgs e )    {      tcc.Transition = "UpTransition";      tcc.Content = GetBook();    }

    void DownButton_Click( object sender, RoutedEventArgs e )    {      tcc.Transition = "DownTransition";      tcc.Content = GetBook();    }

    public Book GetBook()    {      if ( ++counter &gt;= books.Count )        counter = 0;      return books[counter];    }  }}</pre>
<p>The constructor sets the initial visual state to Normal and sets the content of the TransitioningContentControl to the first book in the collection. It then sets up the two event handlers. The job of each is to set the Transition state and then call the helper method that gets the next book in the collection. <!--<br />
Here it is in action:</p>
<div class=Live><iframe style="WIDTH: 400px; HEIGHT: 200px" src="http://silverlight.services.live.com/invoke/20712/Transitioning%20Content%20Control%20Demo%20Part%202/iframe.html" frameBorder=0 scrolling=no mce_src="http://silverlight.services.live.com/invoke/20712/Transitioning%20Content%20Control%20Demo%20Part%202/iframe.html"></iframe></div>
<p>&#8211;></p>
<h2>Visual State Ambivalence</h2>
</p>
<p>The TransitioningContent is a bit ambivalent about its visual states. There are four states that are hardwired into the control as it is currently written:</p>
<ul>
<li>Default </li>
<li>Normal </li>
<li>UpTransition </li>
<li>DownTransition </li>
</ul>
<p>However, if you examine the attributes at the top of the class (used to signal, for example, both the Visual State Manager and tools like Blend what visual states the class supports) you’ll find this:</p>
<pre><font color=#0000ff>[TemplateVisualState(GroupName = PresentationGroup,                      Name = NormalState)][TemplateVisualState(GroupName = PresentationGroup,                      Name = DefaultTransitionState)]</font>[TemplatePart(Name = PreviousContentPresentationSitePartName,               Type = typeof(ContentControl))][TemplatePart(Name = CurrentContentPresentationSitePartName,               Type = typeof(ContentControl))]public class TransitioningContentControl : ContentControl</pre>
<p>There are precisely two visual states made visible to Blend and the VSM.&nbsp; The net effect is that you can certainly use the UpTransition and DownTransition, but they were added as examples of how you can freely extend this class with any transitions you like.</p>
<p>Here’s how it works. The TransitioningContentControl consists of two parts both of type ContentControl: <strong>Previous</strong>ContentPresentationSitePartName and <strong>Current</strong>ContentPresentationSitePartName.&nbsp; </p>
<p>To add an animated transition from content A to content B you need only hand the two to this control and tell it, by passing in a string, what storyboard to invoke.&nbsp; If you pass in the string TransitionUp or TransitionDown then it already knows what storyboard to invoke, as Ruurd Boeke wrote those and put them in the Resources section of TransitioningContentControl.xaml.&nbsp; Here, for example, is his UpTransition:</p>
<pre>&lt;vsm:VisualState x:Name="<font color=#0000ff>UpTransition</font>"&gt;  &lt;Storyboard&gt;    &lt;DoubleAnimationUsingKeyFrames         BeginTime="00:00:00"         Storyboard.TargetName="<font color=#0000ff>CurrentContentPresentationSite</font>"         Storyboard.<font color=#0000ff>TargetProperty="(UIElement.Opacity)</font>"&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="1"/&gt;    &lt;/DoubleAnimationUsingKeyFrames&gt;

    &lt;DoubleAnimationUsingKeyFrames         BeginTime="00:00:00"         Storyboard.TargetName="CurrentContentPresentationSite"         Storyboard.TargetProperty="(UIElement.RenderTransform).           (TransformGroup.Children)[3].(<font color=#0000ff>TranslateTransform.Y</font>)"&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="<font color=#0000ff>30</font>"/&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="<font color=#0000ff>0</font>"/&gt;    &lt;/DoubleAnimationUsingKeyFrames&gt;

    &lt;DoubleAnimationUsingKeyFrames         BeginTime="00:00:00"         Storyboard.TargetName="<font color=#0000ff>PreviousContentPresentationSite</font>"         Storyboard.<font color=#0000ff>TargetProperty="(UIElement.Opacity)</font>"&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="0"/&gt;    &lt;/DoubleAnimationUsingKeyFrames&gt;

    &lt;DoubleAnimationUsingKeyFrames         BeginTime="00:00:00"         Storyboard.TargetName="PreviousContentPresentationSite"         Storyboard.TargetProperty="(UIElement.RenderTransform).           (TransformGroup.Children)[3].(<font color=#0000ff>TranslateTransform.Y</font>)"&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/&gt;      &lt;SplineDoubleKeyFrame KeyTime="00:00:00.300" Value="<font color=#0000ff>-30</font>"/&gt;    &lt;/DoubleAnimationUsingKeyFrames&gt;  &lt;/Storyboard&gt;&lt;/vsm:VisualState&gt;</pre>
<p>The effect of this is to target first the opacity of the current content, which will go from 0 to 1 over 3/10 of a second. During that same time period it will move up the Y axis from 30 to 0 (remember that the Y axis counts up as it moves down the screen).&nbsp; In the second half of the animation the targetproperty is the opacity of the <em>previous</em> content which fades away from 1 to 0 over that same 3/10 of a second, while the content itself moves up from 0 to –30. </p>
<p>Notice that the storyboard is within the VisualState whose name is UpTransition. </p>
<p>The class itself has a public property named Transition:</p>
<pre>/// &lt;summary&gt;/// Gets or sets the name of the transition to use. /// These correspond directly to the VisualStates inside/// the PresentationStates group./// &lt;/summary&gt;public string Transition{    get { return GetValue(TransitionProperty) as string; }    set { SetValue(TransitionProperty, value); }}</pre>
<p>This acts as a front for the Dependency Property which is registered immediately below</p>
<pre>public static readonly DependencyProperty TransitionProperty =    DependencyProperty.Register(        "Transition",        typeof(string),        typeof(TransitioningContentControl),        new PropertyMetadata(OnTransitionPropertyChanged));</pre>
<p>A quick review of the Silverlight documentation reveals the meaning of each of the four parameters:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/DPRegister_4D3940AF.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/DPRegister_4D3940AF.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=DPRegister border=0 alt=DPRegister src="http://silverlight.net/blogs/jesseliberty/DPRegister_thumb_45ADD142.jpg" width=500 height=436 mce_src="http://silverlight.net/blogs/jesseliberty/DPRegister_thumb_45ADD142.jpg"/></a> </p>
<p>Notice that the type of the TransitionProperty is <strong>string</strong>, and parenthetically, notice that the final parameter, typeMetadata,&nbsp; is explicitly noted for usage with a PropertyChangedCallback, which is what is done here. </p>
<p><strong>OnTransitionPropertyChanged </strong>is overloaded in the implementation, but the net effect is to set the source of the content control and to set the string representing the new transition and then to call <strong>ChangeTransition</strong> whose job is to make sure it is safe to set a new transition, and then to obtain the PresentationState Visual State group and then to look to see if there is a state for the string passed in. If so, that transition is set as the new value for the transition. </p>
<p>Thus, with this somewhat unusual control,&nbsp; you can modify the visual states within the PresentationGroup) without subclassing, and by doing so (and providing a storyboard) you can add any transition you like, which you can then invoke by passing in its name!</p>
<p><strong>Caveat! </strong>As noted earlier, this control is in the experimental band, and this API is very likely to change.</p>
<p>I hope you found this bit of control spelunking as interesting as I did sorting it out; and it is just fine to set all of the details aside and just use the control in conjunction with other controls to create animated transitions without over-worrying about how it is doing its magic.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/04/29/animated-visual-state-transitions-with-the-transitioning-content-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The State of the ViKi</title>
		<link>http://jesseliberty.com/2009/04/16/the-state-of-the-viki/</link>
		<comments>http://jesseliberty.com/2009/04/16/the-state-of-the-viki/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 15:37:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In my previous posting about the VideoWiki project I mentioned that I fell off the edge of the world when I tried to replicate the work I had done previously with the player emitted by Encoder.&#160; I’m told by the &#8230; <a href="http://jesseliberty.com/2009/04/16/the-state-of-the-viki/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p mce_keep="true">In my previous posting about the VideoWiki project I mentioned that I fell off the edge of the world when I tried to replicate the work I had done previously with the player emitted by Encoder.&nbsp; I’m told by the team that this is very much a work in progress, so I don’t want to get bogged down in the details, but let’s take a look at some of the issues that came up and where the code sits today.</p>
<p>The version of Expression Encoder that I used (version 2 service pack 1, version 2.1.1216.0) created the Template solution which in turn contained four projects</p>
<p>Microsoft Visual Studio Solution File, Format Version 10.00 <br /># Visual Studio 2008 <br />Project(&#8220;{&lt;GUID&gt;}&#8221;) = &#8220;Template&#8221;, &#8220;Template.csproj&#8221;, &#8220;{&lt;GUID&gt;}&#8221; <br />EndProject <br />Project(&#8220;{&lt;GUID&gt;}&#8221;) = &#8220;MediaPlayer&#8221;, &#8220;MediaPlayer\MediaPlayer.csproj&#8221;, &#8220;{&lt;GUID&gt;}&#8221; <br />EndProject <br />Project(&#8220;{&lt;GUID&gt;}&#8221;) = &#8220;AdaptiveStreaming&#8221;, &#8220;AdaptiveStreaming\AdaptiveStreaming.csproj&#8221;, &#8220;{&lt;GUID&gt;}&#8221; <br />EndProject <br />Project(&#8220;{&lt;GUID&gt;}&#8221;) = &#8220;ExpressionPlayer&#8221;, &#8220;ExpressionPlayer\ExpressionPlayer.csproj&#8221;, &#8220;{&lt;GUID&gt;}&#8221; <br />EndProject</p>
<p>Our working project on the other hand, is, for now,&nbsp; a single project solution named Viki-Start) consisting of MainPage.xaml/.cs, App.xaml/.cs and a Views directory with the default three pair of files: AboutPage.xml/.cs, ErrorWindow.xaml/.cs and HomePage.xaml/.cs as well as the usual Properties, Resources, Bin, etc. folders.</p>
<p>Having templated ExpressionPlayer in Blend, we copy ExpressionPlayer.dll, MediaPlayer.dll and AdaptiveStreaming.dll into the bin/debug folder of Viki-Start and add them to the references of the project and we update App.xaml in Viki-start with the template that we created in blend (that is, in Template/App.xaml) being careful about namespaces.</p>
<h3>What You Think You Did and What You Really Did</h3>
<p>Twenty years ago I learned a good bit of close up magic. What I really liked about it was showing a trick and then listening to the person I showed it to describe what I did to someone else. What they saw was not what I did.&nbsp; For the past three days, I’ve been insisting to everyone, including myself, that in all the previous videos and tutorials, it worked perfectly fine to call MediaPlayer from within my project but now it changed with Silverlight 3. <strong><em>Wrong!&nbsp; </em></strong>Going back to find the original code so that I could point out the differences, there are none. Looking at the tutorial and the videos closely, I always launched the project from the html file – which worked then and works now; it is just that now I no longer want to do that; I want to launch from within the program. </p>
<p>What changed was not the ExchangePlayer (well, actually, it did change, but not in a way that affects this discussion) but my requirements.&nbsp; This is a lesson I have to keep learning: synchronicity is the bane of debugging. It is the error of post-hoc ergo prompter hoc (just because it broke after I moved to Silverlight 3 doesn’t mean the failure had anything to do with moving to Silverlight 3.). </p>
<h3>My Current Hack</h3>
<p>Sometimes, even if you know you will eventually throw it away, it is worth getting the code to work; if only to understand it in pieces. Here is how I got my code to work.&nbsp; When you ask encoder to create your starter application (which you’ll remember we then templated in Blend) it emits an entire project as shown above (Template.sln).&nbsp; The two files we most care about are <strong>ExpressionPlayerControl.cs</strong> and <strong>MediaPlayer.cs</strong>.</p>
<p>ExpressionPlayerControl is the control that we are actually templating.&nbsp; Its job is to display our media clip and raise an event when our markers are hit and it does so by inheriting from MediaPlayer and by creating a custom media stream source for adaptive streaming.&nbsp; In fact, the point of ExpressionPlayerControl is to extend the MediaPlayer to fully support Adaptive Streaming.</p>
<h3>OnStartup</h3>
<p>The idiom for feeding the source videos to a MediaPlayer (or an ExpressionPlayer) is to call OnStartup passing in the event arguments obtained from the html page that invoked the program.&nbsp; Assumptions are made. For example, the initial URI is created by obtaining the URI of the html page. </p>
<pre>Uri uriStockContent = HtmlPage.Document.DocumentUri;</pre>
<p>That value is then modified if there is a play list (which in my case there always was) in this section</p>
<pre>if (e.InitParams.TryGetValue("playlist", out strInitValue)){    try    {        Playlist.Clear();        Playlist.ParseXml(HtmlPage.Document.DocumentUri, strInitValue);    }</pre>
<p>and we’re off to the races.&nbsp; The supporting code for PlayList is defined in the PlayListCollection class of MediaPLayer and PlayList itself is a dependency property defined to be of type PlayListCollection.</p>
<p><strong>A key assumption built into MediaPlayer is that ParseXml expects a document to serve as the source URI of the media items – that is, the physical location of the document must be the same as the physical location of the videos. </strong></p>
<p><strong></strong>&nbsp;</p>
<h3>When Is A MediaPlayer Not A MediaPlayer?</h3>
<p>If you look&nbsp; up ParseXml in the Silverlight documentation for MediaPlayer you won’t find it. That is because the MediaPlayer that is listed in the documentation is not a Silverlight control, it is, rather, a player to run media <em>using Silveright in an ASP.NET Web Page</em> and is not the MediaPlayer emitted by Encoder.&nbsp; Same name, different beast.&nbsp; </p>
<h3>My Temporary WorkAround</h3>
<p>To get the application up and running for now, I overloaded OnStartup in ExpressionPlayer and in MediaPlayer and then copied the modified DLLs (along with the unmodified DLL for AdaptiveStreaming) into Viki-Start.</p>
<pre>  // ExpressionPlayer  public void OnStartup() {    base.OnStartup();    Uri whereAmI = HtmlPage.Document.DocumentUri;    string pathAsString = whereAmI.ToString();    int offset = pathAsString.IndexOf( "TestPage.html" );    string stub = pathAsString.Substring( 0, offset );    Playlist.Clear();    PlaylistItem pli = new PlaylistItem();    pli.MediaUrl = new Uri( stub + "/encoded.wmv" );    pli.IsAdaptiveStreaming = false;    pli.ThumbSource = stub + "/test.jpg";    pli.Title = "Encoded Video";    pli.Description = "Hardcoded Hypervideo";    Playlist.Add( pli ); }</pre>
<pre>// MediaPlayerpublic virtual void OnStartup(){   Playlist.Clear();   m_autoPlayCache = true;   m_autoLoadCache = true;   m_mutedCache = false;   m_stretchMode = Stretch.None;   UserBackgroundColor = new SolidColorBrush( ColorFromString( "#FF0000FF" ) );   DisplayTimeCode = false;   CaptionsVisibility = Visibility.Collapsed;}
</pre>
<pre>&nbsp;</pre>
<p>Not beautiful, but sufficient to keep the project moving.</p>
<pre>     <strong>Previous</strong>  <a class="" href="http://silverlight.net/blogs/jesseliberty/archive/2009/04/14/viki-version-0-0-01.aspx" target=_blank mce_href="http://silverlight.net/blogs/jesseliberty/archive/2009/04/14/viki-version-0-0-01.aspx">ViKi Version 0.0.01</a>&nbsp;</pre>
<p><strong></strong>&nbsp;</p>
<p><strong></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/04/16/the-state-of-the-viki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help! The Silverlight Toolkit Ate My PC!</title>
		<link>http://jesseliberty.com/2009/02/11/help-the-silverlight-toolkit-ate-my-pc/</link>
		<comments>http://jesseliberty.com/2009/02/11/help-the-silverlight-toolkit-ate-my-pc/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 00:48:04 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Dear Jesse, &#34;I loaded the Silverlight Toolkit from December 1988 on my CPM machine and it broke my Apple IIe in my vacation home in Maine. What should I do?&#34; – Toolkit Lover. Dear Toolkit Lover, We have a dedicated &#8230; <a href="http://jesseliberty.com/2009/02/11/help-the-silverlight-toolkit-ate-my-pc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table cellspacing="0" cellpadding="5" width="400" border="2">
<tbody>
<tr>
<td valign="top" width="400">
<p>Dear Jesse,</p>
<p><em>&quot;I loaded the Silverlight Toolkit from December 1988 on my CPM machine and it broke my Apple IIe in my vacation home in Maine. What should I do?&quot; – Toolkit Lover.</em></p>
</td>
</tr>
</tbody>
</table>
<p><em></em></p>
<p>Dear Toolkit Lover,</p>
<p>We have a <a href="http://silverlight.net/forums/35.aspx">dedicated forum</a> for posting questions about the Silverlight Toolkit where you will be able to get very fast answers. The forum is watched by the Toolkit team as well as many community experts. </p>
<p>To get there, please click <a href="http://silverlight.net/forums/35.aspx">here</a> or enter <a href="http://silverlight.net/forums/35.aspx">http://silverlight.net/forums/35.aspx</a> in your browser.&#160; You can also reach the forum through the <a href="http://www.codeplex.com/Silverlight" target="_blank">Toolkit page</a> on Codeplex). </p>
<p>To get the best results, please be sure your message includes:</p>
<ul>
<li>Your operating system and service packs that are installed</li>
<li>How much memory you have installed</li>
<li>Which version of <a href="http://www.microsoft.com/visualstudio/en-us/default.mspx">Visual Studio</a> you are using and which service packs</li>
<li>Which version of <a href="http://silverlight.net/GetStarted/">Silverlight</a>&#160; you have installed</li>
<li>Which version of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&amp;displaylang=en">Silverlight Tools for Visual Studio</a> you have installed</li>
<li>Which version of the <a href="http://www.codeplex.com/Silverlight">Silverlight Toolkit</a> you have installed</li>
<li>What steps can reproduce the problem</li>
</ul>
<p><strong>Note that screen captures can be <i>very </i>helpful:</strong></p>
<p><a href="http://silverlight.net/blogs/jesseliberty/SilverlightVer_3A6866CB.jpg"><strong><img title="SilverlightVer" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="118" alt="SilverlightVer" src="http://silverlight.net/blogs/jesseliberty/SilverlightVer_thumb_2ED2A98C.jpg" width="443" border="0" /></strong></a>    <br />To get to this image, navigate to any Silverlight application and right click. You will see a small box that says &quot;Silverlight Configuration.&quot; Left click on that box and a tabbed dialog box will open with this information on the About tab.</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/SystemInfo_677D5399.jpg"><img title="SystemInfo" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="281" alt="SystemInfo" src="http://silverlight.net/blogs/jesseliberty/SystemInfo_thumb_14FE735D.jpg" width="451" border="0" /></a> </p>
<p>To get this information from Vista, Click on Start –&gt; Control Panel –&gt; Welcome Center and then in the upper right hand corner: Show More Details. </p>
<p><a href="http://silverlight.net/blogs/jesseliberty/ToolKitControlVer_2D8E10AD.jpg"><img title="ToolKitControlVer" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="305" alt="ToolKitControlVer" src="http://silverlight.net/blogs/jesseliberty/ToolKitControlVer_thumb_2D21DDB8.jpg" width="466" border="0" /></a> </p>
<p>To get to this information about the Toolkit dll&#8217;s, open a Silverlight application, click on references and navigate to wherever you installed the Toolkit. Hover over the appropriate Silvelight Toolkit DLL (in the illustration above I hovered over the Controls.DLL file) to see the File version adn Date Created. </p>
<p>&#160;</p>
<p><strong>The Subject Line Is Critical</strong></p>
<p>One great tip on getting help is to make sure the subject of your message summarizes the problem. You&#8217;ll get a faster response with <em>Crashes on binding to XML File</em>&#160; than with <em>Help! Urgent!</em>.&#160; </p>
<p><strong>Small Programs Get Tested, Big Programs Get Ignored</strong></p>
<p>Boil your problem down to the smallest possible program that reproduces the error/bug/issue. I find that when I do so, 50% of the time I solve the problem my self, and in any case I greatly increase the likelihood that someone will bother to load my problem and find out what is wrong. </p>
<p><strong>Comments Can Help or Kill</strong></p>
<p>Also be sure to comment your program wisely: don&#8217;t fill the program with self-evident comments</p>
<pre class="xml" name="code">x = 5   // assign 5 to x</pre>
<p>they are just clutter.</p>
<p>On the other hand, <em><strong>do</strong></em> explain anything you are doing that is less than self-evident</p>
<pre class="xml" name="code">// get the collection from the
// isolated storage reference variable
foo.itemSource = bar; </pre>
<p><strong>Short Paragraphs</strong></p>
<p>Finally, you want folks to read your message; so make it short, and make each paragraph short. Make it <em>easy and inviting</em> and more folks will read and help.</p>
<p>&#160;</p>
<p>Best of luck!</p>
<p>&#160;</p>
<p>-jesse</p>
<p>&#160;</p>
<p>&#160;</p>
<p><strong>&#160;</strong></p>
<div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;">
<hr />
<div class="cc-license">This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/02/11/help-the-silverlight-toolkit-ate-my-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Tree View Control</title>
		<link>http://jesseliberty.com/2009/01/30/the-tree-view-control/</link>
		<comments>http://jesseliberty.com/2009/01/30/the-tree-view-control/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 17:37:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[&#160; &#160; The Tree View control is ideal for displaying hierarchical data. While there is a great deal you can do with this control, in its simplest form it is fairly straightforward to work with, once you grok the essential &#8230; <a href="http://jesseliberty.com/2009/01/30/the-tree-view-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
<script type=text/javascript src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=rotate&amp;publisher=385eda54-f85a-45b2-a8ed-a53b545fb5ad&amp;popup=true&amp;offsetLeft=5&amp;offsetTop=10" mce_src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=rotate&amp;publisher=385eda54-f85a-45b2-a8ed-a53b545fb5ad&amp;popup=true&amp;offsetLeft=5&amp;offsetTop=10"></script>
</p>
<p><img border=0 src="http://silverlight.net/blogs/jesseliberty/1Files1/minitutorial.jpg"/>&nbsp;</p>
<p mce_keep="true">&nbsp;</p>
<p>The Tree View control is ideal for displaying hierarchical data. While there is a great deal you can do with this control, in its simplest form it is fairly straightforward to work with, once you grok the essential recursiveness it demands (well, requests strongly). </p>
<p>We&#8217;ll look at two examples: the TreeView raw, and then using DataBinding with a tiny bit of customization. Here&#8217;s what we&#8217;re building:</p>
<p>&#8212; Top of Streaming Application &#8212;</p>
<div><iframe style="WIDTH: 600px; HEIGHT: 600px" src="http://silverlight.services.live.com/invoke/20712/SimpleTreeView/iframe.html" frameBorder=0 scrolling=no mce_src="http://silverlight.services.live.com/invoke/20712/SimpleTreeView/iframe.html"></iframe></div>
<p>&#8212; End of Streaming Application &#8212;</p>
<table border=2 cellSpacing=0 cellPadding=5 width=500>
<tbody>
<tr>
<td vAlign=top width=500>Everything that follows is based on the work of <strong>Stephen R Strong</strong><em> </em>who contributed his efforts in support of this blog, and whose work is very much appreciated.</td>
</tr>
</tbody>
</table>
<p>To create the application shown above, we need to a hierarchical data source and we need a pair of treeview controls. </p>
<p>The easiest way to obtain the data is to just create it in memory (though of course, your source might be an xml file, retrieved from a database, etc.).</p>
<h3>Hierarchical Data</h3>
<p>The Data class I created for this example is defined like this:</p>
<pre class=xml name="code">public class Data
{
   public string Name { get; set; }
   public Data Parent { get; set; }
   public List&lt;Data&gt; Children;
   public int Depth  { get { return Parent == null ? 0 : Parent.Depth +1; } }
   </pre>
<p>I opted to provide a default constructor, though it does so little, I could have let the compiler create one for me. The CreateChild method adds a new child to the current Data object. </p>
<pre class=xml name="code">public Data()
{
   Name=string.Empty;
   Parent = null;
   Children = new List&lt;Data&gt;();
}

public Data CreateChild( string name )
{
   Data child = new Data() { Name = name, Parent = this};
   Children.Add(child);
   return child;
}</pre>
<p>Finally, the Data class provides a static method that returns a hierarchical collection of information about the United States,</p>
<pre class=xml name="code">public static Data CreateDataSample()
{
   Data root = new Data() { Name = "United States" };
   Data states = root.CreateChild( "States" );
   states.CreateChild( "Alabama" ).CreateChild( "Montgomery" );
   states.CreateChild( "Alaska" ).CreateChild( "Juneau" );
   states.CreateChild( "Arizona" ).CreateChild( "Phoenix" );
   states.CreateChild( "Arkansas" ).CreateChild( "Little Rock" );
   Data presidents = root.CreateChild( "Presidents" );
   Data W = presidents.CreateChild( "Washington" );
   Data WTerm = W.CreateChild( "Took office" );
   WTerm.CreateChild( "1789" );
   WTerm.CreateChild( "1793" );
   Data A = presidents.CreateChild( "Adams" ).CreateChild( "Took office" ).CreateChild( "1797" );
   Data J = presidents.CreateChild( "Jefferson" );
   Data JTerm = J.CreateChild( "Took office" );
   JTerm.CreateChild( "1801" );
   JTerm.CreateChild( "1805" );
   return root;
}</pre>
<p>Note that CreateChild returns a Data object, and we take advantage of that in the third line where we create a Child of states whose Name field is Alabama, and then give <em>that</em> Data object a child whose name field is Montgomery (the capital of Alabama). </p>
<p>Ultimately, we return just the root Data object; but the structure we&#8217;ve created looks like this:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/USOutline_2A046F87.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/USOutline_2A046F87.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=USOutline border=0 alt=USOutline src="http://silverlight.net/blogs/jesseliberty/USOutline_thumb_2279001A.jpg" width=470 height=433 mce_src="http://silverlight.net/blogs/jesseliberty/USOutline_thumb_2279001A.jpg"/></a>&nbsp;</p>
<p>Here&#8217;s the complete Xaml for the page that displays this data,</p>
<pre class=xml name="code">&lt;UserControl x:Class="TreeView.TreeViewPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:control="clr-namespace:Microsoft.Windows.Controls;                 assembly=Microsoft.Windows.Controls"
             Width="600"
             Height="600"&gt;
  &lt;Grid x:Name="LayoutRoot"
        Background="White"&gt;
    <strong>&lt;control:TreeView x:Name="LeftTreeView"
                      HorizontalAlignment="Left"
                      Background="Wheat" /&gt;
    &lt;control:TreeView x:Name="RightTreeView"
                      HorizontalAlignment="Right"
                      Background="Beige" /&gt;</strong>
  &lt;/Grid&gt;
&lt;/UserControl&gt;</pre>
<p>The interesting work, of course, is done in the code behind.&nbsp; L</p>
<pre class=xml name="code">public partial class TreeViewPage : UserControl
{
   public TreeViewPage()
   {
      InitializeComponent();
      Data root = Data.CreateDataSample();
      FillTree( LeftTreeView.Items, root );
      FillBoundTree( RightTreeView.Items, root );
   }</pre>
<h3>Recursion</h3>
<p>After the call to InitializeComponent we call our static method that returns the root node (United States) which is pregnant with the entire data structure. We pass two arguments to a private helper method named FillTree:</p>
<ol>
<li>The Items Collection of the TreeView control declared in the Xaml</li>
<li>The Data instance that serves as the root of the tree</li>
</ol>
<p>The helper method is created to provide a place for recursion, because the process of adding nodes to the tree is (almost) inherently recursive.</p>
<table border=2 cellSpacing=0 cellPadding=5 width=500>
<tbody>
<tr>
<td vAlign=top width=500>I wrote almost inherently recursive because of course you can do this without recursion, even without data binding, but there are some things that just lend themselves to recursion and this is surely one.</td>
</tr>
</tbody>
</table>
<pre class=xml name="code"> private void FillTree( ItemCollection itemColl, Data dataNode )
 {
    TreeViewItem tvi = new TreeViewItem();
    itemColl.Add( tvi );
    tvi.Header = dataNode.Name;
    //….</pre>
<p>FillTree creates an instance of a TreeViewItem (a node in a TreeView) and adds it to the collection that is passed in (in this first case, to the items collection of the TreeView control). </p>
<p>It then sets the tree view item&#8217;s header property to the Name property of the Data object it received.&nbsp; At this point we can conceive of things as looking like this:</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/TreeViewFirstStep_48DAE365.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/TreeViewFirstStep_48DAE365.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=TreeViewFirstStep border=0 alt=TreeViewFirstStep src="http://silverlight.net/blogs/jesseliberty/TreeViewFirstStep_thumb_083896F6.jpg" width=407 height=271 mce_src="http://silverlight.net/blogs/jesseliberty/TreeViewFirstStep_thumb_083896F6.jpg"/></a> </p>
<p>It is important to note that the TreeViewItem does <em>not</em> hold a copy of the Data object, but rather the Header property of the TreeViewItem gets its string from the DataObject. </p>
<p>The FillTree method then iterates through each child in the current Data object&#8217;s Children property (which you will remember is a List&lt;Data&gt;.</p>
<pre class=xml name="code">    foreach ( Data childDataNode in dataNode.Children )
    {
       FillTree( tvi.Items, childDataNode ); // dang. dang. (curse, recurse)
    }
 }  // end method</pre>
<p>For each child it finds, it recurses, passing in the Items collection of the new TreeView Item and, one by one, the children of the current Data object,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/Recurse_4651B1A7.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/Recurse_4651B1A7.jpg"><img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=Recurse border=0 alt=Recurse src="http://silverlight.net/blogs/jesseliberty/Recurse_thumb_6CB394F2.jpg" width=443 height=353 mce_src="http://silverlight.net/blogs/jesseliberty/Recurse_thumb_6CB394F2.jpg"/></a> </p>
<p>Thus, the first time the method recurses, the parameters are now the Items collection of the TreeViewItem whose header is United States, and the Data object States. </p>
<p>In this way each data object&#8217;s name is added to a TreeViewItem in the appropriate &#8220;level&#8221; of the tree. </p>
<p>Final line of the constructor of TreeViewPage calls FillBoundTree</p>
<pre class=xml name="code">public TreeViewPage()
{
   InitializeComponent();
   Data root = Data.CreateDataSample();
   FillTree( LeftTreeView.Items, root );
   <strong>FillBoundTree( RightTreeView.Items, root );
</strong>}</pre>
<p mce_keep="true">&nbsp;</p>
<h3>Data Binding</h3>
<p>This second method looks a lot like FillTree but works quite differently. </p>
<pre class=xml name="code">private void FillBoundTree( ItemCollection itemColl, Data dataNode )
{
   TreeViewItem tvi = new TreeViewItem();
   itemColl.Add( tvi );
<font color=#ff0000>   </font><strong><font color=#ff0000>tvi.DataContext = dataNode;
   tvi.Header = new TreeViewNode();</font></strong>
   foreach ( Data childDataNode in dataNode.Children )
   {
      FillBoundTree( tvi.Items, childDataNode );
   }
}</pre>
<p>The key is found in the two lines I&#8217;ve shown in red.&nbsp; In this case, rather than copying the text of the Name field to the Header, we set the DataContext (which signals right away that we&#8217;re doing some kind of data binding) and we set the Header to an instance of a TreeViewNode. </p>
<p>TreeViewNode is a user control. Here is the complete Xaml for TreeViewNode,</p>
<pre class=xml name="code">&lt;UserControl x:Class="TreeView.TreeViewNode"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="300" &gt;
    &lt;Grid x:Name="LayoutRoot" Background="Bisque"&gt;
    &lt;Border BorderBrush="Black"
            BorderThickness="4"&gt;
      &lt;StackPanel Orientation="Horizontal"&gt;
        &lt;TextBlock Text="{Binding Name}"
                   Margin="3" /&gt;
        &lt;TextBlock Text="{Binding Depth}"
                   Margin="3"/&gt;
      &lt;/StackPanel&gt;
    &lt;/Border&gt;
  &lt;/Grid&gt;
&lt;/UserControl&gt;</pre>
<p>(No work is done in TreeViewNode.cs)</p>
<p>You can see that the heart of this user control is a pair of TextBlock objects, one of which is bound to the Name property and the other to the Depth property of the Data object. As each Data object is passed in to the FillBoundTree method it serves as the DataContext from which these properties are extracted. </p>
<div style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px" class=wlWriterHeaderFooter>
<hr />
<div class=cc-license>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" mce_href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/01/30/the-tree-view-control/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Header Content Control</title>
		<link>http://jesseliberty.com/2009/01/17/the-header-content-control/</link>
		<comments>http://jesseliberty.com/2009/01/17/the-header-content-control/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 03:17:00 +0000</pubDate>
		<dc:creator>Jesse Liberty</dc:creator>
				<category><![CDATA[z Silverlight Archives]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[&#160; This quick introduction to the HeaderContentControl of the Silverlight Toolkit will lay the ground work for future entries on the Expander control. To see the HeaderContentControl with as little fuss as possible, create a new Silverlight application and add &#8230; <a href="http://jesseliberty.com/2009/01/17/the-header-content-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><script type=text/javascript src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=rotate&amp;publisher=385eda54-f85a-45b2-a8ed-a53b545fb5ad&amp;popup=true&amp;offsetLeft=5&amp;offsetTop=10" mce_src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=rotate&amp;publisher=385eda54-f85a-45b2-a8ed-a53b545fb5ad&amp;popup=true&amp;offsetLeft=5&amp;offsetTop=10"></script></p>
<p><img border=0 src="http://silverlight.net/blogs/jesseliberty/1Files1/minitutorial.jpg"/>&nbsp;</p>
<p>This quick introduction to the HeaderContentControl of the <a href="http://www.codeplex.com/Silverlight" target=_blank mce_href="http://www.codeplex.com/Silverlight">Silverlight Toolkit</a> will lay the ground work for future entries on the Expander control.</p>
<p>To see the HeaderContentControl with as little fuss as possible, create a new Silverlight application and add a reference to the Microsoft.Windows.Controls.dll from the toolkit. </p>
<h5>Page.xaml</h5>
<p mce_keep="true">&nbsp;</p>
<p>Begin by adding a reference to the Microsoft.Windows.Controls.dll to your application and then declare an XML Name Space at the top of Page.xaml,</p>
<pre class=xml name="code">xmlns:control="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls" </pre>
<p>The HeaderControl consists of two parts: the header part and the contents part,</p>
<pre class=xml name="code">&lt;Grid x:Name="LayoutRoot" Background="White"&gt;

&lt;control:HeaderedContentControl    x:Name="SimpleHeaderContent"
   Grid.Row="0"&gt;
  &lt;control:HeaderedContentControl.<font color=#ff0000>Header</font>&gt;
    &lt;TextBlock x:Name="HeaderContentControlHeader"
               Text="Header for simple Header Content Control"
               FontSize="16"
               FontFamily="Georgia"
               FontWeight="Bold" /&gt;
  &lt;/control:HeaderedContentControl.Header&gt;
  &lt;control:HeaderedContentControl.<font color=#ff0000>Content</font>&gt;
    &lt;TextBlock x:Name="Message"
               Text="Content for the content control."
               TextWrapping="Wrap"
               FontFamily="Comic Sans MS"
               FontSize="24"
               Margin="10" /&gt;
  &lt;/control:HeaderedContentControl.Content&gt;
&lt;/control:HeaderedContentControl&gt;

&lt;/Grid&gt;</pre>
<p>In the code shown above we are using text for both the header and the content portions,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/HeaderInFF_16D26AC8.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/HeaderInFF_16D26AC8.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=HeaderInFF border=0 alt=HeaderInFF src="http://silverlight.net/blogs/jesseliberty/HeaderInFF_thumb_24387DCE.jpg" width=439 height=238 mce_src="http://silverlight.net/blogs/jesseliberty/HeaderInFF_thumb_24387DCE.jpg"/></a> </p>
<h3>Not Just Text</h3>
<p>An interesting thing happens if you put a page with a&nbsp; HeaderContentControl into Expression Blend, and then template the control…</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/ContentPresenters_6AB56DD6.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/ContentPresenters_6AB56DD6.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=ContentPresenters border=0 alt=ContentPresenters src="http://silverlight.net/blogs/jesseliberty/ContentPresenters_thumb_6A493AE1.jpg" width=244 height=162 mce_src="http://silverlight.net/blogs/jesseliberty/ContentPresenters_thumb_6A493AE1.jpg"/></a> </p>
<p>The control consists of a pair of ContentPresenter objects within a stack panel.&nbsp; If, however, the Header (e.g.,) is a ContentPresenter, then it is in no way restricted to text.&nbsp; </p>
<p>(Close Blend and don&#8217;t save the changes)</p>
<p>Let&#8217;s add an image to Page.xaml&#8217;s directory and then make that image a compiled resource by adding it to the project</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/AddExisting_50E137A7.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/AddExisting_50E137A7.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=AddExisting border=0 alt=AddExisting src="http://silverlight.net/blogs/jesseliberty/AddExisting_thumb_175E27B0.jpg" width=474 height=304 mce_src="http://silverlight.net/blogs/jesseliberty/AddExisting_thumb_175E27B0.jpg"/></a> </p>
<p>Make sure the <strong>Build Action</strong> (in the properties window) is set to Resource,</p>
<p><a href="http://silverlight.net/blogs/jesseliberty/BuildAction_1AFC428D.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/BuildAction_1AFC428D.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=BuildAction border=0 alt=BuildAction src="http://silverlight.net/blogs/jesseliberty/BuildAction_thumb_487D6250.jpg" width=307 height=385 mce_src="http://silverlight.net/blogs/jesseliberty/BuildAction_thumb_487D6250.jpg"/></a> </p>
<p mce_keep="true">&nbsp;</p>
<p>Now we can return to Page.xaml and remove the text and substitute the Image,</p>
<pre class=xml name="code">&lt;control:HeaderedContentControl.Header&gt;
   &lt;!--   &lt;TextBlock x:Name="HeaderContentControlHeader"
             Text="Header for simple Header Content Control"
             FontSize="16"
             FontFamily="Georgia"
             FontWeight="Bold" /&gt; --&gt;

  &lt;<font color=#ff0000>Image Source="LogoSmall.jpg"</font>
         Stretch="UniformToFill"
         VerticalAlignment="Stretch"
         HorizontalAlignment="Stretch"
         MaxHeight="100"
         MaxWidth="100" /&gt;
&lt;/control:HeaderedContentControl.Header&gt;</pre>
<pre class=xml name="code">The result is immediately obvious,</pre>
<pre class=xml name="code"><a href="http://silverlight.net/blogs/jesseliberty/ContentControlHeaderlWithImage_7A08CFE5.jpg" mce_href="http://silverlight.net/blogs/jesseliberty/ContentControlHeaderlWithImage_7A08CFE5.jpg"><img style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=ContentControlHeaderlWithImage border=0 alt=ContentControlHeaderlWithImage src="http://silverlight.net/blogs/jesseliberty/ContentControlHeaderlWithImage_thumb_4085BFEE.jpg" width=447 height=312 mce_src="http://silverlight.net/blogs/jesseliberty/ContentControlHeaderlWithImage_thumb_4085BFEE.jpg"/></a> </pre>
<p mce_keep="true">&nbsp;</p>
<p>The HeaderContentControl makes a powerful building block, especially when combined with, e.g., the Expander, as we&#8217;ll see very soon.</p>
<pre class=xml name="code">&nbsp;</pre>
<p><a href="http://silverlight.net/blogs/jesseliberty/archive/2009/01/26/toolkit-header-controls-video-posted.aspx" target=_blank mce_href="http://silverlight.net/blogs/jesseliberty/archive/2009/01/26/toolkit-header-controls-video-posted.aspx"></a>&nbsp;</p>
<p><strong>MORE </strong><a href="http://silverlight.net/blogs/jesseliberty/archive/2009/01/26/toolkit-header-controls-video-posted.aspx" target=_blank mce_href="http://silverlight.net/blogs/jesseliberty/archive/2009/01/26/toolkit-header-controls-video-posted.aspx">Header Controls Video</a></p>
<div style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px" class=wlWriterHeaderFooter>
<hr />
<div class=cc-license>This work is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" mce_href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution By license.</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jesseliberty.com/2009/01/17/the-header-content-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

