Skip to main content

CarouselPanel.AttractorPointIndex Property

Specifies the active element’s position within the Carousel.

Namespace: DevExpress.Xpf.Carousel

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

NuGet Package: DevExpress.Wpf.Carousel

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.

See Also