Skip to main content

Microsoft Silverlight

Unanswered Question Silverlight Vista Sidebar GadgetsRSS Feed

(0)

jturinetti
jturinetti

Member

Member

4 points

3 Posts

Silverlight Vista Sidebar Gadgets

 Hello all,

 I'm interested in building some gadgets for the Vista sidebar and I've heard that this is possible using Silverlight.  Is this true, and can someone point me to a resource explaining how to get started?

 

Thanks!

 

-Jeremy
 

thierry.bouquain
thierry....

Contributor

Contributor

2054 points

280 Posts

Silverlight MVP

Re: Silverlight Vista Sidebar Gadgets

Here is a sample with silverlight 1 http://blog.benhall.me.uk/2007/05/vista-sidebar-gadget-using-silverlight.html

 

Thierry Bouquain
Ucaya
http://www.ucaya.com

jturinetti
jturinetti

Member

Member

4 points

3 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

Thanks for the reply, but I was hoping to use Silverlight 2.0 instead of Silverlight 1.0.  Does anyone have resources on this?

 

Thanks in advance. 

thierry.bouquain
thierry....

Contributor

Contributor

2054 points

280 Posts

Silverlight MVP

Re: Re: Silverlight Vista Sidebar Gadgets

You just have to change the javascript call in the html page that create the silverlight plugin by the object tag you will find in any silverlight 2 html sample

Thierry Bouquain
Ucaya
http://www.ucaya.com

jturinetti
jturinetti

Member

Member

4 points

3 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

Unless I'm mistaken, I don't think it's that easy.  Ben Hall's example makes use of Silverlight 1.0 and therefore all the code is written in Javascript, not C# (since there was no support for managed code yet at that point).  Secondly, Silverlight 2.0 is not backwards compatible with previous versions of Silverlight.   

Zonenjunge
Zonenjunge

Member

Member

15 points

24 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

Hi,

 I also try to run a  silverlight 2 gadget, cause I "need" managed script support. Everything works fine in Internet Explorer, but when I add the gadget into sidebar, I only get a blank field. Now I updated everything to Beta 2 and now there's the following message: "InitializeError - Could not download the Silverlight application. Check web server settings"

When I open the html from gadget folder in IE it works, so I think it couldn't be the path, but why can't the sidebar "download" the silverlight application? THe xap is located in the ClientBin folder I think it shouldn't be a problem for sidebar to access that folder.

Has anyone any idea?

 

By the way: Why will Beta2 not support conversions in SetValue, especially Int32->Double for Canvas.Left or TopProperty?

waldred
waldred

Member

Member

702 points

113 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

I've just run into this same issue described above by Zonenjunge.  I've created working Silverlight 2 gadgets before but on a different machine.  Thus, I'm thinking this is a system configuration issue.

In the interest of saving time, has anyone encountered and solved this issue?

prujohn
prujohn

Contributor

Contributor

3579 points

704 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

Check Ivana's blog, which has a walkthrough of this that may help you: http://geeks.ms/blogs/itilca/

waldred
waldred

Member

Member

702 points

113 Posts

Re: Re: Silverlight Vista Sidebar Gadgets

Ahh yes, I was missing the x-gadget:/// prefix!  Embarrassed

<script type="text/javascript">
    Silverlight.createObject(
        "x-gadget:///Widget.xap",
        $d("WidgetContainer"),
        "Widget", 
        {
            width:      "100%",
            height:     "100%",
            background: "transparent",
            windowless: "true",
            version:    "2.0.31005.0"
        },
        { onError: onSilverlightError });            
</script>
 

Thank you John (and Ivana!)

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities