开发者

detect mouse state without event handler in Silverlight

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜