Back to Devexpress

ASPxImageSlider Class

aspnet-devexpress-dot-web-e8b3891e.md

latest9.8 KB
Original Source

ASPxImageSlider Class

An image slider control.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class ASPxImageSlider :
    ASPxImageSliderBase,
    IControlDesigner
vb
Public Class ASPxImageSlider
    Inherits ASPxImageSliderBase
    Implements IControlDesigner

Remarks

The ASPxImageSlider class allows you to display images and navigate between them.

Create an ImageSlider Control

Design Time

The ASPxImageSlider control is available on the DX.25.2: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.

aspx
<dx:ASPxImageSlider ID="imageSlider" runat="server" 
                    ImageSourceFolder="~/Content/Images/widescreen/" ClientInstanceName="ClientImageSlider">
</dx:ASPxImageSlider>

Run Time

csharp
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
    ASPxImageSlider imageSlider = new ASPxImageSlider();
    imageSlider.ID = "imageSlider";
    Page.Form.Controls.Add(imageSlider);

    imageSlider.ClientInstanceName = "ClientImageSlider";
    imageSlider.ImageSourceFolder = "~/Content/Images/widescreen/";
}
vb
Imports DevExpress.Web

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim imageSlider As ASPxImageSlider = New ASPxImageSlider()
    imageSlider.ID = "imageSlider"
    Page.Form.Controls.Add(imageSlider)

    imageSlider.ClientInstanceName = "ClientImageSlider"
    imageSlider.ImageSourceFolder = "~/Content/Images/widescreen/"
End Sub

Note

DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.

The ASPxImageSlider control can be populated with items in different ways:

An image slider may consist of the following elements:

ASPxImageSlider supports the virtual paging mode (ImageSliderBehaviorSettingsBase.EnableVirtualPaging) that allows end-users to load images on demand when navigating using the pager.

Note

ASPxImageSlider control provides you with a comprehensive client-side functionality implemented using JavaScript code.

The control’s client-side API is enabled if the ASPxImageSliderBase.ClientInstanceName property is defined or any client event is handled.

Implements

Show 15 items

IComponent

IDisposable

IParserAccessor

IDataBindingsAccessor

IControlBuilderAccessor

IControlDesignerAccessor

IExpressionsAccessor

IAttributeAccessor

IUrlResolutionService

INamingContainer

IPostBackDataHandler

IPostBackEventHandler

ICallbackEventHandler

IPropertiesOwner

IDataSourceViewSchemaAccessor

Inheritance

Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxDataWebControlBase ASPxDataWebControl ASPxImageSliderBase ASPxImageSlider MVCxImageSlider

See Also

ASPxImageSlider Members

Image Slider

DevExpress.Web Namespace