From the course: Windows Presentation Foundation: 3 Events and the Event Model
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Use the MouseWheel event
From the course: Windows Presentation Foundation: 3 Events and the Event Model
Use the MouseWheel event
- [Instructor] For this example application I have an image transition application. Right now we're looking at this picture of some food and a pretzel on the screen. I'll take my mouse and use the mouse wheel and eventually the pretzel picture disappears and this picture of a pastry appears. If I locate my mouse the opposite direction, we return through a transition back to the original picture. In the upper left hand corner, I have a number up here that represents the opacity level of the picture, in this case the pretzel picture. That's as useful for you and me, your users could probably care less about having an opacity value there, but it helps us see what's happening. Watch this again as I rotate my mouse wheel. When it gets to zero I know that the opacity level of the pretzel picture is zero, which means its invisible. And that means that this pastry picture is set at one. And when I move my mouse in the other direction, it goes back up to one. Since I'm using a numeric input…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
The MouseEnter and MouseLeave events2m 26s
-
Use the MouseWheel event2m 55s
-
Use the MouseMove event6m 19s
-
Set the mouse cursor2m 2s
-
Start a drag operation7m 24s
-
Use DragEnter to indicate a valid drag target2m 20s
-
Use the Drop event to complete the drag/drop operation2m 34s
-
Use formats to send different data to the drop target3m 39s
-
-
-