silverlight mouse position c#
Is there a way to get mouse position without attaching a event handler?
I'm trying to g开发者_JAVA技巧et a box to appear where the mouse is.
Thanks Sp
Wouldn't you rather want it on a mouse-up or mouse-down event? Here are a few drag-and-drop tutorials that might help with ideas for capturing mouse positions:
- http://msdn.microsoft.com/en-us/library/cc189066%28vs.95%29.aspx
- (SL 1, but still good) http://blogs.msdn.com/b/nickkramer/archive/2007/06/27/drag-drop-with-feedback.aspx
Unfortunately, I think you'll have no other way than using the MouseMove event. You can attach it to the Application.Current.RootVisual
(or any other layout root) though, so you should be able to implement your scenario.
精彩评论