For the complete documentation index, see llms.txt. This page is also available as Markdown.

CarouselElement

This element shows the items of a list one after another in a rotating carousel.

Properties

Name
Type
Description

Data

IList

The items to display, usually coming from a source. Setting it restarts the carousel.

ChangeInterval

TimeSpan

How long each item stays selected. Default 5 seconds.

The items are styled with the ItemTemplate of the underlying carousel.

Items written in the layout

Instead of binding Data, the items can be written directly between the tags. They then need no ItemTemplate, because each one is already an element of its own:

<controls:CarouselElement ChangeInterval="0:00:03">
    <controls:ImageElement Filename="sponsor1.png" />
    <controls:ImageElement Filename="sponsor2.png" />
    <controls:ImageElement Filename="sponsor3.png" />
</controls:CarouselElement>

The two ways cannot be combined: setting Data on an element that already carries items from the layout raises an error, so use either the items or Data.

Rotation

The carousel starts to rotate when the layout goes on air and stops when it is taken off air. Each time the last item has been passed, the element raises its finished event, which a sequence can react to, and starts over with the first item.