<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Did You Know... That You Can Create A Timer Using XAML Animation?</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx</link><description>To do so, create a Storyboard and mark that you will handle the Completed event. &amp;lt;Storyboard Completed=&amp;quot;OnTimerCompleted&amp;quot;&amp;gt; Put in the simplest Animation you can manage (name it, so that you can set the duration programmatically). &amp;lt;DoubleAnimation</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Sample Code: Silverlight 1.0-enabled Quiz</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#37677</link><pubDate>Sun, 16 Mar 2008 07:59:24 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:37677</guid><dc:creator>&lt;nick:node&gt;</dc:creator><description>&lt;p&gt;A Customer who asked if a quiz-type application can be enabled by Silverlight. The answer is yes (obviously&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=37677" width="1" height="1"&gt;</description></item><item><title>Silverlight Cream for December 11, 2007 - 2 -- #151</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23334</link><pubDate>Wed, 12 Dec 2007 05:30:54 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23334</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;First of two-parts of Cream I&amp;amp;#39;ve found in my blog-reading: Koen of FirsFloor demonstrates a Slideshow&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23334" width="1" height="1"&gt;</description></item><item><title>Thoughts on Silverlight &amp;raquo; BIT-101 Blog</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23305</link><pubDate>Tue, 11 Dec 2007 23:30:34 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23305</guid><dc:creator>Thoughts on Silverlight » BIT-101 Blog</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Thoughts on Silverlight &amp;amp;raquo; BIT-101 Blog&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23305" width="1" height="1"&gt;</description></item><item><title>Del.icio.us Links for 12/11/2007</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23236</link><pubDate>Tue, 11 Dec 2007 11:41:39 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23236</guid><dc:creator>Frank La Vigne</dc:creator><description>&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23236" width="1" height="1"&gt;</description></item><item><title>Del.icio.us Links for 12/10/2007</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23145</link><pubDate>Mon, 10 Dec 2007 15:56:12 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23145</guid><dc:creator>Frank La Vigne</dc:creator><description>&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23145" width="1" height="1"&gt;</description></item><item><title>re: Did You Know... That You Can Create A Timer Using XAML Animation?</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23073</link><pubDate>Mon, 10 Dec 2007 02:07:55 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23073</guid><dc:creator>jesseliberty</dc:creator><description>&lt;p&gt;Much Simpler!! Thank you Bill Reiss....&lt;/p&gt;
&lt;p&gt;Here's the much simplified code:&lt;/p&gt;
&lt;p&gt;&amp;lt;Canvas xmlns=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/client/2007&amp;quot;"&gt;schemas.microsoft.com/.../2007&amp;quot;&lt;/a&gt; xmlns:x=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&amp;gt;"&gt;schemas.microsoft.com/.../xaml&amp;quot;&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Canvas.Resources&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Storyboard x:Name=&amp;quot;myTimer&amp;quot; Completed=&amp;quot;OnTimerCompleted&amp;quot; Duration=&amp;quot;00:00:01.00&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Canvas.Resources&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/Canvas&amp;gt;&lt;/p&gt;
&lt;p&gt;The Javascript then becomes...&lt;/p&gt;
&lt;p&gt;MyDemo.Scene.prototype =&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; handleLoad: function(plugIn, userContext, rootElement) &lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// set the timer duration&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer = plugIn.content.findName(&amp;quot;myTimer&amp;quot;); 	&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer.Duration=&amp;quot;00:00:05.00&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;timer.begin();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;function OnTimerCompleted(sender, args)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;alert (&amp;quot;Timer completed!&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;myStoryboard = sender.findName(&amp;quot;myTimer&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;myStoryboard.begin();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23073" width="1" height="1"&gt;</description></item><item><title>re: Did You Know... That You Can Create A Timer Using XAML Animation?</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23071</link><pubDate>Mon, 10 Dec 2007 01:37:25 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23071</guid><dc:creator>gjhdigital</dc:creator><description>&lt;p&gt;how can I take the seconds value and update a textblock with the current second on each passing second?&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23071" width="1" height="1"&gt;</description></item><item><title>Did You Know... That You Can Create A Timer Using XAML Animation?</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23065</link><pubDate>Sun, 09 Dec 2007 23:22:43 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23065</guid><dc:creator>Test</dc:creator><description>&lt;p&gt;To do so, create a Storyboard and mark that you will handle the Completed event. &amp;amp;lt;Storyboard Completed=&amp;amp;quot;OnTimerCompleted&amp;amp;quot;&amp;amp;gt;&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23065" width="1" height="1"&gt;</description></item><item><title>re: Did You Know... That You Can Create A Timer Using XAML Animation?</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23064</link><pubDate>Sun, 09 Dec 2007 23:05:10 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23064</guid><dc:creator>Bill Reiss</dc:creator><description>&lt;p&gt;FYI...you can put the Duration on the Storyboard and not even have a dummy DoubleAnimation child node.&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23064" width="1" height="1"&gt;</description></item><item><title>Did You Know... That You Can Create A Timer Using XAML Animation? - Jesse Liberty - Silverlight Geek</title><link>http://blogs.silverlight.net/blogs/jesseliberty/archive/2007/12/09/did-you-know-that-you-can-create-a-timer-using-xaml-animation.aspx#23061</link><pubDate>Sun, 09 Dec 2007 21:56:46 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:23061</guid><dc:creator>Did You Know... That You Can Create A Timer Using XAML Animation? - Jesse Liberty - Silverlight Geek</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Did You Know... That You Can Create A Timer Using XAML Animation? - Jesse Liberty - Silverlight Geek&lt;/p&gt;
&lt;img src="http://blogs.silverlight.net/aggbug.aspx?PostID=23061" width="1" height="1"&gt;</description></item></channel></rss>