menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Carousel - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Carousel

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    Carousel
    Namespace: Syncfusion.EJ2.Navigations
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class Carousel : EJTagHelper

    Constructors

    Carousel()

    Declaration
    public Carousel()

    Properties

    AllowKeyboardInteraction

    Defines whether to enable keyboard actions or not.

    Declaration
    public bool AllowKeyboardInteraction { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    AnimationEffect

    Specifies the type of animation effects. The possible values for this property as follows None: The carousel item transition happens without animation. Slide: The carousel item transition happens with slide animation. Fade: The Carousel item transition happens with fade animation. Custom: The Carousel item transition happens with custom animation.

    Declaration
    public CarouselAnimationEffect AnimationEffect { get; set; }
    Property Value
    Type Description
    CarouselAnimationEffect

    The default value is CarouselAnimationEffect.Slide

    AutoPlay

    Defines whether the slide transition is automatic or manual.

    Declaration
    public bool AutoPlay { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    ButtonsVisibility

    Defines how to show the previous, next and play pause buttons visibility. The possible values for this property as follows Hidden: Navigation buttons are hidden. Visible: Navigation buttons are visible. VisibleOnHover: Navigation buttons are visible only when we hover the carousel.

    Declaration
    public CarouselButtonVisibility ButtonsVisibility { get; set; }
    Property Value
    Type Description
    CarouselButtonVisibility

    The default value is CarouselButtonVisibility.Visible

    CssClass

    Accepts single/multiple classes (separated by a space) to be used for carousel customization.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    DataSource

    Specifies the datasource for the carousel items.

    Declaration
    public object DataSource { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableTouchSwipe

    Defines whether to enable swipe action in touch devices or not.

    Declaration
    public bool EnableTouchSwipe { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    Height

    Specifies the height of the Carousel in pixels/number/percentage. The number value is considered as pixels.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    HtmlAttributes

    Accepts HTML attributes/custom attributes to add in individual carousel item.

    Declaration
    public object HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    IndicatorsTemplate

    Accepts the template for indicator buttons.

    Declaration
    public string IndicatorsTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    IndicatorsType

    Specifies the type of indicators. The available values for this property are:

    Declaration
    public CarouselIndicatorsType IndicatorsType { get; set; }
    Property Value
    Type Description
    CarouselIndicatorsType

    The default value is CarouselIndicatorsType.Default

    Interval

    Specifies the interval duration in milliseconds for carousel item transition.

    Declaration
    public double Interval { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 5000

    Items

    Allows defining the collection of carousel item to be displayed on the Carousel.

    Declaration
    public List<CarouselItem> Items { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<CarouselItem>

    The default value is null

    ItemTemplate

    Specifies the template option for carousel items.

    Declaration
    public string ItemTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    Loop

    Defines whether the slide transitions loop end or not. When set to false, the transition stops at last slide.

    Declaration
    public bool Loop { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    NextButtonTemplate

    Accepts the template for next navigation button.

    Declaration
    public string NextButtonTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PartialVisible

    Enables active slide with partial previous/next slides.

    Declaration
    public bool PartialVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    PauseOnHover

    Defines whether the slide transition gets pause on hover or not.

    Declaration
    public bool PauseOnHover { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    PlayButtonTemplate

    Accepts the template for play/pause button.

    Declaration
    public string PlayButtonTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PreviousButtonTemplate

    Accepts the template for previous navigation button.

    Declaration
    public string PreviousButtonTemplate { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SelectedIndex

    Specifies index of the current carousel item.

    Declaration
    public double SelectedIndex { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    ShowIndicators

    Defines whether to show the indicator positions or not. The indicator positions allow to know the current slide position of the carousel component.

    Declaration
    public bool ShowIndicators { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    ShowPlayButton

    Defines whether to show play button or not.

    Declaration
    public bool ShowPlayButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    SlideChanged

    The event will be fired after the slide changed.

    Declaration
    public string SlideChanged { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SlideChanging

    The event will be fired before the slide change.

    Declaration
    public string SlideChanging { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    SwipeMode

    Specifies whether the slide transition should occur while performing swiping via touch/mouse. The slide swiping is enabled or disabled using bitwise operators. The swiping is disabled using ‘~’ bitwise operator. Touch - Enables or disables the swiping action in touch interaction. Mouse - Enables or disables the swiping action in mouse interaction.

    Declaration
    public CarouselSwipeMode SwipeMode { get; set; }
    Property Value
    Type Description
    CarouselSwipeMode

    The default value is CarouselSwipeMode.Touch

    Width

    Specifies the width of the Carousel in pixels/number/percentage. The number value is considered as pixels.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "100%"

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved