private static void OnEnableMouseWheelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Slider slider = d as Slider; if (slider != null) { SliderHelper.UnregisterEvents(slider); if ((MouseWheelState)e.NewValue != MouseWheelState.None) { SliderHelper.RegisterEvents(slider); } } }
private static void OnUnloaded(Slider sender, RoutedEventArgs e) { SliderHelper.UnregisterEvents((Slider)sender); }