private void ResultList_MouseWheel(object sender, MouseWheelEventArgs e) { ScrollViewer viewer = PlansListbox.FindVisualChild <ScrollViewer>(); if (viewer != null) { if (e.Delta > 0) { viewer.LineLeft(); } else { viewer.LineRight(); } } }
public TimeSwitchPlanControl() { InitializeComponent(); PlansListbox.AddHandler(FrameworkElement.MouseWheelEvent, new MouseWheelEventHandler(ResultList_MouseWheel), true); }