public MouseWheelController(IInputLevelElement inputLevelElement) { if (inputLevelElement == null) throw new ArgumentNullException("inputLevelElement"); _inputLevelElement = inputLevelElement; InputLevelElement.PreviewMouseWheel += OnPreviewMouseWheel; InputLevelElement.AddHandler(PreviewMouseWheelInputEvent, new MouseWheelInputEventHandler(OnPreviewInput)); InputLevelElement.AddHandler( MouseWheelInputEvent, new MouseWheelInputEventHandler(OnInput)); }
public MouseWheelController(IInputLevelElement inputLevelElement) { if (inputLevelElement == null) { throw new ArgumentNullException(nameof(inputLevelElement)); } InputLevelElement = inputLevelElement; InputLevelElement.PreviewMouseWheel += OnPreviewMouseWheel; InputLevelElement.AddHandler(PreviewMouseWheelInputEvent, new MouseWheelInputEventHandler(OnPreviewInput)); InputLevelElement.AddHandler(MouseWheelInputEvent, new MouseWheelInputEventHandler(OnInput)); }
public MouseWheelController(IInputLevelElement inputLevelElement) { if (inputLevelElement == null) { throw new ArgumentNullException("inputLevelElement"); } _inputLevelElement = inputLevelElement; _presentationSource = PresentationSource.FromDependencyObject(inputLevelElement.Proxied) as HwndSource; HookMouseHorizontalWheelEvent(_presentationSource); InputLevelElement.PreviewMouseWheel += OnPreviewMouseWheel; InputLevelElement.AddHandler(PreviewMouseWheelInputEvent, new MouseWheelInputEventHandler(OnPreviewInput)); InputLevelElement.AddHandler(MouseWheelInputEvent, new MouseWheelInputEventHandler(OnInput)); }