In This Article

IEditorViewScroller Interface

Provides the base requirements for an object that can scroll an IEditorView.

public interface IEditorViewScroller

Properties

IsHorizontalScrollBarVisible

Gets whether the horizontal scrollbar is visible.

bool IsHorizontalScrollBarVisible { get; }

Property Value

bool:

true if the horizontal scrollbar is visible; otherwise, false.

IsHorizontalScrollingEnabled

Gets whether horizontal scrolling is enabled.

bool IsHorizontalScrollingEnabled { get; }

Property Value

bool:

true if horizontal scrolling is enabled; otherwise, false.

IsVerticalScrollBarVisible

Gets whether the vertical scrollbar is visible.

bool IsVerticalScrollBarVisible { get; }

Property Value

bool:

true if the vertical scrollbar is visible; otherwise, false.

Remarks

Use Opacity so that arrange isn't affected.

IsVerticalScrollingEnabled

Gets whether vertical scrolling is enabled.

bool IsVerticalScrollingEnabled { get; }

Property Value

bool:

true if vertical scrolling is enabled; otherwise, false.

Methods

ScrollByPixels(double, double)

Scrolls the view by the specified number of pixels.

void ScrollByPixels(double xPixelDelta, double yPixelDelta)
Parameter Type Description
xPixelDelta double

The number of X-coordinate pixels (can be negative) by which to scroll.

yPixelDelta double

The number of Y-coordinate pixels (can be negative) by which to scroll.

ScrollDown()

Scrolls down a line while keeping the caret visible (for single caret only).

void ScrollDown()

ScrollDown(bool)

Scrolls down a line.

void ScrollDown(bool keepCaretVisible)
Parameter Type Description
keepCaretVisible bool

When true, the caret will be moved, as necessary, to remain visible after scrolling (for single caret only).

ScrollHorizontallyByPixels(double)

Scrolls the view horizontally by the specified number of pixels.

void ScrollHorizontallyByPixels(double pixelDelta)
Parameter Type Description
pixelDelta double

The number of pixels (can be negative) by which to scroll.

ScrollIntoView(TextPosition, bool)

Ensures that the specified TextPosition is visible by scrolling it into view if necessary.

void ScrollIntoView(TextPosition position, bool scrollToVerticalMiddle)
Parameter Type Description
position TextPosition

The TextPosition to ensure is visible.

scrollToVerticalMiddle bool

Whether to scroll to the vertical middle, if scrolling is necessary.

ScrollLeft()

Scrolls left a column.

void ScrollLeft()

ScrollLineToVisibleBottom()

Scrolls the current view line to the bottom of the view.

void ScrollLineToVisibleBottom()

ScrollLineToVisibleMiddle()

Scrolls the current view line to the middle of the view.

void ScrollLineToVisibleMiddle()

ScrollLineToVisibleTop()

Scrolls the current view line to the top of the view.

void ScrollLineToVisibleTop()

ScrollPageDown()

Scrolls down a page.

void ScrollPageDown()

ScrollPageUp()

Scrolls up a page.

void ScrollPageUp()

ScrollRight()

Scrolls right a column.

void ScrollRight()

ScrollTo(TextViewScrollState)

Scrolls the view to the specified scroll state.

void ScrollTo(TextViewScrollState scrollState)
Parameter Type Description
scrollState TextViewScrollState

The target TextViewScrollState.

ScrollToCaret()

Scrolls the view to the primary caret position.

void ScrollToCaret()

ScrollToDocumentEnd()

Scrolls to the end of the document.

void ScrollToDocumentEnd()

ScrollToDocumentStart()

Scrolls to the start of the document.

void ScrollToDocumentStart()

ScrollUp()

Scrolls up a line while keeping the caret visible (for single caret only).

void ScrollUp()

ScrollUp(bool)

Scrolls up a line.

void ScrollUp(bool keepCaretVisible)
Parameter Type Description
keepCaretVisible bool

When true, the caret will be moved, as necessary, to remain visible after scrolling (for single caret only).

ScrollVerticallyByLine(int)

Scrolls the view vertically by the specified number of lines.

void ScrollVerticallyByLine(int lineDelta)
Parameter Type Description
lineDelta int

The number of view lines (can be negative) by which to scroll.

ScrollVerticallyByPixels(double)

Scrolls the view vertically by the specified number of pixels.

void ScrollVerticallyByPixels(double pixelDelta)
Parameter Type Description
pixelDelta double

The number of pixels (can be negative) by which to scroll.