Example #1
0
 private void wxMain_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
 {
     if (Keyboard.FocusedElement != wxMain)
     {
         var wxobj = WPF.FindFirstParent <ScrollViewer>(sender as UIElement);
         if (wxobj != null)
         {
             e.Handled = true;
             var e2 = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
             e2.RoutedEvent = MouseWheelEvent;
             wxobj.RaiseEvent(e2);
         }
     }
 }