开发者

silverlight mouse position c#

开发者 https://www.devze.com 2023-01-20 04:59 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消