<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5977036694848637865</id><updated>2012-02-16T00:12:21.608-08:00</updated><category term='Sliverlight Examples'/><category term='Silverlight Source Code'/><title type='text'>Sliverlight Source Examples</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-6097774233588999201</id><published>2008-06-27T12:41:00.001-07:00</published><updated>2008-06-27T12:41:55.908-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight 2 Beta 1 session</title><content type='html'>&lt;strong&gt;Step 1&lt;/strong&gt;: First I go through 2-3 slides ensuring everybody  realises that Silverlight is a cross-browser, cross-platform web technology that  utilises .NET in the browser.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Demonstrate some  apps to give an idea of the kind of rich apps we can build - a subset of &lt;a href="http://www.danielmoth.com/Blog/2008/05/silverlight-example-apps.html"&gt;these  samples&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: After a slide on &lt;a href="http://www.danielmoth.com/Blog/2008/05/faq-what-do-i-need-to-develop.html"&gt;what  needs to be installed&lt;/a&gt; I move to the AGENDA. My AGENDA slide has 5 items on  it, which are the following 5 steps (4 to 8).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 4&lt;/strong&gt;: &lt;a href="http://www.danielmoth.com/Blog/2008/04/silverlight-2-essential-getting-started.html"&gt;Getting  Started&lt;/a&gt; aka Hello World.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 5&lt;/strong&gt;: &lt;a href="http://www.danielmoth.com/Blog/2008/05/xaml-level-100.html"&gt;Intro to  XAML&lt;/a&gt; inc. developer-designer interaction using Blend.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step  6&lt;/strong&gt;: &lt;a href="http://www.danielmoth.com/Blog/2008/03/silverlight-browser-integration-aka.html"&gt;HTML  Bridge&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 7&lt;/strong&gt;: &lt;a href="http://www.danielmoth.com/Blog/2008/04/networking-in-silverlight-2-beta-1.html"&gt;Networking&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step  8&lt;/strong&gt;: &lt;a href="http://www.danielmoth.com/Blog/2008/04/isolatedstorage-in-siverlight-2-beta-1.html"&gt;IsolatedStorage&lt;/a&gt;  and &lt;a href="http://www.danielmoth.com/Blog/2008/04/openfiledialog-and-filedialogfileinfo.html"&gt;OpenFileDialog&lt;/a&gt;  (i.e. File System Access).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 9&lt;/strong&gt;: Finally, a summary  pointing to your one-stop URL for Silverlight: &lt;a href="http://silverlight.net/"&gt;silverlight.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you to  those that attended (or plan to attend) this session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-6097774233588999201?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/6097774233588999201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=6097774233588999201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/6097774233588999201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/6097774233588999201'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2008/06/silverlight-2-beta-1-session.html' title='Silverlight 2 Beta 1 session'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-1212812650702204768</id><published>2008-06-27T12:36:00.000-07:00</published><updated>2008-06-27T12:39:34.465-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight Source Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Animation in-depth with Silverlight 2.0 Beta – Part One </title><content type='html'> &lt;p&gt;&lt;span id="ctl00_ArticleInfo1_download"&gt;&lt;a href="/code/SilverlightVideoAnimation3.zip"&gt;Download Sample Code&lt;/a&gt;&lt;/span&gt;  &lt;/p&gt; &lt;p&gt;&lt;span id="ctl00_ArticleInfo1_desc"&gt;In-Depth analysis of animation with  Silverlight 2.0 Beta.&lt;/span&gt;&lt;/p&gt; &lt;div class="KonaBody"&gt; &lt;p&gt; &lt;table id="toc"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Contents&lt;span class="toctoggle"&gt; [&lt;a id="togglelink" href="javascript:toggleToc()"&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="#Introduction_to_Animation_in_Silverlight"&gt;1 Introduction to  Animation in Silverlight &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Animation_types"&gt;2 Animation types &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Principles_of_animation"&gt;3 Principles of animation &lt;/a&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="#Squash_and_stretch"&gt;3.1 Squash and stretch &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Timing_and_motion"&gt;3.2 Timing and motion &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Staging"&gt;3.3 Staging &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Overlapping_action_and_follow-through"&gt;3.4 Overlapping action and  follow-through &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Arcs"&gt;3.5 Arcs &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="#Summary"&gt;4 Summary &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;a name="Introduction_to_Animation_in_Silverlight"&gt;&lt;/a&gt; &lt;h3&gt;Introduction to Animation in Silverlight &lt;/h3&gt; &lt;p&gt;Animation allows us to create attractive user interfaces. Animation is used  to apply dazzling effects such as spin a logo or video, make text scroll, make  images grow when the mouse is over them etc. Animation is much like varying the  property value over time as far as Silverlight 2.0 is concerned. This will be  clear if someone takes a closer look at the animated stuff done in  Silverlight/WPF applications. For example, it is possible to make an element  grow by increasing its &lt;code&gt;Width &lt;/code&gt;and &lt;code&gt;Height &lt;/code&gt;or changing  its &lt;code&gt;Color &lt;/code&gt;value or its opacity in a specified duration. &lt;/p&gt; &lt;p&gt;The &lt;code&gt;Size&lt;/code&gt;, &lt;code&gt;Color &lt;/code&gt;and &lt;code&gt;Value &lt;/code&gt;of an  element can be varied over a period of time by setting the duration in the  Storyboard. Storyboard controls animations with a timeline, and provides object  and property targeting information for its child animations. The real definition  of animation is - &lt;i&gt;"An illusion that is created by quickly cycling through a  series of images&lt;/i&gt;". Our brain perceives the group of images as a single  changing scene. In Television broadcast or Film this illusion is created using  cameras that record a number of pictures - frames - each slightly different from  the last displayed, in a specific amount of time by capturing them in a  &lt;i&gt;timeline&lt;/i&gt;. &lt;/p&gt; &lt;p&gt;Silverlight too has its timeline to specify what actions to perform at  specified time intervals. In Silverlight all animations inherit from the  Timeline object; therefore all animations are specialized type of Timelines. A  timeline represents a segment of time. To specify the length of the segment,  when it should start and stop, how many times it will repeat, how fast time  progresses in that segment, Silverlight uses Timelines. &lt;/p&gt; &lt;p&gt;Before digging deep into animation, here are two sample programs to give you  an idea on what animations do in Silverlight, or what can be done with  animations. This is just a simple animated sample to show you the animation in  action. You can modify this code to make it more effective. The sample program  below animates two videos one after another:&lt;/p&gt; &lt;h4&gt;Figure 1: Silverlight Animation in Action &lt;/h4&gt; &lt;p&gt;&lt;img title="Silverlight Animation in Action" alt="Silverlight Animation in Action" src="/images/articleimages/silverlightanimation1_1.jpg" /&gt;&lt;/p&gt; &lt;p&gt;The above is the first video in this application, which has been scaled,  translated and rotated to get the animated effect. After this video finishes  another one starts by spinnig over the first video. Check the picture of this  animation:&lt;/p&gt; &lt;h4&gt;Figure 2: The second animation in action &lt;/h4&gt; &lt;p&gt;&lt;img title="The second animation in action" alt="The second animation in action" src="/images/articleimages/silverlightanimation1_2.jpg" /&gt;&lt;/p&gt; &lt;p&gt;You should be excited by now seeing the power of Silverlight animation. This  application contains three MediaElements. Two of them have been animated and I  have used the other for a five seconds video which shows the text “Powered by  Silverlight” together with the Silverlight logo. The complete code is shown  below, but don’t dig deeper into this before learning the basics, which will  come next in this article.&lt;/p&gt; &lt;h4&gt;Listing 1: Page.xaml &lt;/h4&gt; &lt;div class="dp-highlighter nogutter"&gt;  &lt;ol class="dp-xml"&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;UserControl&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;   &lt;/span&gt;&lt;span class="attribute"&gt;xmlns&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"http://schemas.microsoft.com/client/2007"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;   &lt;/span&gt;&lt;span class="attribute"&gt;xmlns:x&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;   &lt;/span&gt;&lt;span class="attribute"&gt;x:Class&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"SilverlightVideoAnimation3.Page"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;   &lt;/span&gt;&lt;span class="attribute"&gt;Loaded&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Page_Loaded"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="attribute"&gt;Width&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1024"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Height&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"680"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;       &lt;/span&gt;&lt;span class="attribute"&gt;xmlns:d&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;       &lt;/span&gt;&lt;span class="attribute"&gt;xmlns:mc&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;       &lt;/span&gt;&lt;span class="attribute"&gt;mc:Ignorable&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"d"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"VideoTimeline"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"(UIElement.Opacity)"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:02"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform).    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                       (TransformGroup.Children)[0].(ScaleTransform.ScaleX)"    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:02"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:07"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:09"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"3.594"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        .(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:02"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:07"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:09"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"3.594"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        .(TransformGroup.Children)[3].(TranslateTransform.X)"    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                        &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:04"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"56"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:05.9000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-135"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:07"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-196"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:09"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-62"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                           &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[3].(TranslateTransform.Y)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:04"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:05.9000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"168"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:07"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-41"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:09"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"59.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[2].(RotateTransform.Angle)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:05.9000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:07"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"360"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:30"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-465"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:32"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-545"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:35"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"-518.5"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:30"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:32"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:35"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"4.993"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:30"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:32"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:35"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"5.364"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[3].(TranslateTransform.Y)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:30"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:32"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:35"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"177"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     .(TransformGroup.Children)[2].(RotateTransform.Angle)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                     &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:30"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:32"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:35"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"360"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;Grid&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"LayoutRoot"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;Grid.Background&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;LinearGradientBrush&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;EndPoint&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.5,1"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;StartPoint&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.5,0"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;GradientStop&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Color&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"#FFFFFFFF"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Offset&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.554"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;GradientStop&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Color&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"#FF282828"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Offset&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;GradientStop&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Color&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"#FF595858"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Offset&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;LinearGradientBrush&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;Grid.Background&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;HorizontalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Stretch"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;Margin&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"281.837005615234,137.998992919922,432.832000732422,0"&lt;/span&gt;&lt;span&gt;     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;VerticalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Top"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Opacity&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"1"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Source&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Media/racecar.wmv"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;d:LayoutOverrides&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"HorizontalAlignment, Height"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;RenderTransformOrigin&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.5,0.5"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Height&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"93.998"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement.RenderTransform&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;TransformGroup&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ScaleTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SkewTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;RotateTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;TranslateTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;TransformGroup&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement.RenderTransform&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Height&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"81.126"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;HorizontalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Right"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Margin&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0,0,0,0"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;VerticalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Top"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Width&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"144"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Source&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Media/Halo.wmv"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;d:LayoutOverrides&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Height"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Position&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:16"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;RenderTransformOrigin&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.5,0.5"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"mediaElement1"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement.RenderTransform&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;TransformGroup&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ScaleTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SkewTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;RotateTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;          &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;TranslateTransform&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;TransformGroup&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;      &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement.RenderTransform&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"MediaElement3"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Height&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"98"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;HorizontalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Right"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;Margin&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0,0,17,137"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;VerticalAlignment&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Bottom"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;Width&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"127"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Source&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Media/poweredby_silverlight.wmv"&lt;/span&gt;&lt;span&gt;     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                  &lt;/span&gt;&lt;span class="attribute"&gt;Position&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:05"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;MediaElement&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;Grid&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;textarea class="xml" style="display: none;" name="61115925"&gt;&lt;usercontrol xmlns="http://schemas.microsoft.com/client/2007" x="http://schemas.microsoft.com/winfx/2006/xaml" class="SilverlightVideoAnimation3.Page" loaded="Page_Loaded" width="1024" height="680" d="http://schemas.microsoft.com/expression/blend/2008" mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ignorable="d"&gt;   &lt;usercontrol.resources&gt;     &lt;storyboard name="VideoTimeline"&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.Opacity)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:00" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:02" value="1"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.RenderTransform).                        (TransformGroup.Children)[0].(ScaleTransform.ScaleX)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:02" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:03" value="1.5"&gt;         &lt;splinedoublekeyframe keytime="00:00:07" value="1.5"&gt;         &lt;splinedoublekeyframe keytime="00:00:09" value="3.594"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.RenderTransform)                         .(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:02" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:03" value="1.5"&gt;         &lt;splinedoublekeyframe keytime="00:00:07" value="1.5"&gt;         &lt;splinedoublekeyframe keytime="00:00:09" value="3.594"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.RenderTransform)                         .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:03" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:04" value="56"&gt;         &lt;splinedoublekeyframe keytime="00:00:05.9000000" value="-135"&gt;         &lt;splinedoublekeyframe keytime="00:00:07" value="-196"&gt;         &lt;splinedoublekeyframe keytime="00:00:09" value="-62"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[3].(TranslateTransform.Y)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:03" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:04" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:05.9000000" value="168"&gt;         &lt;splinedoublekeyframe keytime="00:00:07" value="-41"&gt;         &lt;splinedoublekeyframe keytime="00:00:09" value="59.5"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[2].(RotateTransform.Angle)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:05.9000000" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:07" value="360"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement1" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:30" value="-465"&gt;         &lt;splinedoublekeyframe keytime="00:00:32" value="-545"&gt;         &lt;splinedoublekeyframe keytime="00:00:35" value="-518.5"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement1" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:30" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:32" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:35" value="4.993"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement1" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:30" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:32" value="1"&gt;         &lt;splinedoublekeyframe keytime="00:00:35" value="5.364"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement1" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[3].(TranslateTransform.Y)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:30" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:32" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:35" value="177"&gt;       &lt;/doubleanimationusingkeyframes&gt;       &lt;doubleanimationusingkeyframes targetname="mediaElement1" targetproperty="(UIElement.RenderTransform)                                      .(TransformGroup.Children)[2].(RotateTransform.Angle)" begintime="00:00:00"&gt;         &lt;splinedoublekeyframe keytime="00:00:30" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:32" value="0"&gt;         &lt;splinedoublekeyframe keytime="00:00:35" value="360"&gt;       &lt;/doubleanimationusingkeyframes&gt;     &lt;/storyboard&gt;   &lt;/UserControl.Resources&gt;   &lt;grid name="LayoutRoot"&gt;     &lt;grid.background&gt;       &lt;lineargradientbrush endpoint="0.5,1" startpoint="0.5,0"&gt;         &lt;gradientstop color="#FFFFFFFF" offset="0.554"&gt;         &lt;gradientstop color="#FF282828" offset="0"&gt;         &lt;gradientstop color="#FF595858" offset="1"&gt;       &lt;/lineargradientbrush&gt;     &lt;/Grid.Background&gt;     &lt;mediaelement horizontalalignment="Stretch" margin="281.837005615234,137.998992919922,432.832000732422,0" verticalalignment="Top" opacity="1" source="Media/racecar.wmv" layoutoverrides="HorizontalAlignment, Height" name="mediaElement" rendertransformorigin="0.5,0.5" height="93.998"&gt;       &lt;mediaelement.rendertransform&gt;         &lt;transformgroup&gt;           &lt;scaletransform/&gt;           &lt;skewtransform/&gt;           &lt;rotatetransform/&gt;           &lt;translatetransform/&gt;         &lt;/transformgroup&gt;       &lt;/MediaElement.RenderTransform&gt;     &lt;/mediaelement&gt;     &lt;mediaelement height="81.126" horizontalalignment="Right" margin="0,0,0,0" verticalalignment="Top" width="144" source="Media/Halo.wmv" layoutoverrides="Height" position="00:00:16" rendertransformorigin="0.5,0.5" name="mediaElement1"&gt;       &lt;mediaelement.rendertransform&gt;         &lt;transformgroup&gt;           &lt;scaletransform/&gt;           &lt;skewtransform/&gt;           &lt;rotatetransform/&gt;           &lt;translatetransform/&gt;         &lt;/transformgroup&gt;       &lt;/MediaElement.RenderTransform&gt;     &lt;/mediaelement&gt;     &lt;mediaelement name="MediaElement3" height="98" horizontalalignment="Right" margin="0,0,17,137" verticalalignment="Bottom" width="127" source="Media/poweredby_silverlight.wmv" position="00:00:05"&gt;     &lt;/mediaelement&gt;   &lt;/grid&gt; &lt;/textarea&gt; &lt;h4&gt;Listing 2: Page.xaml.cs &lt;/h4&gt; &lt;div class="dp-highlighter nogutter"&gt;  &lt;ol class="dp-c"&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System;    &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Controls;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Documents;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Ink;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Input;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Media;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Media.Animation;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using&lt;/span&gt;&lt;span&gt; System.Windows.Shapes;   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="keyword"&gt;namespace&lt;/span&gt;&lt;span&gt; SilverlightVideoAnimation3    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;{   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="keyword"&gt;public&lt;/span&gt;&lt;span&gt; partial &lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt;&lt;span&gt; Page : UserControl   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    {   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="keyword"&gt;public&lt;/span&gt;&lt;span&gt; Page()    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        {   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;            &lt;/span&gt;&lt;span class="comment"&gt;// Required to initialize variables  &lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;            InitializeComponent();   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        }   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        &lt;/span&gt;&lt;span class="keyword"&gt;private&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="keyword"&gt;void&lt;/span&gt;&lt;span&gt; Page_Loaded(&lt;/span&gt;&lt;span class="keyword"&gt;object&lt;/span&gt;&lt;span&gt; sender, EventArgs e)   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        {   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;            VideoTimeline.Begin();   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;        }   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    }   &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;}  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;textarea class="c#" style="display: none;" name="13172414"&gt;using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SilverlightVideoAnimation3 { 	public partial class Page : UserControl 	{ 		public Page() 		{ 			// Required to initialize variables 			InitializeComponent(); 		}         private void Page_Loaded(object sender, EventArgs e)         {             VideoTimeline.Begin();         } 	} } &lt;/textarea&gt; &lt;p&gt;I’m not explaining this code here because earlier I’ve suggested you to take  a look at the basics of the animation, before digging into this. You’ll see more  in the video animation section of this article.&lt;/p&gt;&lt;a name="Animation_types"&gt;&lt;/a&gt; &lt;h3&gt;Animation types &lt;/h3&gt; &lt;p&gt;Silverlight provides two types of animation: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;From/To/By animations.  &lt;/li&gt;&lt;li&gt;key-frame animations. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Classes that are derived from Timeline provide animation functionality.  Here's the inheritance hierarchy:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;System.Object  &lt;/li&gt;&lt;li&gt;System.Windows.DependencyObject  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.Timeline  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.ColorAnimation  &lt;/li&gt;&lt;li&gt;System.Windows.Media.animation.ColorAnimation.ColorAnimationUsingKeyFrames  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.DoubleAnimation  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.PointAnimation  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.PointAnimationUsingKeyFrames  &lt;/li&gt;&lt;li&gt;System.Windows.Media.Animation.Storyboard &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;When using animations, several of the following properties are needed:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;code&gt;AutoReverse&lt;/code&gt;: Reverses the animation if it has ended (i.e.,  moves the element back to where it started).  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Duration&lt;/code&gt;: The duration of an animation, using the syntax  &lt;code&gt;hh:mm:ss &lt;/code&gt;(hours, minutes, seconds).  &lt;/li&gt;&lt;li&gt;&lt;code&gt;From&lt;/code&gt;: The start value for the animation.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;To&lt;/code&gt;: The end value for the animation.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;By&lt;/code&gt;: A relative value indicating by how much to change the  animation (an alternative approach for using &lt;code&gt;To&lt;/code&gt;).  &lt;/li&gt;&lt;li&gt;&lt;code&gt;RepeatBehavior&lt;/code&gt;: What to do if the animation has ended; you can  provide a (total) duration, a number of times to repeat, or mark it  &lt;code&gt;Forever &lt;/code&gt;if the animation should repeat endlessly.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Storyboard.TargetName&lt;/code&gt;: The name of the element that needs to be  animated (therefore, we needed to assign a name).  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Storyboard.TargetProperty&lt;/code&gt;: The property of the element that  needs to be animated. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;To programmatically control the animation, the following methods are  used:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;code&gt;Begin&lt;/code&gt;: Initiates the Storyboard.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Pause&lt;/code&gt;: Pauses the Storyboard.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Resume&lt;/code&gt;: Resumes a paused Storyboard.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Stop&lt;/code&gt;: Stops the Storyboard.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Seek&lt;/code&gt;: Skips to a specific part of the Storyboard animation.  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;A key-frame animation animates between a series of values specified using  key-frame objects. Key-frame animations are more powerful than From/To/By  animations because any number of target values can be specified and we can even  control their interpolation method. We’ll see the power of key-frame animation  in a moment. &lt;/p&gt; &lt;p&gt;ColorAnimationUsingKeyFrames animates the color of a SolidColorBrush or  GradientBrush, DoubleAnimationUsingKeyFrames animates the width and height of  FrameworkElements, PointAnimationUsingKeyFrames animates the center position of  an EllipseGeometry, ObjectAnimationUsingKeyFrames animates the &lt;code&gt;Fill  &lt;/code&gt;property from one GradientBrush to another. &lt;/p&gt; &lt;p&gt;In key-fame animations a certain stage in the application must be reached.  For example, an object needs to have specific positions. When a key-frame is  reached a certain object value must be met. Every key frame needs at least two  values or attributes:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;code&gt;KeyTime&lt;/code&gt;: At what time the key-frame will come into effect.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;Value&lt;/code&gt;: The value that needs to be reached at a given time.  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In a Timeline where you have a keyframe after half second with a value of 20,  and another one after 1 and half seconds with value of 40, the assigned value of  these two frames will be animated between them. How this value is animated from  20 to 40 will be defined by the second keyframe. There are different ways to  interpolate the value, and the second keyframe needs to confirm which of these  methods is used. Silverlight currently supports three methods: Linear, Discrete  and Spline. Here’s an example of key frame animation. This example uses three  rectangles to demonstrate Spline, Discrete and Linear key-frames. To create it,  open Microsoft Expression Blend 2.5 March Preview.&lt;/p&gt; &lt;h4&gt;Figure 3: Opening Expression Blend &lt;/h4&gt; &lt;p&gt;&lt;img title="Opening Expression Blend" alt="Opening Expression Blend" src="/images/articleimages/silverlightanimation1_3.jpg" /&gt;&lt;/p&gt; &lt;p&gt;Change the Grid’s background to &lt;code&gt;LinearGradientBrush&lt;/code&gt;. In this  case Grid is our root element. Create three rectangles inside the  &lt;code&gt;&lt;grid&gt; &lt;/code&gt;section. Change also the background of the rectangles  to &lt;code&gt;LinearGradientBrush&lt;/code&gt;. By now, you should have change your visual  interface to something like the following.&lt;/p&gt; &lt;h4&gt;Figure 4: Visual Interface for Silverlight KeyFrameAnimations &lt;/h4&gt; &lt;p&gt;&lt;img title="Visual Interface for Silverlight KeyFrameAnimations" alt="Visual Interface for Silverlight KeyFrameAnimations" src="/images/articleimages/silverlightanimation1_4.jpg" /&gt;&lt;/p&gt; &lt;p&gt;Add a Storyboard by clicking the &lt;code&gt;+ &lt;/code&gt;button which resides under  the objects and timeline tab. Select &lt;code&gt;rectangle1 &lt;/code&gt;in the Objects and  Timeline panel. Translate the &lt;code&gt;x &lt;/code&gt;property to 50 when &lt;code&gt;Playhead  &lt;/code&gt;position is in &lt;code&gt;0:00.000&lt;/code&gt;. Again translate the &lt;code&gt;x  &lt;/code&gt;property to 544 and the &lt;code&gt;Playhead &lt;/code&gt;position will be in  &lt;code&gt;0:01.000&lt;/code&gt;. At last set the &lt;code&gt;x &lt;/code&gt;property to 0 again when  the &lt;code&gt;Playhead &lt;/code&gt;position is &lt;code&gt;0:03.000&lt;/code&gt;. Now select  &lt;code&gt;rectangle2&lt;/code&gt;, move the timeline where &lt;code&gt;Playhead &lt;/code&gt;position  is &lt;code&gt;0:00.300 &lt;/code&gt;and translate the &lt;code&gt;x &lt;/code&gt;property of the  TranslateTransform that will be applied to our second rectangle. Set the &lt;code&gt;x  &lt;/code&gt;value to 544 when the &lt;code&gt;Playhead &lt;/code&gt;position is &lt;code&gt;0:01.000  &lt;/code&gt;and set it to 0 when &lt;code&gt;Playhead &lt;/code&gt;position is  &lt;code&gt;0:03.000&lt;/code&gt;. Do the same for the &lt;code&gt;rectangle3&lt;/code&gt;. After  completing this step you should have a timeline like the following.&lt;/p&gt; &lt;h4&gt;Figure 5: KeyFrameAnimations Timeline &lt;/h4&gt; &lt;p&gt;&lt;img title="KeyFrameAnimations Timeline" alt="KeyFrameAnimations Timeline" src="/images/articleimages/silverlightanimation1_5.jpg" /&gt;&lt;/p&gt; &lt;p&gt;This will generate the following Xaml behind the scenes, in the  &lt;code&gt;&lt;usercontrol.resources&gt; &lt;/code&gt;section:&lt;/p&gt; &lt;h4&gt;Listing 3: Page.xaml &lt;/h4&gt; &lt;div class="dp-highlighter nogutter"&gt;  &lt;ol class="dp-xml"&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Storyboard1"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeySpline&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.6,0 0.9,0"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"544"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeySpline&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.6,0 0.9,0"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle2"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00.3000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"282"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"540"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle3"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00.3000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"284"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"542"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;textarea class="xml" style="display: none;" name="51442863"&gt;&lt;storyboard name="Storyboard1"&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle1" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;splinedoublekeyframe keytime="00:00:00" value="0"&gt;     &lt;splinedoublekeyframe keytime="00:00:01" keyspline="0.6,0 0.9,0" value="544"&gt;     &lt;splinedoublekeyframe keytime="00:00:03" keyspline="0.6,0 0.9,0" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle2" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;splinedoublekeyframe keytime="00:00:00.3000000" value="282"&gt;     &lt;splinedoublekeyframe keytime="00:00:01" value="540"&gt;     &lt;splinedoublekeyframe keytime="00:00:03" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle3" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;splinedoublekeyframe keytime="00:00:00.3000000" value="284"&gt;     &lt;splinedoublekeyframe keytime="00:00:01" value="542"&gt;     &lt;splinedoublekeyframe keytime="00:00:03" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt; &lt;/storyboard&gt; &lt;/textarea&gt; &lt;p&gt;Now change the &lt;code&gt;&lt;splinedoublekeyframe&gt; &lt;/code&gt;to  &lt;code&gt;&lt;discretedoublekeyframe&gt; &lt;/code&gt;in the last section of the  DoubleAnimationUsingKeyFrames. Discrete key frames, like DiscreteDoubleKeyFrame,  create sudden jumps between values. For example, if the rectangle is at the  starting position, it can suddenly appear at the 500 position. The animated  property won’t change until the key frame's key time is reached, at which point  the animated property goes suddenly to the target value. &lt;/p&gt; &lt;p&gt;Change the &lt;code&gt;&lt;splinedoublekeyframe&gt; &lt;/code&gt;to  &lt;code&gt;&lt;lineardoublekeyframe&gt; &lt;/code&gt;in the middle  DoubleAnimationUsingKeyFrames section. Add the &lt;code&gt;KeySpline &lt;/code&gt;property  in &lt;code&gt;&lt;splinedoublekeyframesection&gt; &lt;/code&gt;and your code should look  like this:&lt;/p&gt; &lt;div class="dp-highlighter nogutter"&gt;  &lt;ol class="dp-xml"&gt;&lt;li class=""&gt;&lt;span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;x:Name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"Storyboard1"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle1"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"50"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeySpline&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.6,0 0.9,0"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"544"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;SplineDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeySpline&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0.6,0 0.9,0"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle2"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;LinearDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00.3000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"10.2"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;LinearDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"544"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;LinearDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetName&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"rectangle3"&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;Storyboard.TargetProperty&lt;/span&gt;&lt;span&gt;="(UIElement.RenderTransform)    &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 .(TransformGroup.Children)[3].(TranslateTransform.X)"     &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;                                 &lt;/span&gt;&lt;span class="attribute"&gt;BeginTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00"&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DiscreteDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:00.3000000"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"10"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DiscreteDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:01"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"544"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;&lt;/span&gt;&lt;span class="tag-name"&gt;DiscreteDoubleKeyFrame&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;KeyTime&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"00:00:03"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="attribute"&gt;Value&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class="attribute-value"&gt;"0"&lt;/span&gt;&lt;span class="tag"&gt;/&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;  &lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;DoubleAnimationUsingKeyFrames&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li class=""&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="tag"&gt;&lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;Storyboard&lt;/span&gt;&lt;span class="tag"&gt;&gt;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;textarea class="xml" style="display: none;" name="60332585"&gt;&lt;storyboard name="Storyboard1"&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle1" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;splinedoublekeyframe keytime="00:00:00" value="50"&gt;     &lt;splinedoublekeyframe keytime="00:00:01" keyspline="0.6,0 0.9,0" value="544"&gt;     &lt;splinedoublekeyframe keytime="00:00:03" keyspline="0.6,0 0.9,0" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle2" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;lineardoublekeyframe keytime="00:00:00.3000000" value="10.2"&gt;     &lt;lineardoublekeyframe keytime="00:00:01" value="544"&gt;     &lt;lineardoublekeyframe keytime="00:00:03" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt;   &lt;doubleanimationusingkeyframes targetname="rectangle3" targetproperty="(UIElement.RenderTransform)                                  .(TransformGroup.Children)[3].(TranslateTransform.X)" begintime="00:00:00"&gt;     &lt;discretedoublekeyframe keytime="00:00:00.3000000" value="10"&gt;     &lt;discretedoublekeyframe keytime="00:00:01" value="544"&gt;     &lt;discretedoublekeyframe keytime="00:00:03" value="0"&gt;   &lt;/doubleanimationusingkeyframes&gt; &lt;/storyboard&gt; &lt;/textarea&gt; &lt;p&gt;Run the application and check the difference between them.&lt;/p&gt;&lt;a name="Principles_of_animation"&gt;&lt;/a&gt; &lt;h3&gt;Principles of animation &lt;/h3&gt; &lt;p&gt;Here I’m going to present the principles of animation extracted from the book  &lt;i&gt;MS Expression Blend Bible. &lt;/i&gt;It’s quite an effective concept to bring  liveliness to your animated application. &lt;/p&gt; &lt;p&gt;Adding realism is a key factor when creating an eye catching animation. To  me, as a developer of Silverlight applications, everyone should follow the  principles of animation to add realism and effectiveness when applying animation  to their application. As far as storytelling is concerned animation, for example  when developing a game your animation may proceed like this:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Creating a script for storyboard.  &lt;/li&gt;&lt;li&gt;Record voices, Sound effects and background music, and layer them together  to create a soundtrack.  &lt;/li&gt;&lt;li&gt;Designing visuals in more detail.  &lt;/li&gt;&lt;li&gt;Animate those visuals. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If someone wants to put emphasis on adding interest and realism behind  animation, the following principles should be kept in mind:&lt;/p&gt;&lt;a name="Squash_and_stretch"&gt;&lt;/a&gt; &lt;h4&gt;Squash and stretch &lt;/h4&gt; &lt;p&gt;When an object is squashed, its volume should remain equal to the volume it  has when it is not squashed. Squashing and stretching a bouncing ball can add  realism, appeal or both. When two objects bump together, they both squash inward  at the point of impact and stretch in a perpendicular direction, unless they are  made of a completely rigid material. Then they regain their original shape. It’s  important as an animator to always give the squashed and stretched shape the  same volume as the original shape. The object shouldn’t appear to gain any  mass.&lt;/p&gt;&lt;a name="Timing_and_motion"&gt;&lt;/a&gt; &lt;h4&gt;Timing and motion &lt;/h4&gt; &lt;p&gt;This is where user’s attentions are attracted and gives sense of weight,  importance and anticipation to an object. Timing and motion are an integral part  of every animation. Timing and motion can give a sense of the weight of an  object. When an object takes a long time to get going and to stop, it gives the  impression that it’s heavier than something that takes less time. User's  attention can be attracted using motion in two ways: A moving object or  character can attract the attention if everything else in the scene is still and  a still object can attract attention if everything else in the scene is moving.  &lt;/p&gt;&lt;a name="Staging"&gt;&lt;/a&gt; &lt;h4&gt;Staging &lt;/h4&gt; &lt;p&gt;Plays the big part when the attention of the audience to the area of the  screen containing the information is purposely brought. In animation, staging is  the process by which the eye is drawn to the part of the screen that the  animator wants to emphasize. For example, if a character lifts an eyebrow to  indicate that he’s got a plan, you may want to show the action in a close-up so  that the audience notices it.&lt;/p&gt;&lt;a name="Overlapping_action_and_follow-through"&gt;&lt;/a&gt; &lt;h4&gt;Overlapping action and follow-through &lt;/h4&gt; &lt;p&gt;It's handy when motion is given a practical or appearance of reality.  Starting one action before another action is complete. Action that continues to  occur after an action has mostly completed. For example, follow-through occurs  when a ball is caught by a hand and the hand moves back to indicate that the  ball pushed the hand back. Or when a walking character takes a step and his hand  continues to swing.&lt;/p&gt;&lt;a name="Arcs"&gt;&lt;/a&gt; &lt;h4&gt;Arcs &lt;/h4&gt; &lt;p&gt;Animating motions along arcs, because most objects in nature don't move along  a perfect straight line, this is when arcs are animated along motions. In the  natural world, living things usually don’t move in straight lines. When we walk,  we move up and down in an arc as we take a step, then straighten up and take the  next. All animals move in an arc motion, some more than others. And the trees  move with the wind in an arc. Arcs occur both visually and in time. Water in a  stream is sometimes slow, sometimes fast. Wind blows, and then diminishes.  Rabbits hop, and then stop. Varying the timing and the visual motion of your  animation in a natural way can enhance the feeling that you may want it to  convey.&lt;/p&gt; &lt;p&gt;These are the elements of animation that must be structured in an organized  way in order to give attractiveness and realism no matter what platforms you are  working on.&lt;/p&gt;&lt;a name="Summary"&gt;&lt;/a&gt; &lt;h3&gt;Summary &lt;/h3&gt; &lt;p&gt;In the first part of this series we presented the main concepts of animations  with Silverlight. We talked about animation types and discussed the key  animation principles that you must keep in mind when developing rich  applications. In the next part, we’ll dive deep into Storyboards.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-1212812650702204768?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/1212812650702204768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=1212812650702204768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/1212812650702204768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/1212812650702204768'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2008/06/animation-in-depth-with-silverlight-20.html' title='Animation in-depth with Silverlight 2.0 Beta – Part One '/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-3602428941237023431</id><published>2008-06-27T12:34:00.000-07:00</published><updated>2008-06-27T12:35:54.427-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight</title><content type='html'>is yet another Silverlight assembly with no direct counterpart in the full  framework, but with tons of stuff inside (as evidenced by its size on disc and  by the 21 namespaces!) that makes it the 2nd largest assembly. You can think of  it as the brick that gives Silverlight its WPF UI. Its namespaces come from  various v2.0 and v3.0 desktop assemblies as listed below (and it is in my  opinion a prime candidate for refactoring):&lt;br /&gt;&lt;br /&gt;-System.Net namespace with  WebClient plus 6 related classes comes from the desktop's &lt;em&gt;System.dll&lt;/em&gt;  (!)&lt;br /&gt;&lt;br /&gt;- System.ComponentModel comes from &lt;em&gt;System.dll&lt;/em&gt; (! again) and  is basically the &lt;a href="http://www.danielmoth.com/Blog/2008/05/backgroundworker.html"&gt;BackgroundWorker  implementation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- 5 of its namespaces  (System.Windows.Controls.Primitives, System.Window.Data,  System.Windows.Documents, System.Windows.Resources, System.Windows.Shapes) and  the System.ComponentModel.DesignerProperties class map to the desktop's  &lt;em&gt;PresentationFramework.dll&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;- 3 of its namespaces  (System.Collections.ObjectModel, System.Collections.Specialized,  System.Threading) map to &lt;em&gt;WindowsBase.dll&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;- 2 of its namespaces  (System.Windows.Ink, System.Windows.Media.Imaging) map to the desktop's  &lt;em&gt;PersentationCore.dll&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;- System.Windows namespace has a total of  61 types, coming from homonymous namespaces in &lt;em&gt;PresentationCore.dll&lt;/em&gt;  (e.g. FontStyle, RoutedEventHandler) and &lt;em&gt;PresentationFramework.dll&lt;/em&gt;  (e.g. Application, FrameworkElement) and &lt;em&gt;WindowsBase.dll&lt;/em&gt; (e.g.  DependencyProperty, Point) and also introduces some new types (e.g.  AssemblyPart, ErrorType).&lt;br /&gt;&lt;br /&gt;- System.Windows.Markup namespace with 2 types  from &lt;em&gt;WindowsBase.dll&lt;/em&gt;, 2 from &lt;em&gt;PresentationFramework.dll&lt;/em&gt; and 1  from &lt;em&gt;PresentationCore.dll&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;- System.Windows.Media namespace  which maps to &lt;em&gt;PresentationCore.dll&lt;/em&gt; except for Matrix class from  &lt;em&gt;WindowsBase.dll&lt;/em&gt; and 5 new Silverlight types (MediaElementState,  TimelineMarkerCollection plus 2 relatives and VideoBrush).&lt;br /&gt;&lt;br /&gt;-  System.Windows.Input largely maps to &lt;em&gt;PresentationCore.dll&lt;/em&gt;, except for 2  classes (Key and ModifierKeys) from &lt;em&gt;WindowsBase.dll&lt;/em&gt; and 1 class  (KeyboardNavigationMode) from &lt;em&gt;PresentationFramework.dll&lt;/em&gt;. There is also  one new class in there: StylusInfo.&lt;br /&gt;&lt;br /&gt;- System.Windows.Controls namespace  has 24 types that come from &lt;em&gt;PresentationFramework.dll&lt;/em&gt; (same namespace  name of course). It also has 2 types (MultiScaleImage, MultiScaleSubImage) that  make up the &lt;a href="http://www.danielmoth.com/Blog/2008/03/multiscaleimage-with-mouse-support-ish.html"&gt;DeepZoom  feature&lt;/a&gt;. It also has 3 types (2 from System.Windows.Forms.dll plus 1 brand  new) that make up the &lt;a href="http://www.danielmoth.com/Blog/2008/04/openfiledialog-and-filedialogfileinfo.html"&gt;OpenFileDialog  feature&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- System.IO.IsolatedStorage.ApplicationSettings class has no  counterpart in the desktop world and was &lt;a href="http://www.danielmoth.com/Blog/2008/04/isolatedstorage-in-siverlight-2-beta-1.html"&gt;touched  upon here (scroll to the bottom)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- System.Windows.Interop namespace  with 3 classes (Content, Settings and SilverlightHost) that is all new in  Silverlight framework (even though that namespace name exists in various other  WPF assemblies).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;12.&lt;/strong&gt; and &lt;strong&gt;13.&lt;/strong&gt;  &lt;strong&gt;System.Windows.Controls.dll&lt;/strong&gt; and  &lt;strong&gt;System.Windows.Controls.Extended.dll&lt;/strong&gt;&lt;br /&gt;The overwhelming  majority of the Silverlight controls reside in the System.Windows.Controls.dll  assembly. The Extended.dll adds the Calendar, DatePicker, Slider and  WatermarkedTextBox.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;14.  System.Windows.Controls.Data.dll&lt;/strong&gt;&lt;br /&gt;This adds a control not available  at present in WPF: the Silverlight DataGrid. For all things DataGrid-related&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-3602428941237023431?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/3602428941237023431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=3602428941237023431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/3602428941237023431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/3602428941237023431'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2008/06/silverlight.html' title='Silverlight'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-8760668381360311210</id><published>2008-06-27T12:29:00.000-07:00</published><updated>2008-06-27T12:32:56.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight Example Apps</title><content type='html'>(shows the &lt;a href="http://www.danielmoth.com/Blog/2008/03/multiscaleimage-with-mouse-support-ish.html"&gt;DeepZoom&lt;/a&gt;  feature in a public released site)&lt;br /&gt;&lt;strong&gt;2&lt;/strong&gt;. &lt;a href="http://silverlight.net/samples/2b1/silverlightairlines/run/default.html"&gt;Silverlight  Airlines&lt;/a&gt; (gets you thinking of great user experience for booking a  flight)&lt;br /&gt;&lt;strong&gt;3&lt;/strong&gt;. Cameras (another example of great user experience  for shopping online scenario)&lt;br /&gt;&lt;strong&gt;4&lt;/strong&gt;. &lt;a href="http://silverlight.net/Samples/2b1/ImageSnipper/testpage.html"&gt;Image  Snipper&lt;/a&gt; (shows graphics and interaction you would only expect from a desktop  app)&lt;br /&gt;&lt;strong&gt;5&lt;/strong&gt;. &lt;a href="http://demo.themsteam.com/videopuzzle/"&gt;Video Puzzle&lt;/a&gt; (combination of a  game with video elements)&lt;br /&gt;&lt;br /&gt;...then before jumping into code, it is worth  showing some of the controls that are available and also how they can be skinned  (templated):&lt;br /&gt;&lt;strong&gt;6&lt;/strong&gt;. &lt;a href="http://silverlight.net/Samples/2b1/SilverlightControls/run/default.html"&gt;Control  Demo&lt;/a&gt; (not all of them, but gives you an idea)&lt;br /&gt;&lt;strong&gt;7&lt;/strong&gt;.  Corina's control skins &lt;a href="http://www.corrina_b.members.winisp.net/skins/flat/Testpage.html"&gt;Flat&lt;/a&gt;,  &lt;a href="http://www.corrina_b.members.winisp.net/skins/bubbly/Testpage.html"&gt;Bubbly&lt;/a&gt;,  &lt;a href="http://www.corrina_b.members.winisp.net/skins/red/Testpage.html"&gt;Red&lt;/a&gt;,  &lt;a href="http://www.corrina_b.members.winisp.net/skins/rough/Testpage.html"&gt;Rough&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;...if  you are looking for a sample that combines skinning, the &lt;a href="http://www.danielmoth.com/Blog/2008/04/openfiledialog-and-filedialogfileinfo.html"&gt;OpenFileDialog&lt;/a&gt;,  &lt;a href="http://www.danielmoth.com/Blog/2008/04/isolatedstorage-in-siverlight-2-beta-1.html"&gt;IsolatedStorage&lt;/a&gt;  and also throws in a bit of extensibility, do check this  out:&lt;br /&gt;&lt;strong&gt;8&lt;/strong&gt;. &lt;a href="http://www.scott-mccraw.members.winisp.net/AgCalc/AgCalculator.html"&gt;Calculator&lt;/a&gt;  (get its story from &lt;a href="http://blogs.msdn.com/smccraw/archive/2008/03/26/A-Silverlight-Calculator.aspx"&gt;the  author's blog post&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Finally,&lt;br /&gt;&lt;strong&gt;9&lt;/strong&gt;. a great business  application that is almost indistinguishable from a local client and has only  recently been made available is the &lt;a href="http://www.mscui.net/PatientJourneyDemonstrator/"&gt;Healthcare Demo&lt;/a&gt;  (built in the UK).&lt;br /&gt;&lt;br /&gt;What publically available Silverlight application(s)  float your boat?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-8760668381360311210?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/8760668381360311210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=8760668381360311210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8760668381360311210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8760668381360311210'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2008/06/silverlight-example-apps.html' title='Silverlight Example Apps'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-8026290784907941422</id><published>2007-12-20T06:36:00.000-08:00</published><updated>2007-12-20T06:39:57.232-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Supporting Full Screen Mode with Silverlight</title><content type='html'>One of the nice features that Silverlight supports is the ability to go "full screen" and effectively take over the entire screen of a computer (hiding everything else from sight - including the browser frame).  This can be very useful when building immersive UI experiences, games, rich video players, etc.&lt;br /&gt;For a nice example of this feature in action, make sure to check out the &lt;a href="http://silverlight.net/fox/" target="_blank"&gt;Fox Movies Sample&lt;/a&gt; on &lt;a href="http://www.silverlight.net:/"&gt;www.silverlight.net:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once the page loads and the movie starts playing, double-click on the video surface in the middle to switch into full-screen mode (note: the screen-shot above is not in full-screen but rather browser mode).  You can then hit the escape key to switch back into normal browser viewing.&lt;br /&gt;How to Implement Full Screen Mode with Silverlight 1.1 using .NET&lt;br /&gt;One of the questions I've seen a few people ask is "how can you implement full screen-mode when building Silverlight applications using .NET?"  The good news is that the answer is actually pretty easy:&lt;br /&gt;1) First add an input driven event handler to your application (for example: a mouse down or keyboard event handler).  For security reasons Silverlight doesn't allow developers to switch an application into full-screen mode on first application load (you don't want an application to spoof you).  So you'll instead need to trigger full-screen mode in response to a user action.&lt;br /&gt;2) Within your input event handler set the BrowserHost.IsFullScreen property to true (note: the BrowserHost class lives within the System.Windows.Interop namespace).  This will cause Silverlight to switch into full screen mode.  Setting this property to false will return it back to normal browser mode.&lt;br /&gt;Simple Full Screen Mode Sample&lt;br /&gt;You can download a simple Silverlight full screen-mode sample I put together written in C# &lt;a href="http://www.scottgu.com/blogposts/silverlight/three/fullscreen.zip" target="_blank"&gt;here&lt;/a&gt;. &lt;br /&gt;When you run the sample it will load a super simple Silverlight application within the browser and display a text message prompting you to click it to switch into full-screen mode:&lt;br /&gt;&lt;br /&gt;When you switch into full-screen mode, Silverlight will display a user message blurb that will pop-up on the screen for a few seconds and instruct the user that they can press the escape key to switch back into browser mode.  After a few seconds this message will disappear and only your content will be visible.  In my sample above I also allow the user to click on the "Click to Return to Browser" text and switch back into browser mode as well.&lt;br /&gt;Walkthrough the Simple Full Screen Mode Code&lt;br /&gt;The code to implement the above sample is pretty simple. &lt;br /&gt;To begin with we can open and edit the root .XAML file for the application, and add a UI element to it that we want to use to trigger the full-screen mode.  In the sample above I used a &lt;textblock&gt; control that I named "MyMessage".  Below is all of the XAML for the entire application:&lt;br /&gt;&lt;br /&gt;Within the application's Page_Loaded() event handler above I am wiring up two event handlers: &lt;br /&gt;MyMessage_MouseLeftButtonDown - This event handler will execute anytime a user clicks on the TextBlock message control I added into my XAML file.  Within this event handler I'm simply toggling the BrowserHost.IsFullScreen property to true or false depending on whether or not it is already in full screen mode.&lt;br /&gt;BrowserHost_FullScreenChange - This event handler will execute anytime Silverlight switches between full screen and browser mode.  It provides a good place to add logic to update the UI when this happens.  In the example above I am changing the text on the TextBlock control.  I could also have optionally resized controls and/or moved them around the screen to new coordinate positions. Currently the Silverlight 1.1 Alpha doesn't have layout manager support, so controls won't automatically re-position unless you write code to manage this yourself (don't worry - layout manager controls for Silverlight like in the desktop WPF version are coming). &lt;br /&gt;In addition to the IsFullScreen property, BrowserHost class has a number of additional properties and events that are very useful:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-8026290784907941422?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/8026290784907941422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=8026290784907941422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8026290784907941422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8026290784907941422'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/supporting-full-screen-mode-with.html' title='Supporting Full Screen Mode with Silverlight'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-7448389386028791383</id><published>2007-12-20T06:29:00.000-08:00</published><updated>2007-12-20T06:31:54.443-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight Tutorial - Color Animations</title><content type='html'>In this tutorial, I'm going to show you how to use Silverlight's Storyboard and ColorAnimation XAML tags to create custom color animations. Color animations are commonly used on input controls like buttons to give visual feedback that the cursor is over the control or when the button has been pressed. This tutorial will show a couple of simple examples that can easily be extended to complex controls and animations.&lt;br /&gt;&lt;br /&gt;The examples in this post were built using Visual Studio 2008 beta 2, Silverlight 1.1 Alpha Refresh, and C#. For information on where to download these, please visit our previous tutorial Getting Started With Silverlight.&lt;br /&gt;&lt;br /&gt;We'll start by defining the XAML for the rectangle.&lt;br /&gt;&lt;rectangle name="'myRectangle'" fill="'#FF0000'" width="'120'" height="'44'" mouseenter="'MyRectangleMouseEnter'" mouseleave="'MyRectangleMouseLeave'"&gt;&lt;br /&gt;Here we've defined a very simple red rectangle. Since we want the color to change when the user enters or leaves the control with the cursor, we've defined event handlers for each of these. The code inside these event handlers is located in the C# code behind and will be explained a little later. Now that we have the rectangle defined, let's create an animation to change the color of the rectangle when the user enters it with the mouse cursor.&lt;br /&gt;&lt;canvas.resources&gt;   &lt;storyboard name="mouseEnter"&gt;       &lt;coloranimation duration="'00:00:01'" to="'#000000'" targetname="'myRectangle'" targetproperty="              '(Shape.Fill).(SolidColorBrush.Color)'"&gt;   &lt;/storyboard&gt;&lt;/Canvas.Resources&gt;&lt;br /&gt;The first thing you might notice here is the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb404764.aspx"&gt;&lt;canvas.resources&gt;&lt;/a&gt; tag. This tag holds a collection of Storyboards and is located directly after the opening Canvas tag. Inside this tag is where we'll be placing the Storyboards that will control our color animations. The first Storyboard we're going to make will change the color of the rectangle when the user enters the control with the mouse. In order to control the Storyboard from the C# code-behind, you'll have to first give it a name. I named mine "mouseEnter". Next we add a &lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.media.animation.coloranimation.aspx"&gt;ColorAnimation&lt;/a&gt; inside the Storyboard. The first attribute we set is Duration, which is how long the animation will run - in this case, 1 second. Next, we set the end result of the animation. I want my rectangle to fade from red to black, so I set To to "#000000". The next thing we set is the Storyboard.TargetName, which is the name of the object we want to modify. This has to be set to the same thing that we named the rectangle, in this case "myRectangle". Storyboard.TargetProperty is the property the animation will be changing, which in this case is the fill color. It might seem like a complicated way to address the rectangle's fill color, but it's necessary. If we expanded out the rectangle to use a SolidColorBrush it might make a little more sense:&lt;br /&gt;&lt;rectangle name="'myRectangle'" width="'120'" height="'44'" mouseenter="'MyRectangleMouseEnter'" mouseleave="'MyRectangleMouseLeave'"&gt;   &lt;rectangle.fill&gt;      &lt;solidcolorbrush color="'#FF0000'"&gt;   &lt;/Rectangle.Fill&gt;&lt;/rectangle&gt;&lt;br /&gt;So in the attribute &lt;storyboard.targetproperty&gt;, "(Shape.Fill)" refers to &lt;rentagle.fill&gt; and "(SolidColorBrush.Color)" is the Color attribute of &lt;solidcolorbrush&gt;. All right, the storyboard and animation are done and ready to be run. Let's create some C# code that will handle the events.&lt;br /&gt;private void MyRectangleMouseEnter(object sender, EventArgs e){  this.mouseEnter.Begin();}&lt;br /&gt;If you remember, we added a MouseEnter event to our XAML code and told it to execute the method MyRectangleMouseEnter. All this function does is to start the Storyboard we named "mouseEnter". If you build and preview your project, you should get something that looks like the following:&lt;br /&gt;If you ask me, that's not very interesting. Let's add in the XAML code to make the rectangle fade back to red when the mouse leaves the control.&lt;br /&gt;&lt;canvas.resources&gt;  &lt;storyboard name="mouseEnter"&gt;    &lt;coloranimation duration="'00:00:01'" to="'#000000'" targetname="'myRectangle'" targetproperty="           '(Shape.Fill).(SolidColorBrush.Color)'"&gt;  &lt;/storyboard&gt;  &lt;storyboard name="'mouseLeave'"&gt;    &lt;coloranimation duration="'00:00:01'" to="'#FF0000'" targetname="'myRectangle'" targetproperty="           '(Shape.Fill).(SolidColorBrush.Color)'"&gt;  &lt;/storyboard&gt;&lt;/Canvas.Resources&gt;&lt;br /&gt;To make the rectangle fade back to red, I simply added another Storyboard to the canvas resources. The only thing different from the previous ColorAnimation is that To is now set to red (#FF0000), instead of black (#000000). Just like with the previous storyboard, we'll going to need some C# code to run the animation. This time, the function is hooked up to the rectangle's MouseLeave event.&lt;br /&gt;private void MyRectangleMouseLeave(object sender, EventArgs e){  this.mouseLeave.Begin();}&lt;br /&gt;That's it. Now we have a rectangle that fades to black when the mouse enters it and fades back to red when the mouse leaves.&lt;br /&gt;We've only barely touched the surface for the possibilities of what a color animation is capable of - but hopefully this tutorial will provide you with a launching point for your own complex (and much more interesting) animations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-7448389386028791383?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/7448389386028791383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=7448389386028791383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/7448389386028791383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/7448389386028791383'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/silverlight-tutorial-color-animations.html' title='Silverlight Tutorial - Color Animations'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-4452578899596932618</id><published>2007-12-20T06:24:00.000-08:00</published><updated>2007-12-20T06:28:03.058-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight and Javascript Interaction</title><content type='html'>Silverlight is a relatively new client side technology released by Microsoft, but already people are finding the need to communicate between their Silverlight applications and Javascript. This tutorial will go through all the code required to call Javascript functions from Silverlight and vice-versa.&lt;br /&gt;All the Silverlight code and examples were created using the 1.1 Alpha Refresh. Before you can use the example application below, you'll need to &lt;a href="http://msdn2.microsoft.com/en-us/silverlight/bb419317.aspx"&gt;download the runtime&lt;/a&gt; (if you haven't already). If you're new to Silverlight, check out our introductory tutorial for information on what to download and how to get started.&lt;br /&gt;&lt;br /&gt;Before we jump into code, let's look at an example of some communication between Silverlight and Javascript. The application on the left was created using Silverlight, the one on the right was made using HTML and CSS. When one of the buttons on the left is clicked, a message will be displayed on the right indicating that. The same thing happens when a button on the right is clicked.&lt;br /&gt;&lt;br /&gt;So let's see how something like this is done. We'll start with the hard one - calling a Javascript function from Silverlight. There's no direct way (that I know of) to simply call a Javascript function directly from the Silverlight code behind. What we have to do is create events and attach to them from the Javascript code. This isn't a lot of work, but being able to call them directly would be a nice feature to have. So let's look at some&lt;strong&gt; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;C# code behind that creates the events. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;using System;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Browser;namespace SilverlightJavascript{    [Scriptable]    public partial class Page : Canvas    {        [Scriptable]        public event EventHandler ButtonAClicked;        [Scriptable]        public event EventHandler ButtonBClicked;        [Scriptable]        public event EventHandler ButtonCClicked;        public void Page_Loaded(object o, EventArgs e)        {            // Required to initialize variables            InitializeComponent();            WebApplication.Current.RegisterScriptableObject(               "SilverlightApp", this);        }    }}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&lt;/span&gt;&lt;br /&gt;Since my Silverlight application has three buttons, I created three events - one for each button. They're created and used exactly like they are in an ordinary C# Windows application. One difference I'm sure you noticed is the [Scriptable] attribute above the definition of the class and each event. This lets Silverlight know that this class and these events should be accessible from the Javascript code. The next thing you might have noticed is the RegisterScriptableObject call. With this function we're telling Silverlight to make this class accessible via scripts by the name "SilverlightApp". Now whenever I want to use this object in Javascript, I'll reference it by the name "SilverlightApp". We'll see how this works later. Now that everything is setup, let's look at &lt;strong&gt;some C# code to fire our newly created events.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;void ButtonA(object sender, MouseEventArgs e){    if (ButtonAClicked != null)        ButtonAClicked(this, e);}void ButtonB(object sender, MouseEventArgs e){    if (ButtonBClicked != null)        ButtonBClicked(this, e);}void ButtonC(object sender, MouseEventArgs e){    if (ButtonCClicked != null)        ButtonCClicked(this, e);}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&lt;/span&gt;&lt;br /&gt;In my XAML code I hooked up a MouseLeftButtonUp event to each of my buttons. Now when a button is clicked, one of these functions will be called. As you can see, firing the events is no different than a C# application. You should always make sure to check that an event is not null before firing it - otherwise things tend to crash. An event will be null if nothing has attached to it. That's all the code required on the Silverlight side to call Javascript functions. Now let's look at how to make Javascript listen for these events. The first thing we need to do is attach Javascript functions to each event. We'll do this as soon as the Silverlight application is done loading. So now you're probably wondering, how do we know when the Silverlight is done loading? There's an event we can listen for that is called as soon as it's finished. In order to get this event we need to modify the Javascript that Visual Studio generated as part of the test code. In my solution, the .js file is named TestPage.html.js. It might be different for you depending on how you set it up.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;// JScript source code//&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#ffcc00;"&gt;contains calls to silverlight.js, example below loads Page.xamlfunction createSilverlight(){  Silverlight.createObjectEx({        source: "Page.xaml",        parentElement: document.getElementById(                "SilverlightControlHost"),        id: "SilverlightControl",        properties: {                width: "100%",                height: "100%",                version: "1.1",                enableHtmlAccess: "true"        },        events: {onLoad: OnLoaded}  });         // Give the keyboard focus to the Silverlight   // control by default  document.body.onload = function()   {    var silverlightControl =          document.getElementById('SilverlightControl');    if (silverlightControl)      silverlightControl.focus();  }}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffcc00;"&gt;&lt;/span&gt;&lt;br /&gt;This should look very similar to what Visual Studio has created for you. The addition we have to make is in the events: {} section. We need to add an event for onLoad. With this addition, we're telling Silverlight to call the Javascript function OnLoaded as soon as it's finished loading. The OnLoaded function is where we're going to be attaching Javascript functions to our Silverlight events. So let's see how that's done.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;function OnLoaded(sender, args)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;{  &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt; sender.Content.SilverlightApp.ButtonAClicked = ButtonAClicked;   sender.Content.SilverlightApp.ButtonBClicked = ButtonBClicked;   sender.Content.SilverlightApp.ButtonCClicked = ButtonCClicked;}function ButtonAClicked(){&lt;/span&gt;  &lt;span style="color:#33ff33;"&gt; //The Silverlight A button has been clicked&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;function ButtonBClicked(){   //The Silverlight B button has been clicked }function ButtonCClicked(){&lt;/span&gt;  &lt;br /&gt;&lt;span style="color:#33ff33;"&gt;//The Silverlight C button has been clicked&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&lt;/span&gt;&lt;br /&gt;The OnLoaded event is automatically passed in the Silverlight object and some event arguments. Here's where we use the "SilverlightApp" name we created above. With those assignments, we're telling Silverlight to execute a Javascript function whenever one of those events is fired. So now, whenever the event ButtonAClicked is fired from the Silverlight Application, the Javascript function ButtonAClicked will be executed. That's it for calling Javascript functions from Silverlight. Now let's look at how to call Silverlight functions from Javascript. This process is much easier than calling Javascript from Silverlight. The first thing we need is a C# function we want called.&lt;br /&gt;&lt;strong&gt; Let's add one to our Silverlight code behind.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;Scriptable]public void HTMLButtonAClicked(){    //The HTML A button has been clicked}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&lt;/span&gt;&lt;br /&gt;There nothing special about this function except for the [Scriptable] attribute which makes it accessible by our Javascript code. All that's left is to call this function from the Javascript code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;var slApp = document.getElementById('SilverlightControl');slApp.Content.SilverlightApp.HTMLButtonAClicked();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see, this is much easier than the other way around. The first thing we need to do is get the Silverlight object. You're probably wondering where the "SilverlightControl" id came from which is passed into getElementById. This is set back in the .js file that Visual Studio created for you. All that's left to do is access the class we named "SilverlightApp" and call the HTMLButtonAClicked function. Once that's done, the function we wrote in the C# code behind will be executed. I hoped you enjoyed this tutorial on Silverlight and Javascript interaction. Post a comment if you have any questions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-4452578899596932618?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/4452578899596932618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=4452578899596932618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4452578899596932618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4452578899596932618'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/silverlight-and-javascript-interaction.html' title='Silverlight and Javascript Interaction'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-8477410264857560030</id><published>2007-12-20T06:18:00.000-08:00</published><updated>2007-12-20T06:22:29.280-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Communicate Between Flex and Silverlight using Javascript</title><content type='html'>&lt;a href="http://bp2.blogger.com/_rgjNx_TA-F4/R2p6ec3N6dI/AAAAAAAAAAs/XnxJa8SX-zU/s1600-h/silverlight_icon.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5146060187786668498" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://bp2.blogger.com/_rgjNx_TA-F4/R2p6ec3N6dI/AAAAAAAAAAs/XnxJa8SX-zU/s320/silverlight_icon.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div align="left"&gt;If Flex can communicate with Javascript and Silverlight can communicate with Javascript, it seems like there should be some sort of transitive rule that lets Flex communicate with Silverlight. Well there is, and this tutorial is going to show you how to use Javascript to communicate directly between a Flex application and a Silverlight application.&lt;br /&gt;You're probably asking yourself, why would I ever want to do that? To be honest, we haven't thought of a great reason yet. Maybe Silverlight can do something Flex can't, or Flex has a feature Silverlight doesn't, and you want combine both into one all-powerful web page. Well now you can. &lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;Depending on whether or not you have all the required plugins installed, you should see an example of Flex/Silverlight communication on the right. The sliders on the top and left were created using Flex. The sphere in the middle was created using Silverlight. When you drag the sliders, the sphere will roll around accordingly. You can also click and drag the sphere, which will move the sliders.&lt;br /&gt;If you can't see the above example, it either means you don't have Flash 9 or the Silverlight 1.1 Alpha Refresh Runtime.&lt;br /&gt;This tutorial isn't going to go into the specifics of how Silverlight and Flex communication with Javascript. For detailed information on how to accomplish that, check out our previous two tutorials: Silverlight and Javascript Interaction and Flex &amp;amp; Javascript Tutorial - Simple Interaction.&lt;br /&gt;&lt;strong&gt;We'll start by looking at what happens when one of the sliders is moved. &lt;/strong&gt;&lt;/div&gt;&lt;strong&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;span style="color:#ffcc00;"&gt;function MoveBallX(val){ var silverlightControl = document.getElementById('SilverlightControl'); silverlightControl.Content.SilverlightApp.MoveBallX(val);}&lt;br /&gt;function MoveBallY(val){ var silverlightControl = document.getElementById('SilverlightControl'); silverlightControl.Content.SilverlightApp.MoveBallY(val);}&lt;/span&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;When the horizontal slider is moved, the Flex application calls the Javascript function MoveBallX and passes in the current value of the slider. This function then calls the C# function MoveBallX in the Silverlight application. Silverlight then positions the ball to the new X position. The same thing happens when the vertical slider is moved, but now MoveBallY is called. That is all the Javascript code required to move the sphere when one of the Flex sliders is moved.&lt;br /&gt;Now let's look at what happens when the drags the sphere. &lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;span style="color:#ffcc00;"&gt;function xChanged(){ var silverlightControl = document.getElementById('SilverlightControl'); xPos = silverlightControl .Content.SilverlightApp.GetXValue(); getFlexApp('HorizontalSilverlightMover').setXValue(val);}&lt;br /&gt;function yChanged(){ var silverlightControl = document.getElementById('SilverlightControl'); yPos = silverlightControl.Content.SilverlightApp.GetYValue(); getFlexApp('VerticalSilverlightMover').setYValue(val);}&lt;br /&gt;function getFlexApp(appName) { if (navigator.appName.indexOf ("Microsoft") !=-1) { return window[appName]; } else { return document[appName]; }}&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;div align="left"&gt;Again, there's not a lot of Javascript code required to keep the two applications synchronized. The functions xChanged and yChanged are hooked up to events in the Silverlight application and are called whenever a user moves the ball in either the X or Y direction. The first thing these functions do is get the new position from the Silverlight application by calling either GetXValue or GetYValue. It then simply calls setXValue or setYValue to set the horizontal or vertical slider to its new position. The function getFlexApp is explained in details in the earlier Flex and Javascript tutorial, but it basically acquires a reference to the Flex application depending on what type of browser is currently being used. &lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;As you can see, the actual code to do Flex/Silverlight communication is very simple. This tutorial was meant to let everyone know that the possibility existed. As a reminder, please refer to Silverlight and Javascript Interaction for detailed information on how to communicate between Silverlight and Javascript. Also refer to Flex &amp;amp; Javascript Tutorial - Simple Interaction for information on how to communicate between Flex and Javascript. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-8477410264857560030?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/8477410264857560030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=8477410264857560030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8477410264857560030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/8477410264857560030'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/communicate-between-flex-and.html' title='Communicate Between Flex and Silverlight using Javascript'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_rgjNx_TA-F4/R2p6ec3N6dI/AAAAAAAAAAs/XnxJa8SX-zU/s72-c/silverlight_icon.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-4817798108468355028</id><published>2007-12-20T06:14:00.000-08:00</published><updated>2007-12-20T06:17:51.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>How To Embed Silverlight Into a Webpage</title><content type='html'>&lt;span style="font-family:arial;"&gt;Since we've started posting Silverlight tutorials, I've had to figure out how to get Silverlight applications embedded into our blog. Needless to say, I found the process a lot harder than it should be. Visual Studio provides a test page as part of a default Silverlight project, but what if you want to take the Silverlight application and put it in a blog post like we do? This tutorial will go through all code changes, files needed, and new code required to easily embed your Silverlight apps into existing webpages. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;If you're new to Silverlight, I would strongly recommend reading our earlier tutorial, Getting Started With Silverlight. All of the examples in this tutorial were created using Visual Studio 2008 beta 2 and Silverlight 1.1 Alpha Refresh. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Required Files&lt;/strong&gt;&lt;br /&gt;Let's start by figuring out what files are needed for a Silverlight application. When you create a new Silverlight project with Visual Studio, it creates all sorts of files - most of which aren't needed to display Silverlight. At a minimum, the only two files you'll need are the XAML file and your code behind file. I use C# for my code behind so I'll have a DLL. If you used Javascript, you'll have a JS file. When you build the Silverlight project, Visual Studio is going to put the the code behind in a folder named "ClientBin" inside your project directory.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Javascript&lt;/strong&gt;&lt;br /&gt;Javascript makes up the bulk of getting Silverlight into a webpage. You'll notice that Visual Studio also outputs a file named "Silverlight.js". You only need one of these files for each webpage - even if you have multiple Silverlight apps on a single page. You'll want to put this in a script tag somewhere in your webpage - preferably up in the head. If you don't have access to the head tag - like in a blog post - just stick the script tag at the top of the post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&amp;lt;script type="text/javascript" src="Silverlight.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The other Javascript file Visual Studio makes for you is the one for the test page. We don't need everything in there, so let's just strip out the function that matters.&lt;br /&gt;&lt;br /&gt;function createSilverlight(){   Silverlight.createObjectEx({      source: "Page.xaml",      parentElement:          document.getElementById("SilverlightControlHost"),      id: "SilverlightControl",      properties: {         width: "100%",         height: "100%",         version: "1.1",         enableHtmlAccess: "true" },      events: {} });}This function will only work for one Silverlight control per page, so let's modify it to work for multiple applications.&lt;br /&gt;function createSilverlight(source, parent, id){   Silverlight.createObjectEx({      source: source,      parentElement:          document.getElementById(parent),      id: id,      properties: {         width: "100%",         height: "100%",         version: "1.1",         enableHtmlAccess: "true" },      events: {} });}&lt;br /&gt;&lt;br /&gt;Now the source, parentElement, and id are passed in as parameters instead of being hard coded inside the function.&lt;br /&gt;&lt;br /&gt;Modify the XAMLDepending on where you're putting your files, you might have to modify the XAML file to point to the correct location of the code behind file. The default page.xaml file that &lt;strong&gt;Visual Studio generates will look something similar to this.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&amp;lt;Canvas x:Name="parentCanvas"        xmlns="&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/client/2007"&gt;&lt;span style="color:#ffff00;"&gt;http://schemas.microsoft.com/client/2007&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#ffff00;"&gt;"         xmlns:x="&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;&lt;span style="color:#ffff00;"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#ffff00;"&gt;"         Loaded="Page_Loaded"         x:Class="EmbedSilverlight.Page;           assembly=ClientBin/EmbedSilverlight.dll"        Width="640"        Height="480"        Background="White"       &amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The part of this that probably needs modified is x:Class. The assembly portion of x:Class will need to changed to point to wherever you put the code behind on your webserver. Remember, this path is relative to the location of the parent webpage and not the location of the XAML file.&lt;br /&gt;The HTMLWe've got the necessary files, the Javascript, and we've made the change to our XAML file. We are now ready to create some HTML code to actually display our Silverlight applications. I'm going to reuse a small Silverlight app that was created for an earlier tutorial.&lt;br /&gt;In order to embed Silverlight into a website, we first need a parent element to stick it in - a div. &lt;strong&gt;Each parent element will need a unique id.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&amp;lt;div id="Example1Host" style="width:120px;height:44px;"&amp;gt;   &amp;lt;script type="text/javascript"&amp;gt;      createSilverlight("/pathToSilverlight/Page.xaml",          "Example1Host", "Example1");   &amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;Here's the output of the above HTML code using my example application.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;So what if you want two of these? All you need to do is duplicate the above code, but with a different id.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff00;"&gt;&amp;lt;div id="Example1Host" style="width:120px;height:44px;"&amp;gt;   &amp;lt;script type="text/javascript"&amp;gt;      createSilverlight("/pathToSilverlight/Page.xaml",          "Example1Host", "Example1");   &amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div id="Example2Host" style="width:120px;height:44px;"&amp;gt;   &amp;lt;script type="text/javascript"&amp;gt;      createSilverlight("/pathToSilverlight/Page.xaml",          "Example2Host", "Example2");   &amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-4817798108468355028?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/4817798108468355028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=4817798108468355028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4817798108468355028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4817798108468355028'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/how-to-embed-silverlight-into-webpage.html' title='How To Embed Silverlight Into a Webpage'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-4696022072528046180</id><published>2007-12-20T06:09:00.000-08:00</published><updated>2007-12-20T06:14:17.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>Silverlight Tutorial - Animating HTML Elements</title><content type='html'>&lt;a href="http://bp0.blogger.com/_rgjNx_TA-F4/R2p4O83N6cI/AAAAAAAAAAk/uhbeTNDx9yA/s1600-h/silverlight_icon.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5146057722475440578" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://bp0.blogger.com/_rgjNx_TA-F4/R2p4O83N6cI/AAAAAAAAAAk/uhbeTNDx9yA/s320/silverlight_icon.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;Animation! And more animation! We sure do seem to love animation here at Switch On The Code - and really, I have no idea why. But as long as we keep coming up with cool concepts that deal with animation, we will continue to write about them. Today we are going to take a look at something a little bit weird - we are going to animate HTML elements using Silverlight. Thats right, you read that correctly - HTML elements, the stuff you would normally animate with some plain old javascript - perhaps even the &lt;/span&gt;&lt;span style="font-family:arial;"&gt;Generic Animation&lt;/span&gt;&lt;span style="font-family:arial;"&gt; javascript code. Why would you want to do this? I don't have any good reasons at the moment. But it does show off some of the capabilities of silverlight, and that is a good enough reason to write about it.&lt;br /&gt;One thing to note before we get started - you will need the &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=88986&amp;amp;clcid=0x409"&gt;&lt;span style="font-family:arial;"&gt;Silverlight 1.1 Alpha Refresh&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; in order for the examples on this page to work. If you don't have it installed, you probably won't see any notification of that fact. This is because, unlike most silverlight apps, the silverlight on this page has no display - so there is no place for the usual "Get Silverlight" image and link to appear. So if the examples on this page fail to work, I would suggest checking out some of our other silverlight tutorials to make sure that your silverlight 1.1 install is working. So below we have the classic animation example that we use here at Switch On The Code. This time, however, the "Go!" button is not hooked to a javascript function, it is hooked to an function in the silverlight code-behind. And if you set some values in the text boxes and click "Go!", silverlight will move and resize the red box to the values given in the given amount of time.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-4696022072528046180?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/4696022072528046180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=4696022072528046180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4696022072528046180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/4696022072528046180'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/silverlight-tutorial-animating-html.html' title='Silverlight Tutorial - Animating HTML Elements'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_rgjNx_TA-F4/R2p4O83N6cI/AAAAAAAAAAk/uhbeTNDx9yA/s72-c/silverlight_icon.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5977036694848637865.post-3224168311762659605</id><published>2007-12-20T05:46:00.000-08:00</published><updated>2007-12-20T05:49:12.736-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sliverlight Examples'/><title type='text'>How to Use Custom User Controls in Silverlight</title><content type='html'>&lt;span style="font-family:arial;"&gt;Since Microsoft hasn't released an official library of controls for Silverlight, making and using your own is very important. This tutorial is going to show you how to import and add a custom control to your Silverlight application.&lt;br /&gt;&lt;br /&gt;The code and examples in this post have been written using Silverlight 1.1 Alpha. This tutorial won't cover how to make user controls - just how to use them. Just like a classic cooking show, I've prepared a user control earlier that we'll be using. I've created a replica of the default Windows XP WPF button. The DLL that holds this control can be downloaded &lt;/span&gt;&lt;span style="font-family:arial;"&gt;here&lt;/span&gt;&lt;span style="font-family:arial;"&gt; - feel free to use the button for whatever you want. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;Let's start by adding the button using nothing but XAML. The first thing we need to do is get the namespace into the XAML code.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ffff33;"&gt;&amp;lt;Canvas x:Name="parentCanvas"   xmlns="&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/client/2007"&gt;&lt;span style="color:#ffff33;"&gt;http://schemas.microsoft.com/client/2007&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#ffff33;"&gt;"   xmlns:x="&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;&lt;span style="color:#ffff33;"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#ffff33;"&gt;"   xmlns:controls="clr-namespace:SOTCSilverlightControls;      assembly=ClientBin/SOTCSilverlightControls.dll"   Loaded="Page_Loaded"   x:Class="SilverlightControlsTestApp.Page;      assembly=ClientBin/SilverlightControlsTestApp.dll"   Width="640"   Height="480"   Background="White"  &amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffff33;"&gt;&lt;/span&gt;&lt;br /&gt;This is the code from a default Silverlight application. I've added the following attribute to the canvas, which will let us reference the DLL containing our user controls.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#66ff99;"&gt;xmlns:controls="clr-namespace:SOTCSilverlightControls;   assembly=ClientBin/SOTCSilverlightControls.dll"&lt;/span&gt;&lt;br /&gt;What you put after "xmlns", in this case "controls", is what you will use to reference the namespace. This can be anything you want (as long as it doesn't already exist).&lt;br /&gt;The only control in that assembly is a Button, so let's put one of those on our canvas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5977036694848637865-3224168311762659605?l=silverlightexample.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlightexample.blogspot.com/feeds/3224168311762659605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5977036694848637865&amp;postID=3224168311762659605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/3224168311762659605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5977036694848637865/posts/default/3224168311762659605'/><link rel='alternate' type='text/html' href='http://silverlightexample.blogspot.com/2007/12/how-to-use-custom-user-controls-in.html' title='How to Use Custom User Controls in Silverlight'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
