Skip to main content

ImageSlider.CurrentImageIndex Property

Gets or sets the index of the image currently displayed in the ImageSlider control.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(-1)]
[DXCategory("Behavior")]
public int CurrentImageIndex { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value that specifies the zero-based index of the image currently displayed in the ImageSlider control.

Remarks

The source of images can be specified by the ImageSlider.Images or ImageSlider.ImageList property. The CurrentImageIndex property allows you to programmatcally specify the index of the image to be displayed in the ImageSlider control. To accomplish the same goal, you can use the ImageSlider.SetCurrentImageIndex method, which allows you to specify whether to use slide animation when changing the display image.

Changing the currently displayed image fires the ImageSlider.CurrentImageIndexChanged event.

To get the currently displayed image, use the ImageSlider.CurrentImage property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CurrentImageIndex 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