RadCarousel
Displays a scrollable sequence of items with a highlighted item and optional previews of its neighbors. Items snap into position and can display visual effects based on their position relative to the viewport center.
Use the carousel for product and content cards, featured items, media browsing, recommendations, onboarding, and interactive showcases where adjacent-item previews help users discover content. Control the previews with PeekAreaRatio, define item content with ItemTemplate, and customize presentation with ItemViewStyle, ItemViewStyleSelector, and ItemEffectSettings.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadCarousel : RadLayout
Inheritance: objectRadLayoutRadCarousel
Inherited Members
Constructors
Initializes a new instance of the RadCarousel class.
public RadCarousel()
Fields
AllowNextProperty
BindableProperty
Identifies the AllowNext bindable property.
public static readonly BindableProperty AllowNextProperty
AllowPreviousProperty
BindableProperty
Identifies the AllowPrevious bindable property.
public static readonly BindableProperty AllowPreviousProperty
AreItemEffectsEnabledProperty
BindableProperty
Identifies the AreItemEffectsEnabled bindable property.
public static readonly BindableProperty AreItemEffectsEnabledProperty
HighlightedIndexProperty
BindableProperty
Identifies the HighlightedIndex bindable property.
public static readonly BindableProperty HighlightedIndexProperty
HighlightedItemProperty
BindableProperty
Identifies the HighlightedItem bindable property.
public static readonly BindableProperty HighlightedItemProperty
ItemEffectSettingsProperty
BindableProperty
Identifies the ItemEffectSettings bindable property.
public static readonly BindableProperty ItemEffectSettingsProperty
ItemSpacingProperty
BindableProperty
Identifies the ItemSpacing bindable property.
public static readonly BindableProperty ItemSpacingProperty
ItemsSourceProperty
BindableProperty
Identifies the ItemsSource bindable property.
public static readonly BindableProperty ItemsSourceProperty
ItemTemplateProperty
BindableProperty
Identifies the ItemTemplate bindable property.
public static readonly BindableProperty ItemTemplateProperty
ItemViewStyleProperty
BindableProperty
Identifies the ItemViewStyle bindable property.
public static readonly BindableProperty ItemViewStyleProperty
ItemViewStyleSelectorProperty
BindableProperty
Identifies the ItemViewStyleSelector bindable property.
public static readonly BindableProperty ItemViewStyleSelectorProperty
NavigateNextCommandProperty
BindableProperty
Identifies the NavigateNextCommand bindable property.
public static readonly BindableProperty NavigateNextCommandProperty
NavigatePreviousCommandProperty
BindableProperty
Identifies the NavigatePreviousCommand bindable property.
public static readonly BindableProperty NavigatePreviousCommandProperty
OrientationProperty
BindableProperty
Identifies the Orientation bindable property.
public static readonly BindableProperty OrientationProperty
PeekAreaRatioProperty
BindableProperty
Identifies the PeekAreaRatio bindable property.
public static readonly BindableProperty PeekAreaRatioProperty
Properties
Gets or sets a value indicating whether the carousel allows navigation to the next item.
public bool AllowNext { get; set; }
Gets or sets a value indicating whether the carousel allows navigation to the previous item.
public bool AllowPrevious { get; set; }
Gets or sets whether effects are applied to items based on their position relative to the viewport center. The default is true.
public bool AreItemEffectsEnabled { get; set; }
Gets or sets the zero-based index of the highlighted item, or -1 when there are no items. An index outside the item range does not replace the current index.
public int HighlightedIndex { get; set; }
Gets or sets the item displayed in the highlighted position of the carousel. An item outside ItemsSource does not replace the current highlighted item. Use HighlightedIndex to select a specific occurrence of a repeated item.
public object HighlightedItem { get; set; }
Gets or sets the effects applied to items based on their position relative to the viewport center. Changes to an effect or any of its properties update the displayed items. The value cannot be null.
public CarouselItemEffectSettings ItemEffectSettings { get; set; }
Gets or sets the spacing between adjacent carousel items, in device-independent units. The value must be finite and nonnegative. Spacing is ignored when PeekAreaRatio is 0. When AreItemEffectsEnabled is true, the spacing is kept between the scaled items.
public double ItemSpacing { get; set; }
Gets or sets the collection of items displayed by the carousel. Items in the collection must not be null.
public object ItemsSource { get; set; }
ItemTemplate
DataTemplate
Gets or sets the template that defines the visual representation of carousel items.
public DataTemplate ItemTemplate { get; set; }
ItemViewStyle
Style
Gets or sets the style applied to each RadCarouselItemView container.
public Style ItemViewStyle { get; set; }
Gets or sets the selector that chooses a style for each RadCarouselItemView container. When the selector returns null, ItemViewStyle is used.
public IStyleSelector ItemViewStyleSelector { get; set; }
Gets the command that navigates to the next item.
public ICommand NavigateNextCommand { get; }
Gets the command that navigates to the previous item.
public ICommand NavigatePreviousCommand { get; }
Gets or sets the direction in which carousel items are displayed. The default is horizontal.
public Orientation Orientation { get; set; }
Gets or sets the portion of the viewport that is left for neighboring items on both sides of the highlighted item. Valid values range from 0.0 to 0.9. At 0.0, the highlighted item fills the viewport and ItemSpacing has no effect. The maximum of 0.9 keeps 10% of the viewport for the highlighted item.
public double PeekAreaRatio { get; set; }
Methods
Events
Occurs when the highlighted item changes.
public event EventHandler<CarouselHighlightedItemChangedEventArgs> HighlightedItemChanged
Occurs when the carousel scroll position changes.
public event EventHandler<CarouselScrolledEventArgs> Scrolled