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
scrollTypeScrollTypeThe 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
scrollBarV
This scroll view's vertical ScrollBar.
public ScrollBar scrollBarV { get; }
Property Value
scrollContent
This scroll view's content.
public Area scrollContent { get; }
Property Value
viewport
This scroll view's viewport.
public Area viewport { get; }
Property Value
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
horizontalboolWhether horizontal scrolling should be allowed
verticalboolWhether vertical scrolling should be allowed
SetContent(UIComponent)
Sets a different component to be the content.
public override void SetContent(UIComponent content)
Parameters
contentUIComponentThe 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
themeThemeThe theme to apply