This entity is experimental and might be changed or removed in a future release.

Paging and loading manager for a list of items. Allows a large, or infinite list, to be displayed in a ScrollView.

This controls the Offset and Limit properties of an Each inside a ScrollView. It limits the number of items displayed to improve performance.

The setup that works now is with a StackPanel (Horizontal or Vertical)

<ScrollView LayoutMode="PreserveVisual">
    <StackPanel>
        <Each Items="{items}" Reuse="Frame" ux:Name="theEach">
            <Panel Color="#AAA">
                <Text Value="{title}"/>
            </Panel>
        </Each>
    </StackPanel>

    <ScrollViewPager Each="theEach" ReachedEnd="{loadMore}"/>
</ScrollView>

It's required to use LayoutMode="PreserveVisual", otherwise the scrolling will not function correctly. Reuse="Frame" is optional but recommended: it improves performance by reusing objects.

ReachedEnd is called when the true end of the list is reached and more data is required. It's actually called somewhat before the end is reached, thus allowing the loading process to start before the user reaches the end. There is also a RechedStart to allow loading when scrolling the opposite direction. Neither of these callbacks are mandatory; ScrollViewPager is also helpful for displaying large static lists.

Location

Namespace
Fuse.Controls
Package
Fuse.Controls.ScrollView 1.9.0

Interface of ScrollViewPager

Check uno

Should be called whenever new data is added in response to ReachedEnd or ReachedStart. This will ensure the paging is updated even when nothing else would trigger the update.

Each : Each ux

The Each instance to control. This property is required.

Retain : int ux

An approximate number of pages to retain. The size of the visible part of the ScrollView is the page size. Enough items to fill multiple amounts of this size are kept around. The rest are discarded.

Inherited from Node

ContextParent : Node uno

The context parent is the semantic parent of this node. It is where non-UI structure should be resolved, like looking for the DataContext, a Navigation, or other semantic item.

FindNodeByName(Selector, Predicate<Node> (Node)) : Node uno

Finds the first node with a given name that satisfies the given acceptor. The serach algorithm works as follows: Nodes in the subtree are matched first, then it matches the nodes in the subtrees ofthe ancestor nodes by turn all the way to the root. If no matching node is found, the function returns null.

IsRootingStarted : bool uno

Whether rooting of this node has started. Note that even if this property returns true, rooting may not yet be completed for the node. See also IsRootingCompleted.

Name : Selector ux

Run-time name of the node. This property is automatically set using the ux:Name attribute.

OnRooted uno

If you override OnRooted you must call base.OnRooted() first in your derived class. No other processing should happen first, otherwise you might end up in an undefined state.

Inherited from PropertyObject

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces

IScriptObject uno

Interface for objects that can have a script engine representation