Table of Contents

Class ScrollViewer

Namespace
nanoFramework.Presentation.Controls
Assembly
nanoFramework.Graphics.dll

Represents a control that provides a scrollable view of content in a container.

public class ScrollViewer : ContentControl
Inheritance
ScrollViewer
Inherited Members
Extension Methods

Constructors

ScrollViewer()

Initializes a new instance of the ScrollViewer class.

public ScrollViewer()

Properties

ExtentHeight

Gets the extent height of the ScrollViewer's content.

public int ExtentHeight { get; }

Property Value

int

ExtentWidth

Gets the extent width of the ScrollViewer's content.

public int ExtentWidth { get; }

Property Value

int

HorizontalOffset

Gets or sets the horizontal offset of the ScrollViewer's content.

public int HorizontalOffset { get; set; }

Property Value

int

LineHeight

Gets or sets the height of each line in the ScrollViewer's content.

public int LineHeight { get; set; }

Property Value

int

LineWidth

Gets or sets the width of each line in the ScrollViewer's content.

public int LineWidth { get; set; }

Property Value

int

ScrollingStyle

Gets or sets the style used for scrolling in the ScrollViewer.

public ScrollingStyle ScrollingStyle { get; set; }

Property Value

ScrollingStyle

VerticalOffset

Gets or sets the vertical offset of the ScrollViewer's content.

public int VerticalOffset { get; set; }

Property Value

int

Methods

ArrangeOverride(int, int)

Arranges the ScrollViewer and its content.

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Parameters

arrangeWidth int

The arranged width of the ScrollViewer.

arrangeHeight int

The arranged height of the ScrollViewer.

LineDown()

Scrolls down by one line in the ScrollViewer.

public void LineDown()

LineLeft()

Scrolls the content to the left by a single line width.

public void LineLeft()

LineRight()

Scrolls the content to the right by a single line width.

public void LineRight()

LineUp()

Scrolls the content to the right by a single line width.

public void LineUp()

MeasureOverride(int, int, out int, out int)

Measures the size required for the ScrollViewer and its content.

protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

Parameters

availableWidth int

The available width for the ScrollViewer.

availableHeight int

The available height for the ScrollViewer.

desiredWidth int

The desired width of the ScrollViewer.

desiredHeight int

The desired height of the ScrollViewer.

OnButtonDown(ButtonEventArgs)

Handles button down events and scrolls the content accordingly.

protected override void OnButtonDown(ButtonEventArgs e)

Parameters

e ButtonEventArgs

The button event arguments.

PageDown()

Scrolls the content down by the height of the viewport.

public void PageDown()

PageLeft()

Scrolls the content to the left by the width of the viewport.

public void PageLeft()

PageRight()

Scrolls the content to the right by the width of the viewport.

public void PageRight()

PageUp()

Scrolls the content up by the height of the viewport.

public void PageUp()

Events

ScrollChanged

Occurs when the ScrollViewer's scrolling state has changed.

public event ScrollChangedEventHandler ScrollChanged

Event Type

ScrollChangedEventHandler