Vista gadgets using WPF

In vista, the sidebar provides valuable real estate and it would be nice to have some WPF stuff in there... You can use IFrame to host the xaml/xbap file as below

 <html>
<head>
              <style>
                            body { 
                                          width:130;
                                          height:130;
                                          padding:5;
                                          margin:0;
                                          background:black;
                            }              </style>
</head><body>        <iframe height="130"                 width="130"                 src="3dEarth.xaml"  /></body></html>

Thats it...create a folder in username\AppData\Local\Microsoft\Windows Sidebar\Gadgets\  and place the HTML files along with the WPF files. and voila!! some WPF candy on your desktop...

Xbaps provide more features as you could include some code... The sample code for the above is attached (xbap is the same as the xaml)....

For further references you could look at some other blog posts [1 , 2]

proj.zip