Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ImageSlider.SetCurrentImageIndex(Int32, Boolean) Method

Sets the index of the image currently displayed within the current ImageSlider. The method’s parameter specifies whether to use the slide animation.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public void SetCurrentImageIndex(
    int imageIndex,
    bool animated
)

#Parameters

Name Type Description
imageIndex Int32

An integer value that specifies the zero-based index of the image to be displayed.

animated Boolean

true, to use the slide animation; otherwise, false.

#Remarks

The SetCurrentImageIndex method allows you to display an image that occupies a specific position within the ImageSlider.Images or ImageSlider.ImageList collection. The animated parameter specifies whether the image is changed using the slide animation.

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

To get the currently displayed image or its index, use the ImageSlider.CurrentImage or ImageSlider.CurrentImageIndex property, respectively.

See Also