Class RadzenCarousel
RadzenCarousel component.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenCarousel : RadzenComponent, IDisposable
Examples
<RadzenCarousel Change=@(args => Console.WriteLine($"Selected index is: {args}"))>
<Items>
<RadzenCarouselItem>
Details for Orders
</RadzenCarouselItem>
<RadzenCarousel>
Details for Employees
</RadzenCarouselItem>
</Items>
</RadzenCarousel>
Properties
AllowNavigation
Gets or sets a value indicating whether previous/next navigation is allowed. Set to true
by default.
Declaration
public bool AllowNavigation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowPaging
Gets or sets a value indicating whether paging is allowed. Set to true
by default.
Declaration
public bool AllowPaging { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Auto
Gets or sets a value indicating whether this RadzenCarousel cycle is automatic.
Declaration
public bool Auto { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ButtonShade
Gets or sets the color shade of the buttons.
Declaration
public Shade ButtonShade { get; set; }
Property Value
Type | Description |
---|---|
Shade | The color shade of the buttons. |
ButtonSize
Gets or sets the buttons size.
Declaration
public ButtonSize ButtonSize { get; set; }
Property Value
Type | Description |
---|---|
ButtonSize | The buttons size. |
ButtonStyle
Gets or sets the buttons style
Declaration
public ButtonStyle ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle | The buttons style. |
ButtonVariant
Gets or sets the design variant of the buttons.
Declaration
public Variant ButtonVariant { get; set; }
Property Value
Type | Description |
---|---|
Variant | The variant of the buttons. |
Change
Gets or sets the change callback.
Declaration
public EventCallback<int> Change { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The change callback. |
Interval
Gets or sets the auto-cycle interval in milliseconds.
Declaration
public double Interval { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Items
Gets or sets the items.
Declaration
public RenderFragment Items { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The items. |
NextIcon
Gets or sets the next button icon.
Declaration
public string NextIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String | The next button icon. |
NextText
Gets or sets the next button text.
Declaration
public string NextText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The next button text. |
PagerOverlay
Gets or sets a value indicating whether pager overlays the carousel items. Set to true
by default.
Declaration
public bool PagerOverlay { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PagerPosition
Gets or sets the pager position. Set to PagerPosition.Bottom
by default.
Declaration
public PagerPosition PagerPosition { get; set; }
Property Value
Type | Description |
---|---|
PagerPosition | The pager position. |
PrevIcon
Gets or sets the previous button icon.
Declaration
public string PrevIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String | The previous button icon. |
PrevText
Gets or sets the previous button text.
Declaration
public string PrevText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The previous button text. |
SelectedIndex
Gets or sets the selected index.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The selected index. |
SelectedIndexChanged
Gets or sets the selected index changed callback.
Declaration
public EventCallback<int> SelectedIndexChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The selected index changed callback. |
Methods
AddItem(RadzenCarouselItem)
Adds the item.
Declaration
public void AddItem(RadzenCarouselItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenCarouselItem | item | The item. |
Dispose()
Detaches event handlers and disposes Reference.
Declaration
public override void Dispose()
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
Navigate(Int32)
Navigates to specific index.
Declaration
public async Task Navigate(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
Task |
OnAfterRenderAsync(Boolean)
Called by the Blazor runtime.
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
Task |
Overrides
RemoveItem(RadzenCarouselItem)
Removes the item.
Declaration
public void RemoveItem(RadzenCarouselItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenCarouselItem | item | The item. |
Reset()
Resets the auto-cycle timer.
Declaration
public async Task Reset()
Returns
Type | Description |
---|---|
Task |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |
Overrides
Start()
Starts the auto-cycle timer.
Declaration
public void Start()
Stop()
Stops the auto-cycle timer.
Declaration
public void Stop()