Countdown to Visual Studio 2010

In anticipation of the launch of Visual Studio 2010 next March, I wanted to have some bling on my blog counting down the days ‘til the launch. The Visual Studio folks put together an HTML/CSS/JS widget that looked pretty cool, but was fixed  width, and wouldn’t fit the somewhat narrow sidebar on my blog.

imageSo I decided to create my own version in Silverlight. I wanted to have something with an old-school digital clock face (as in drop-down numbers), so I did a Bing search for “flip,” “clock,” and “Silverlight,” and one of the results that came up was a post by my buddy and fellow Microsoftie Josh Holmes, on a Silverlight Countdown badge he created. Josh kindly included the source code, so I grabbed it, did a few tweaks, and the result can be seen in the pic to the left and in my sidebar.



Host this Widget!

If you’d like to run this widget, all you need to do is add the following code to your page or blog:

   1: <div id="silverlightControlHost">
   2:     <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="190" height="180">
   3:        <param name="initparams" value="TargetDate=03/22/10" />
   4:        <param name="source" value=""/>
   5:        <param name="onError" value="onSilverlightError" />
   6:        <param name="background" value="black" />
   7:        <param name="minRuntimeVersion" value="3.0.40624.0" />
   8:        <param name="autoUpgrade" value="true" />
   9:        <a href="" style="text-decoration:none">
  10:           <img src="" alt="Get Microsoft Silverlight" style="border-style:none"/>
  11:       </a>
  12:   </object>
  13:   <iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
  14: </div>

One of the tweaks I added was the ability to set the target date based on Silverlight’s initparams parameter. Josh went further and added updates to his widget to pass in paths to the images, event date, registration URL, and more.

So whether you’re looking for an example of how to create a simple Silverlight countdown widget, or want to host my Visual Studio 2010 countdown widget, the links and code above should have you set!

Drop me a note, or leave a comment if you decide to host the widget, and let me know how it works for you!

Comments (1)

  1. vasudev says:

    Working fine for me, Nice ! Will be blogging about it also. Thanks !

Skip to main content