Is there any way to get the delta value from PointeWheelChanged event in WinRT?
Asked
Active
Viewed 451 times
2 Answers
3
The following works in the RTM of Windows Runtime, it will log the result to the Debug window. Positive values are up (away from you), negative values are scrolling down (towards you). Important is to set handled to true so that this event doesn't bubble further up the UI elements.
private void ZoomPointerWheelChanged(object sender, PointerRoutedEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.GetCurrentPoint(this).Properties.MouseWheelDelta);
e.Handled = true;
}

Robert MacLean
- 38,975
- 25
- 98
- 152
1
Following code works well,
private void PointerWheelChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.PointerEventArgs args)
{
var wheelDelta = args.CurrentPoint.Properties.MouseWheelDelta;
// do something with the delta
}

Jawahar
- 4,775
- 1
- 24
- 47
-
1This does not seem to be valid in the RTM – Robert MacLean May 04 '13 at 17:44