开发者

WPF Grid Mouse Events

开发者 https://www.devze.com 2022-12-09 03:29 出处:网络
I was wondering, what is the best way to capture a mouse Event inside of a wpf Grid? I wanted to Capture an event when the mouse wheel is either scrolled up or down in the Grid.

I was wondering, what is the best way to capture a mouse Event inside of a wpf Grid?

I wanted to Capture an event when the mouse wheel is either scrolled up or down in the Grid.

I tried to create a custom grid, but that kind of di开发者_如何学Pythondn't work.

Any ideas?


You can hook the MouseWheel event or, if you're inheriting, you can override the OnMouseWheel method.


I handled mouse event inside a grid by placing a blank Label inside so that it will expand through the Grid and then providing a handler to that.

0

精彩评论

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