NE.Standard

Scroll container

A layout container that scrolls its content horizontally and/or vertically.

ScrollContainerComponent · type key standard.scroll · Layouts · property blocks: IScrollableComponent

No Overflow of its own: the two scroll modes say what it clips.

new ScrollContainerComponent("scroll-container")

Properties

PropertyTypeDefaultBindingDescription
Own
HorizontalScroll
SetHorizontalScroll · BindHorizontalScroll
UIScrollMode?UIScrollMode.Disabledone-wayWhether the viewport scrolls horizontally — Disabled, Auto, or Always; default Disabled.
VerticalScroll
SetVerticalScroll · BindVerticalScroll
UIScrollMode?UIScrollMode.Autoone-wayWhether the viewport scrolls vertically — Disabled, Auto, or Always; default Auto.
ScrollSnap
SetScrollSnap · BindScrollSnap
UIScrollSnapMode?UIScrollSnapMode.Disabledone-wayWhether a scroll comes to rest on a child's edge rather than wherever it was let go.
ScrollAnchor
SetScrollAnchor · BindScrollAnchor
UIScrollAnchor?UIScrollAnchor.Noneone-wayHow the viewport reacts when its content grows, applying to the component's own scrolling element so it also works for a windowed host that a wrapping ScrollContainer could not reach.
From ContainerComponentBase
Background
SetBackground · BindBackground
UIThemeColor?nullone-wayThe surface's background colour; unset leaves whatever the theme paints underneath.
Padding
SetPadding · BindPadding
UIResponsive<UIThickness>?nullone-wayThe inner spacing between this component's edges and its content, optionally overridden per breakpoint.
BackgroundImage
SetBackgroundImage · BindBackgroundImage
stringnullone-wayThe picture painted over the background colour, centred and never repeated: a URL or a data URI.
BackgroundImageFit
SetBackgroundImageFit · BindBackgroundImageFit
UIImageFit?UIImageFit.Coverone-wayHow the picture fills the surface.
BorderColor
SetBorderColor · BindBorderColor
UIThemeColor?nullone-wayThe border's colour, written as CSS border-color; unset leaves the stylesheet's own.
BorderThickness
SetBorderThickness · BindBorderThickness
UIThickness?nullone-wayThe border's thickness, written as CSS border-width; unset leaves the stylesheet's own.
BorderRadius
SetBorderRadius · BindBorderRadius
UICornerRadius?nullone-wayThe corner rounding, written as CSS border-radius; unset leaves the stylesheet's own.

Methods

AnchorToEnd()
Follows content appended at the end while the viewer is already at the end.
DisableScroll()
Disables both horizontal and vertical scrolling.
VerticalScrollOnly()
Enables vertical scrolling only.
HorizontalScrollOnly()
Enables horizontal scrolling only.
BothScroll()
Enables both horizontal and vertical scrolling.
SetScroll(UIScrollMode horizontalScroll, UIScrollMode verticalScroll)
Sets the horizontal and vertical scroll behaviors.
AddChild(IVisualComponent child)
Adds a child component.
AddChildren(params IVisualComponent[] children)
Adds child components.
AddChildren(IEnumerable<IVisualComponent> children)
Adds child components.
Common properties (16) — layout, visibility, theme, and the rest every component shares
PropertyTypeDefaultBindingDescription
Visibility
SetVisibility · BindVisibility
UIResponsive<UIVisibility>?Visibleone-wayWhat the component does with the room it was given, optionally overridden per breakpoint (e.g. collapsed from a given width up).
Enabled
SetEnabled · BindEnabled
bool?trueone-wayWhether the component responds to input; false dims it and marks it, and its subtree, inert.
Theme
SetTheme · BindTheme
UIThemeMode?nullone-wayThe theme mode forced on this component's subtree, or null to inherit the ambient theme.
HorizontalAlignment
SetHorizontalAlignment · BindHorizontalAlignment
UIAlignment?UIAlignment.Stretchone-wayWhere the component sits within its grid cell along the horizontal axis.
VerticalAlignment
SetVerticalAlignment · BindVerticalAlignment
UIAlignment?UIAlignment.Stretchone-wayWhere the component sits within its grid cell along the vertical axis.
Width
SetWidth · BindWidth
UIResponsive<UILayoutLength>?nullone-wayThe component width, optionally overridden per breakpoint.
MinWidth
SetMinWidth · BindMinWidth
UIResponsive<UILayoutLength>?nullone-wayThe component minimum width, optionally overridden per breakpoint.
MaxWidth
SetMaxWidth · BindMaxWidth
UIResponsive<UILayoutLength>?nullone-wayThe component maximum width, optionally overridden per breakpoint.
Height
SetHeight · BindHeight
UIResponsive<UILayoutLength>?nullone-wayThe component height, optionally overridden per breakpoint.
MinHeight
SetMinHeight · BindMinHeight
UIResponsive<UILayoutLength>?nullone-wayThe component minimum height, optionally overridden per breakpoint.
MaxHeight
SetMaxHeight · BindMaxHeight
UIResponsive<UILayoutLength>?nullone-wayThe component maximum height, optionally overridden per breakpoint.
ZIndex
SetZIndex · BindZIndex
int?0one-wayThe stacking order within the visual tree.
Margin
SetMargin · BindMargin
UIResponsive<UIThickness>?nullone-wayThe outer spacing around the component, optionally overridden per breakpoint.
Placement
SetPlacement · BindPlacement
UIResponsive<UIGridPlacement>?nullone-wayThe grid placement, optionally overridden per breakpoint.
Loading
SetLoading · BindLoading
bool?falseone-wayWhether the component is in loading state — a live state a controller turns on and off.
ShowContextMenu
SetShowContextMenu · BindShowContextMenu
bool?trueone-wayWhether a right-click opens the IVisualComponent.ContextMenu; on a host with rows, whether it opens any row's. Off, the menu stays in the tree and nothing opens it.