ICSharpCode.AvalonEdit.TextEditor.ScrollToVerticalOffset C# (CSharp) Method

ScrollToVerticalOffset() public method

Scrolls to the specified position in the document.
public ScrollToVerticalOffset ( double offset ) : void
offset double
return void
        public void ScrollToVerticalOffset(double offset)
        {
            ApplyTemplate(); // ensure scrollViewer is created
            if (scrollViewer != null)
                scrollViewer.ScrollToVerticalOffset(offset);
        }

Usage Example

        //...........................................................

        protected void ScrollBarVChanged(object SENDER, System.Windows.RoutedPropertyChangedEventArgs <double> ARGS)
        {
            var sender = SENDER as ScrollBar;
            var offset = sender.Value;

            m_viewerL.ScrollToVerticalOffset(offset);
            m_viewerR.ScrollToVerticalOffset(offset);
        }
All Usage Examples Of ICSharpCode.AvalonEdit.TextEditor::ScrollToVerticalOffset