Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget
5 replies. Latest Post by julioc on December 26, 2008.
(0)
julioc
Member
7 points
9 Posts
10-17-2008 3:20 AM |
I created a Silverlight 2 RTM Vista Sidebar Gadget. This is how I declare the SL object in my html page:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="http://localhost:8662/ClientBin/TheGadget.xap" /> <param name="background" value="transparent" /> <param name="minRuntimeVersion" value="2.0.31005.0" /> <param name="autoUpgrade" value="true" /> <param name="windowless" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none; color:White"> <img src="GetSilverlight.png" alt="Get Microsoft Silverlight" style="border-style: none"/> </a></object>
I use the windowless parameter with a true value in order to display the small controls on right side of the gadget that allow you to close or move the gadget. Without windowless=true those controls would just not appear.
But, once I use the windowless=true you are not able to type into the textboxes of the SL application, or click a button there. You can write in the textboxes only if you double click them before writing, and you can click the button but only by double clicking it. So, the windowless has some kind of very strange effect over all the SL aplication when it is inside the Vista sidebar.
Is there any way I can display the gadget controls to close or move the gadget without using the windowless parameter so I stop having this strange behaviours?
Thanks,
Julio
Sergey.L...
Contributor
7104 points
1,333 Posts
10-17-2008 3:32 AM |
Hi Julio,
Have you tried change size of object element?
kakoskin
31 points
27 Posts
10-24-2008 10:05 AM |
I'm experiencing the very same problem. windowless=true makes controls behave weirdly, keyboard input is not properly captured, alsohandle on the slider control is doing funny things like moving back and forth.
Timmy G
66 points
52 Posts
11-19-2008 9:35 PM |
I'm also having this problem; for me no keyboard input is accepted in the textbox or password box control. I've tried setting windowless=false but that makes the settings and close buttons that appear for all gadgets disappear so that's a dead end too. Setting the size of the object element in the html did not fix the problem either.
I must admit, I'm really disappointed that there is no native support for Silverlight or WPF in the Sidebar (especially WPF). This is the primary development platform for Windows and I can't imagine it would have been all that difficult to support it... I found someone on the web that did it themselves even. Ok, so Vista was late getting out the door and maybe this was a corner to cut to ship on time, but how long was that? To not have included native WPF support in SP1 is absurd. Does anyone at MS want the sidebar to succeed? If so, they need to allow developers to use first class tools to write gadgets.
-- Extremely annoyed and ready to bail on this project entirely!
matthias...
58 points
7 Posts
12-04-2008 1:25 AM |
Timmy G:I'm also having this problem; for me no keyboard input is accepted in the textbox or password box control. I've tried setting windowless=false but that makes the settings and close buttons that appear for all gadgets disappear so that's a dead end too. Setting the size of the object element in the html did not fix the problem either.
The other option is to host your Silverlight app online and put it into the html page via an <iframe />. That solution is pretty seamless, but it also means that the user needs to be connected to the internet when they boot their machine... otherwise the gadget won't load.
If this is helping at all, you can download my silverlight gadget here:
http://www.designerwpf.com/2008/12/03/updated-silverlight-color-picker-gadget/
I also talk more about this over here:
http://www.designerwpf.com/2008/12/03/tips-for-creating-a-silverlight-2-gadget-for-vista/
I hope that helps.
12-26-2008 8:38 PM |
Thanks a lot Matthias, having the Silverlight app size set smaller than the size of the gadget made the trick for me too.
Thanks!