Page view counter
Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget Subscribe to this thread
Last post 12-26-2008 8:38 PM by julioc. 5 replies.
Sort Posts:
10-17-2008 3:20 AM
Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

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

julioc

Loading...
Joined on 06-09-2007
Posts 9
10-17-2008 3:32 AM
Marked as Answer
Re: Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

Hi Julio,

Have you tried change size of object element?

(If this has answered your question, please click on "mark as answer" on this post. Thank you!)

My blog

Twitter

Sincerely,
Sergey Lutay

Sergey.Lutay

Loading...
Joined on 02-14-2008
Ukraine
Posts 386
10-24-2008 10:05 AM
Re: Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

I'm experiencing the very same problem. windowless=true makes controls behave weirdly, keyboard input is not properly captured, also
handle on the slider control is doing funny things like moving back and forth.

kakoskin

Loading...
Joined on 03-08-2008
Finland
Posts 24
11-19-2008 9:35 PM
Re: Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

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!

Timmy G

Loading...
Joined on 05-01-2007
Posts 45
12-04-2008 1:25 AM
Marked as Answer
Re: Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

 

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.



I was having this problem as well. The solution I found was to have the Silverlight app size set smaller than the size of the gadget as a whole. The problem is (I think) one of competing interactions. The Silverlight app doesn't inform the gadget that the user has moused over the Silverlight portion of the gadget. So what you need to do is allow the user some space that isn't taken up by a Silverlight app. I used a 5px difference, and that worked pretty well.

 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.

matthiasshapiro

Loading...
Joined on 08-06-2008
Posts 7
12-26-2008 8:38 PM
Re: Silverlight 2 windowless strange behaviour on Vista Sidebar Gadget

Thanks a lot Matthias, having the Silverlight app size set smaller than the size of the gadget made the trick for me too.

Thanks!

Julio

julioc

Loading...
Joined on 06-09-2007
Posts 9
Microsoft Communities