Share via


Silverlight 1.1 updates on Vista Gadgets

In my previous post I wrote about "Transparent Silverlight Sidebar Gadgets"!

Now a reader sent me a comment about the new Silverlight 1.1 Alpha Refresh, and the gadget not working there.

So I updated the example and replaced the Silverlight.js files with the newester version!

Here is the updated version of what you need to do to create a transparent sidebar gadget with Silverlight in it:

  • Add the JavaScript call createSilverlight(); to your gadget's HTML page (for all SL gadgets)

  • Add the special sidebar's "g:background" layer and set the background-image to a transparent PNG file
    <g:background src="bg.png" mce_src="bg.png" id="Bg" style="position:absolute;width:130px;height:130px;z-index:-1"/>

  • The next thing is, you need to remove the Background attribute of the XAML's root canvas

  • Set two properties of the Silverlight Control:

    function createSilverlight()
    {
        Silverlight.createObjectEx({
           ...
            properties: { ...
                    isWindowless: "true",
                    background:'#00000000'

           }

    }

    This way the Silverlight control will have no window (allowing it to be dragged around) and will have a transparent background (letting the desktop shine through)

The updated version of the Silverlight Gadget is attached to this posting!

SilverlightFun11.Gadget.zip