Skip to main content
Home Forums Silverlight Design Designing with Silverlight Mouse not working?
3 replies. Latest Post by y_makram on September 27, 2007.
(0)
jerrylma...
Member
3 points
14 Posts
09-27-2007 3:24 PM |
I coded a 3rd party tutorial where I drag an elipse around that magnifies a streaming video. It worked fine for me, but when I asked my coworkers to try it, it wouldn't capture any mouse events. Has anyone else run into this or something similar?
y_makram
Contributor
6174 points
1,234 Posts
09-27-2007 3:45 PM |
Are you sure that the plug in has been activated. In IE if the plug-in does not have the focus, it will not get events, and there is a message like "Click here to activate". You can work around this by setting focus by Javascript.
09-27-2007 3:53 PM |
It did not give any prompts for activation, but it does show the behavior of an object that doesn't have focus. I will take a look and see if I can't default focus to the Silverlight object.
09-27-2007 4:20 PM |
You can achieve this by adding this line of code to the body onLoad event of the host page
<body onload="document.getElementById('SilverlightControl').focus()">
SilverlightControl is the ID of the control set by the createObjectEx method