开发者

detect mouse state without event handler in Silverlight

开发者 https://www.devze.com 2023-04-01 19:59 出处:网络
is there any way I can开发者_运维知识库 detect mouse position/button states without working with events in Silverlight (VS2010,C#), I can use left/right mouse button up/down events, but I\'m going to

is there any way I can开发者_运维知识库 detect mouse position/button states without working with events in Silverlight (VS2010,C#), I can use left/right mouse button up/down events, but I'm going to detect mouse state outside of these events, what are my options

thanks


Unfortunately you need to use events, but you can make it generic.

You will need to hookup a MouseMove handler to your main layout grid (or other container) and check the MouseButtonEventArgs argument for the state of the buttons and position (which it inherits from MouseEventArgs).

You may find this Mouse Support page useful as well.

0

精彩评论

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