Skip to main content

ASPxClientImageSlider.ActiveItemChanged Event

Occurs after the active image, displayed within the image area, is changed.

Declaration

ActiveItemChanged: ASPxClientEvent<ASPxClientImageSliderItemEventHandler<ASPxClientImageSlider>>

Event Data

The ActiveItemChanged event's data class is ASPxClientImageSliderItemEventArgs. The following properties provide information specific to this event:

Property Description
item Gets an item object related to the event.

Remarks

An image slider’s active item can be changed in a different ways: using the navigation bar, using the keyboard, clicking the image, etc. Additionally, the active item can be changed programmatically by using the ASPxClientImageSlider.SetActiveItem or ASPxClientImageSlider.SetActiveItemIndex methods.

Write the ActiveItemChanged event handler to respond to any active item change. The new active item can be accessed via the ASPxClientImageSliderItemEventArgs.item event argument.

Example

This example demonstrates how to implement custom SlideShow functionality by using the ASPxImageSlider's client-side API.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxHiddenField;

namespace E4913 {
    public partial class Default : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {

        }

        protected void hfCustomIntervals_Init(object sender, EventArgs e) {
            ASPxHiddenField hiddenField = sender as ASPxHiddenField;

            hiddenField["Cherries"] = 2000;
            hiddenField["Raspberry"] = 5000;
            hiddenField["Strawberry"] = 1000;
            hiddenField["Tomatoes"] = 4000;
        }
    }
}
See Also