Power BI

Content by Charles Sterling

Writing a Windows Sidebar Gadget in Silverlight-dead simple!

After my forays into writing Sidebar gadgets with WPF using Element host i have to admit i was not looking forward to tying it with silverlight.

The fact i started by downloading a couple of existing samples -that all failed didn’t really boost my confidence much either. 

In the end it turned out to be easier than anticipated.  To the point it is almost not worth a blog entry….So what are the steps to creating a Sidebar gadget in Silverlight?

  1. Start Orcas > File New Silverlight Application.  (If you don’t have this option see: Orcas Install Woes -and Success
  2. Create New Gadget Directory in C:\Users\Your_name\appdata\local\Microsoft\Windows Sidebar\Gadgets like Silverlight.Gadget
  3. Add the files Created by Orcas to this directory
  4. Add a Gadget.XML that points to the default Testpage.html created by Orcas (See below)
  5. Add the newly created gadget to the Windows Sidebar – Viola you are done!

Thursday i hope to record Scott Barnes creating one that will have options etc.


**************Sample Gadget.XML******************************


<?xml version=”1.0″ encoding=”utf-8″?>
<name>Silverlight Test</name>
<author name=”Chuck”>
<info url=”http://blogs.msdn.com/charles_sterling” text=”Chucks Blog”/>
<description>Silverlight Sample</description>
<icon height=”100″ width=”125″ src=”Icon.jpg”/>
<host name=”sidebar”>
<base type=”HTML” apiVersion=”1.0.0″ src=”TestPage.html”/>
<platform minPlatformVersion=”0.3″/>
<defaultImage src=”Icon.jpg”/>