Class Carousel
Inherited Members
Namespace: Syncfusion.EJ2.Navigations
Assembly: Syncfusion.EJ2.dll
Syntax
public class Carousel : EJTagHelper
Constructors
Carousel()
Declaration
public Carousel()
Properties
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
[HtmlAttributeName("animationEffect")]
public CarouselAnimationEffect AnimationEffect { get; set; }
Property Value
Type | Description |
---|---|
CarouselAnimationEffect | The default value is null |
AutoPlay
Defines whether the slide transition is automatic or manual.
Declaration
[HtmlAttributeName("autoPlay")]
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
[HtmlAttributeName("buttonsVisibility")]
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
[HtmlAttributeName("cssClass")]
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
[HtmlAttributeName("dataSource")]
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
[HtmlAttributeName("enablePersistence")]
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
[HtmlAttributeName("enableRtl")]
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
[HtmlAttributeName("enableTouchSwipe")]
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
[HtmlAttributeName("height")]
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
[HtmlAttributeName("htmlAttributes")]
public object HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
IndicatorsTemplate
Accepts the template for indicator buttons.
Declaration
[HtmlAttributeName("indicatorsTemplate")]
public string IndicatorsTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Interval
Specifies the interval duration in milliseconds for carousel item transition.
Declaration
[HtmlAttributeName("interval")]
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
[HtmlAttributeName("items")]
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
[HtmlAttributeName("itemTemplate")]
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
[HtmlAttributeName("locale")]
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
[HtmlAttributeName("loop")]
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
[HtmlAttributeName("nextButtonTemplate")]
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
[HtmlAttributeName("partialVisible")]
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
[HtmlAttributeName("pauseOnHover")]
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
[HtmlAttributeName("playButtonTemplate")]
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
[HtmlAttributeName("previousButtonTemplate")]
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
[HtmlAttributeName("selectedIndex")]
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
[HtmlAttributeName("showIndicators")]
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
[HtmlAttributeName("showPlayButton")]
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
[HtmlAttributeName("slideChanged")]
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
[HtmlAttributeName("slideChanging")]
public string SlideChanging { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Width
Specifies the width of the Carousel in pixels/number/percentage. The number value is considered as pixels.
Declaration
[HtmlAttributeName("width")]
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "100%" |