Skip to main content
A newer version of this page is available. .

CarouselPanel.AttractorPointIndex Property

Specifies the active element’s position within the Carousel.

Namespace: DevExpress.Xpf.Carousel

Assembly: DevExpress.Xpf.Carousel.v19.2.dll

Declaration

public int AttractorPointIndex { get; set; }

Property Value

Type Description
Int32

An integer value specifying the position for the selected item among other items.

Remarks

The CarouselPanel allows you to specify where to display the selected item. This means that every time you navigate to a particular element, it isn’t necessarily moved to the center position of the visible carousel path. Instead, it goes to the position specified by the AttractorPointIndex property, which sets the visible index.

If this property is set to 1, selecting an item will make it the first one visible in the navigation path. If three items are visible in a carousel, set this property to 2 to display the currently selected item in the middle.

If the value is out of bounds of visible item indexes (see CarouselPanel.VisibleItemCount), items may be out of the carousel’s visible range when selecting them. If a value is higher than the total number of items, the carousel can make several full turns when you make a selection.

Note

The current version of DXCarousel is designed to work with three or more items.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AttractorPointIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also