Table of Contents

Class ScrollView

Namespace
UILib.Components
Assembly
UILib.dll

A ScrollView.

If content is larger than the ScrollView, ScrollBars will be enabled to allow scrolling through it.

Vertical ScrollBars are always on by default.

public class ScrollView : UIComponent
Inheritance
ScrollView
Inherited Members

Constructors

ScrollView(ScrollType)

Initializes a ScrollView.

public ScrollView(ScrollType scrollType = ScrollType.Vertical | ScrollType.Horizontal)

Parameters

scrollType ScrollType

The types of scrolling to support

Properties

background

This scroll view's background.

public Image background { get; }

Property Value

Image

scrollBarH

This scroll view's horizontal ScrollBar.

public ScrollBar scrollBarH { get; }

Property Value

ScrollBar

scrollBarV

This scroll view's vertical ScrollBar.

public ScrollBar scrollBarV { get; }

Property Value

ScrollBar

scrollContent

This scroll view's content.

public Area scrollContent { get; }

Property Value

Area

viewport

This scroll view's viewport.

public Area viewport { get; }

Property Value

Area

Methods

ScrollToBottom()

Scroll to the bottom of this scroll view.

public void ScrollToBottom()

ScrollToTop()

Scroll to the top of this scroll view.

public void ScrollToTop()

SetAllowedScroll(bool, bool)

Changes which types of scrolling are allowed.

public void SetAllowedScroll(bool horizontal = true, bool vertical = true)

Parameters

horizontal bool

Whether horizontal scrolling should be allowed

vertical bool

Whether vertical scrolling should be allowed

SetContent(UIComponent)

Sets a different component to be the content.

public override void SetContent(UIComponent content)

Parameters

content UIComponent

The component which should be the content instead

SetThisTheme(Theme)

Allows setting the theme of this scroll view.

This handles setting the theme specifically for this component, not its children. It's protected to allow overriding if you were to create a subclass.

In most cases, you'd probably want to use SetTheme(Theme) instead.

protected override void SetThisTheme(Theme theme)

Parameters

theme Theme

The theme to apply