YetaWF Documentation


Scroller Component

Scroller (Display)

Renders a list of items in a horizontal or vertical display. This is typically used for a product scroller or to provide a scrollable rendering of objects.

Model Type: System.Collections.IEnumerable

The Scroller component is provided with a list of objects, each is rendered with the specified component (similar to how Property Lists are rendered), as each object is rendered using its own properties and the respective UIHint() definition.

A sample scroller implementation is available at Tests > Templates > Scroller (standard YetaWF site).

AdditionalMetadata Attributes

ComponentstringnullDefines the component used to render each object within the specified model (objects). This attribute is required.
[UIHint("Scroller"), ReadOnly, AdditionalMetadata("Component", "Softelvdm_StoreCatalog_ScrollerProduct")]
public List<Item> Items { get; set; }

public class Item {
    [UIHint("Image"), AdditionalMetadata("ImageType", ProductImageSupport.ImageType), AdditionalMetadata("Width", 100), AdditionalMetadata("Height", 100)]
    [AdditionalMetadata("ShowMissing", false)]
    public string Logo { get; set; }
    public string Product Name { get; set; }