DxCarousel.Enabled Property
Specifies whether the Carousel component responds to user interaction.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(true)]
[Parameter]
public bool Enabled { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
Remarks
Set the Enabled
property to false
to disable the <DxCarousel>
component. When disabled, the component does not respond to user interaction and cannot receive input focus.
<DxCarousel Width="500px"
Height="300px"
@ref="carousel"
Data="@GetCarouselData()"
Enabled="false"
ImageSrcField="Source"
ImageAltField="AlternateText"
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 Source { get; set; }
public string AlternateText { get; set; }
public CarouselData(string source, string alt) {
Source = source;
AlternateText = alt;
}
}
}
See Also