コード例 #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);
        }
コード例 #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);
            };
        }