Skip to main content
All docs
V24.2

DxCarousel.AnimationEnabled Property

Specifies whether the carousel animation is enabled.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(true)]
[Parameter]
public bool AnimationEnabled { get; set; }

Property Value

Type Default Description
Boolean true

true to enable the carousel animation; otherwise; false.

Remarks

The <DxCarousel> component animates slide (item) changes. Use the AnimationDuration property to specify the animation duration. To disable current animation, set the AnimationEnabled property to false.

<DxCarousel Width="500px"
            Height="300px"
            Data="@GetCarouselData()"
            AnimationEnable="false"
            LoopNavigationEnabled="true"
            ImageSizeMode="CarouselImageSizeMode.FillAndCrop">
</DxCarousel>

@code {
    List<CarouselData> GetCarouselData() {
        List<CarouselData> result = new List<CarouselData>();
        result.Add(new CarouselData("../images/image1.jpg", "image 1"));
        result.Add(new CarouselData("../images/image2.jpg", "image 2"));
        result.Add(new CarouselData("../images/image3.jpg", "image 3"));
        result.Add(new CarouselData("../images/image4.jpg", "image 4"));

        return result;
    }

    public class CarouselData {
        public string Src { get; set; }
        public string Alt { get; set; }

        public CarouselData(string src, string alt) {
            Src = src;
            Alt = alt;
        }
    }
}
See Also