Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
            };
        }