Class RadzenCarousel
RadzenCarousel component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenCarousel : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Examples
<RadzenCarousel Change=@(args => Console.WriteLine($"Selected index is: {args}"))>
<Items>
<RadzenCarouselItem>
Details for Orders
</RadzenCarouselItem>
<RadzenCarousel>
Details for Employees
</RadzenCarouselItem>
</Items>
</RadzenCarousel>
Constructors
RadzenCarousel()
RadzenCarousel component.
Declaration
public RadzenCarousel()
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
[Parameter]
public bool AllowNavigation { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
AllowPaging
Gets or sets a value indicating whether paging is allowed. Set to true
by default.
Declaration
[Parameter]
public bool AllowPaging { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Auto
Gets or sets a value indicating whether this RadzenCarousel cycle is automatic.
Declaration
[Parameter]
public bool Auto { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
ButtonShade
Gets or sets the color shade of the buttons.
Declaration
[Parameter]
public Shade ButtonShade { get; set; }
Property Value
Type | Description |
---|---|
Shade | The color shade of the buttons. |
ButtonSize
Gets or sets the buttons size.
Declaration
[Parameter]
public ButtonSize ButtonSize { get; set; }
Property Value
Type | Description |
---|---|
ButtonSize | The buttons size. |
ButtonStyle
Gets or sets the buttons style
Declaration
[Parameter]
public ButtonStyle ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle | The buttons style. |
ButtonVariant
Gets or sets the design variant of the buttons.
Declaration
[Parameter]
public Variant ButtonVariant { get; set; }
Property Value
Type | Description |
---|---|
Variant | The variant of the buttons. |
Change
Gets or sets the change callback.
Declaration
[Parameter]
public EventCallback<int> Change { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<int> | The change callback. |
Interval
Gets or sets the auto-cycle interval in milliseconds.
Declaration
[Parameter]
public double Interval { get; set; }
Property Value
Type | Description |
---|---|
double |
Items
Gets or sets the items.
Declaration
[Parameter]
public RenderFragment Items { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The items. |
NextIcon
Gets or sets the next button icon.
Declaration
[Parameter]
public string NextIcon { get; set; }
Property Value
Type | Description |
---|---|
string | The next button icon. |
NextText
Gets or sets the next button text.
Declaration
[Parameter]
public string NextText { get; set; }
Property Value
Type | Description |
---|---|
string | The next button text. |
PagerOverlay
Gets or sets a value indicating whether pager overlays the carousel items. Set to true
by default.
Declaration
[Parameter]
public bool PagerOverlay { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
PagerPosition
Gets or sets the pager position. Set to PagerPosition.Bottom
by default.
Declaration
[Parameter]
public PagerPosition PagerPosition { get; set; }
Property Value
Type | Description |
---|---|
PagerPosition | The pager position. |
PrevIcon
Gets or sets the previous button icon.
Declaration
[Parameter]
public string PrevIcon { get; set; }
Property Value
Type | Description |
---|---|
string | The previous button icon. |
PrevText
Gets or sets the previous button text.
Declaration
[Parameter]
public string PrevText { get; set; }
Property Value
Type | Description |
---|---|
string | The previous button text. |
SelectedIndex
Gets or sets the selected index.
Declaration
[Parameter]
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
int | The selected index. |
SelectedIndexChanged
Gets or sets the selected index changed callback.
Declaration
[Parameter]
public EventCallback<int> SelectedIndexChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<int> | 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. |
BuildRenderTree(RenderTreeBuilder)
RadzenCarousel component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
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 |
---|---|
string |
Overrides
Navigate(int)
Navigates to specific index.
Declaration
public Task Navigate(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
Task |
OnAfterRenderAsync(bool)
Called by the Blazor runtime.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
bool | 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 Task Reset()
Returns
Type | Description |
---|---|
Task |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override 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()