I have a silverlight control which acts as a drop down. I’d like to get a mouse pressed event when the mouse ISNT hovering over the dropdown control or any one of its children.
how can I go about doing that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well that depends on what you mean by “Screen”.
With in Silverlight you are only going to be able to detect mouse down when the mouse is over the part of the screen that the Silverlight pluging is actually using.
The first step would be use this code:-
This may well be enough for you, however, if you still need to detect mouse down when
PopuporChildWindowcontrols are in use you will need to attach this handler to those as well (since the sit above theRootVisual).You may be able to take things further if you want to reach out into Javascript in the host html page. If your SL component only occupies a portion of the HTML Page presented you could get further events from via the HTMLBridge to detect mouse down anywhere in the browser client area.
If you really mean the whole screen then that isn’t possible currently.