Silverlight Sidebar Gadget (C#)


Template to easily get started on developing a Sidebar Gadget using Silverlight controls and C#.

(17) Review
Visual Studio
2012, 2010
Download (66,000)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (17)
Q and A (25)
Sign in to write a review
Sort by:

by Graham P Cottle | July 27 2015

In general, the template works very well for me; I have created a few gadgets along the line for this. Couple of things:
1) Can the manifest be updated for VS2013 and VS2015?
2) The Debugger/Starter often seems to fail to find SideBar.exe. It's very hit and miss.
3) I think I found a resolution for the combo issue. Edit the template for a Combo using Blend, add ClickMode="Press" to the ToggleButton and it works.

by F. Bayer | January 13 2015

This project template is awesome. Thanks for all the effort and sharing your work. Although not that many people are using gadgets anymore they can be still very useful depending on requirements.

by flyboy65_2000 | April 26 2013

Excellent work, thanks. Gadgets seem to be going out of favour, however I still find them very useful in intranet environments.

by HolgerSinn.Com | February 29 2012

Just awesome

by Tamer Oz | January 02 2012

Great work

by Ehsan Mohammadi | October 08 2011

by Thiag0coelho | August 09 2011

Probably due to the last update 8/8/2010
I Get the following error

documents\visual studio 2010\Projects\SilverlightGadgetDebugger2\SilverlightGadgetDebugger2\SilverlightGadgetWeb\SilverlightGadgetWeb.csproj : error : A project with that name is already opened in the solution.

by ZiyaSAL | November 02 2010

This is a great work. Thanks. I have an application like this. But this is very easy :)

by Lionel Laské | August 25 2010

Great work !

by usna91 | August 18 2010

To the other reviewers, Silverlight is a 32bit environment. So, will not work unless you run 32bit Sidebar on your 64bit machine. Same thing that is required for Flash -- for gadget like Pandora. Look it up on Bing....

by ge-force | July 06 2010

How do you change the title of the settings page?

by thespawnkid | June 09 2010


When the gadget default page loads from start it could not set the SilverlightGadget.Settings from that page (its supposedly to populate the setting from IsolatedStorage settings). How ever, this can ONLY be done in the settings page. I find it very impractical to always set the settings when the gadget was unloaded from the sidebar. Hope you can help us. Thanks.

by mahldcat | May 29 2010

Very interesting project, and this saved me a LOT of time and hassle...

by diaconu13 | May 07 2010

by Mike Ward - Ann Arbor | December 06 2009

Same here. Not working on x64

by Steven Wilssens | November 22 2009

by Mark Woodlief | November 21 2009

have you done any testing of this on a 64 bit machine? I'm getting different results on 2 different computers with this package. 32 bit works fine, 64 bit doesnt work at all..

Sign in to start a discussion

  • Visual Studio Premium
    1 Posts | Last post May 10, 2013
    • Hi,
      Does this work with Visual Studio 2010 Premium ?
  • use settings on undock state
    3 Posts | Last post December 06, 2012
    • I have some settings set by using SilverlightGadget.Settings["PASS"] = something; I want to use this values in the state undock, but it does not work. Isn't there a way to achieve it?
    • It should work, as SilverlightGadget.Settings is only a wrapper over the Javascript settings API for gadgets. Can you check whether you can obtain the setting on the same page where you set it? (maybe on a button click)
    • My fault. I must be doing something wrong earlier as it is now working perfectly. Thank you
  • How to position the gadget to the center of window on its startup
    2 Posts | Last post December 04, 2012
    • I tried in Settings.ini but its not working.:(
      one more issue. Comboboxes in gadget is taking three clicks to open.:(
    • I don't think there is a way to move the gadget around from code. Only users can do that.
      The click thing is probably due to known issues with Silverlight buttons in sidebar gadgets. Try editing the template of the combobox (using Expression Blend or something to obtain the template) and change the Button.ClickMode to Press. Maybe that will fix it.
  • working with a few flyout pages..
    2 Posts | Last post December 04, 2012
    • i added one more flyoutpage(FP) and i have 2 FPs right now.. 
      Sure, i created one more silverlight project for second FP and .xap file has been added to clientbin folder(web project) automatically (no problem).
      i also added FP2.html(initiated fp2.xap) to web project.
      in code:
                      SilverlightGadget.FlyoutPage = "FP2.html";
      unfortunately, i can't view FP2... please help!!
      Sorry for my english...
    • You can try debugging for Javascript and Silverlight exceptions, but I have an easier way to do this:
      Use a single flyout Silverlight gadget, and just swap Silverlight user controls that you display on the "parent control" being shown on the flyout HTML page.
  • How to position the gadget to the center of window on its startup
    1 Posts | Last post October 23, 2012
    • I tried in Settings.ini but its not working.:(
      one more issue. Comboboxes in gadget is taking three clicks to open.:(
  • Why Image Control not working with Absolute URI Bitmap Source
    5 Posts | Last post July 21, 2012
    • Love this template but i cant get image control to display image.Anyone got any idea why?
                      BitmapImage s = new BitmapImage(new Uri("", UriKind.Absolute));
                      //image1.Dispatcher.BeginInvoke((Action)(() => { image1.Source = s; }));
                      image1.Source = s;
    • Same problem.  Did you find a solution?
    • The same happens here. Any suggestions?
    • This happens because the image is from a different domain than the gadget (obviously, since it's from the Internet) and the domain where the image is from does not allow Silverlight applications to use content from it. See, the Basics of the Security Policy System section.
    • Hi,
      I still have problem with abolut uri. I use crossdomain policy, when I run an OOB app it works correctly? Colud you please help, how can I solve this?
  • Using WCF
    5 Posts | Last post May 22, 2012
    • How can I use WCF in Sidebar Gadget Silverlight project.
      I meet up with cross-domain error.
    • WCF project is working locally, but project is not working to transfered on the IIS server.
      SilverlightGadgetUnDocked, Properties, "Enable running application out of browser" is checked, "Set as StartUp Project", Run(F5). Project is working without problems. Run as "SilverlightGadget1\SilverlightGadget1\SilverlightGadgetWeb\bin\Publish\SilverlightSidebarGadget.gadget", I meet up with cross-domain error.
    • I solved the problem with IIS settings.
    • For solving the cross-domain issues in Silverlight when you have control over the domain that hosts the resource (web service, image), then provide a Silverlight/Flash policy file on the domain. See http://msdn.mic​​s/library/cc645​032%28v=VS.95%2​9.aspx.
    • How can i use the RIA services in gadget.. i have try something but always gets 100% pink circle :(.. the same RIA services are working fine in other silverlight business application.
      Please help me out.
  • how to use WCF services
    2 Posts | Last post May 17, 2012
    • I've added service reference to SilverlightGadgetSettings and create service client but I've got an error - KeyNotFoundException on client object. I mean
      void evHelper_SettingsClosing(object sender, SettingsClosingEventArgs e)
      			if (e.Action == CloseAction.Commit)
      		            GetWeatherXmlDocumentClient client = new GetWeatherXmlDocumentClient();
      I've got KeyNotFoundException on GetWeatherXmlDocumentClient client = new GetWeatherXmlDocumentClient();.
       The same error if I create object in other projects. What's the problem?
    • Are you perhaps missing the WCF client config (app.config)?
  • clientaccesspolicy.xml
    2 Posts | Last post March 16, 2012
    • I'm a newbie on silverlight, so forgive me if my question is stupid.
      As I understood it's necessary to allow http access from within the gadget. So I placed the file clientaccesspolicy.xml with the content:
      <?xml version="1.0" encoding="utf-8"?>
                  <allow-from http-request-headers="SOAPAction">
                      <domain uri="*"/>
                      <resource path="/" include-subpaths="true"/>
      in the project SilverlightGadgetWeb with BuildAction "Content" and Copy to Output Directory "Copy always". This should allow all http access from within the gadget for test purposes, but I'm still receiving a SecurityException when I'm trying to read a Web page with WebClient.
    • The xml must be placed in the place where the web resource is hosted. For instance, if you want to access, then the hoster of needs to have the policy xml in the same place.
  • Dont work
    4 Posts | Last post February 19, 2012
    • I have Windows 7 x64, Visual studio 2010 ultimate.
      Getting these erros when creating Silverlight Sidebar Gadget (C#) project:
      A problem was encountered creating the sub project 'SilverlightGadgetDocked'. The project file 'C:\Users\xxx\AppData\Local\Temp\2u5wbhxw.lls\Temp\SilverlightGadgetDocked.csproj' cannot be oppened.
      The project type is not supported by this installation.
      The same error repeats for:
      After these errors I have warning:
      The following template is requesting to open one or more documents in a manner that could pose a security risk.
      Template: "C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Ioan Lazarciuc\Silverlight Sidebar Gadget (C#)\1.8\~PC\t\\SilverlightSidebarGadget.vstemplate"
      If you choose to trust the template, the documents will be opened in the requested editors, and you will not be prompted again for this template
      I press trust.
    • When I try to build I get error:
      Error	1	The command "if not exist "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets" md "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets"
      if not exist "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\SilverlightGadgetDebugger\bin\Debug\Gadgets\SilverlightSidebarGadget" md "c:\users\xxx\documents\visual studio 2010\Projects\SilverlightGadget1\
    • Fixed by instaling Web developer tools and silver light 5 tools. There should be a requirements.
    • Lots of bugs... Why windows gadgets have such a bad developer tools support?
1 - 10 of 25 Items