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]
Comments
Anonymous
October 23, 2006
Awesome! I've always wondered why the Vista gadgets had to be html. It seems so restrictive. Html makes sense as one supported type. But raw WPF would be nice as well without the workaround you've presented. Seems like a major disconnect to be launching this wonderful WPF platform and then force gadgets follow a standard that WPF is aimed at eliminating... ;)Anonymous
October 23, 2006
HTML is the simplest way.. you could also use ActiveX as shown on the post http://blogs.msdn.com/karstenj/archive/2006/10/09/activex-wpf-gadget.aspxAnonymous
October 24, 2006
For me, this is the way to create Gadgets for Vista's Sidebar - I know that in this "Web 2.0" world...Anonymous
November 01, 2006
Angus, the bulldog has so taken over the house. At least, it's made us more popular with the neighbors.Anonymous
October 20, 2007
Angus, the bulldog has so taken over the house. At least, it's made us more popular with the neighborsAnonymous
December 03, 2008
Angus, the bulldog has so taken over the house. At least, it's made us more popular with the neighbors. Agile/Extreme Programming I always appreciate the care Jeremy Miller takes in articulating his points and his latest is no exception. In stating his