Back to Devexpress

DxCarousel.Height Property

blazor-devexpress-dot-blazor-dot-dxcarousel-6444321e.md

latest1.8 KB
Original Source

DxCarousel.Height Property

Specifies the component height.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string Height { get; set; }

Property Value

TypeDescription
String

The height in CSS units.

|

Remarks

Use Height and Width properties to specify the size of the <DxCarousel> component.

razor
<DxCarousel Data="@GetCarouselData()"
            Width="500px"
            Height="300px"
            ImageSizeMode="CarouselImageSizeMode.FillAndCrop">
</DxCarousel>
csharp
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

DxCarousel Class

DxCarousel Members

DevExpress.Blazor Namespace