internal SmoothScrollMouseProcessor(IWpfTextView _wpfTextView) { this.wpfTextView = _wpfTextView; var pageScroller = new PageScroller(Dispatcher.CurrentDispatcher, wpfTextView); verticalController = new ScrollController(pageScroller, ScrollingDirection.Vertical); horizontalController = new ScrollController(pageScroller, ScrollingDirection.Horizental); }
internal SmoothScrollProcessor(IWpfTextView _wpfTextView) { this.wpfTextView = _wpfTextView; var pageScroller = new PageScroller(wpfTextView); verticalController = new ScrollController(pageScroller, ScrollingDirection.Vertical); horizontalController = new ScrollController(pageScroller, ScrollingDirection.Horizontal); wpfTextView.VisualElement.Loaded += (_, __) => { var source = PresentationSource.FromVisual(wpfTextView.VisualElement) as HwndSource; source?.AddHook(MessageHook); }; }