RadCarouselElement
Represents the core element that provides carousel functionality with animation and item management capabilities for the RadCarousel control.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadCarouselElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IDisposable
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadCarouselElement...
Implements:
Inherited Members
Constructors
public RadCarouselElement()
Properties
Gets or sets the delay in milliseconds between animation frames during carousel transitions.
[Browsable(false)]
public int AnimationDelay { get; set; }
Gets or sets the number of animation frames used during carousel transitions.
[Browsable(false)]
public int AnimationFrames { get; set; }
Gets or sets a value indicating the interval (in seconds) after which the carousel will resume looping when in auto-loop mode.
public int AutoLoopPauseInterval { get; set; }
Gets the next navigation button element used to navigate to the next carousel item.
[Browsable(false)]
public RadRepeatButtonElement ButtonNext { get; }
Gets or sets the position of the navigation buttons within the carousel element.
[Browsable(false)]
public virtual NavigationButtonsPosition ButtonPositions { get; set; }
Gets the previous navigation button element used to navigate to the previous carousel item.
[Browsable(false)]
public RadRepeatButtonElement ButtonPrevious { get; }
public CarouselItemsContainer CarouselItemContainer { get; }
Gets or sets a value indicating whether sorting of carousel items is case-sensitive.
[Browsable(true)]
public bool CaseSensitive { get; set; }
Gets the currency manager that provides data management functionality for data binding.
protected virtual CurrencyManager DataManager { get; }
Gets or sets the data source that provides data for the carousel items.
[Browsable(false)]
public object DataSource { get; set; }
Gets or sets a value indicating whether the keyboard navigation is enabled.
[Browsable(true)]
public bool EnableKeyboardNavigation { get; set; }
Gets or sets a value indicating whether formatting is applied to the DisplayMember property.
[Browsable(false)]
public bool FormattingEnabled { get; set; }
Gets or sets the default action when item is clicked as CarouselItemClickAction member.
[Browsable(false)]
public CarouselItemClickAction ItemClickDefaultAction { get; set; }
The item click default action.
Gets or sets value indicating the height (in percentage - values from 0.0. to 1.0) of reflection that will be painted bellow each carousel item.
[Browsable(false)]
public double ItemReflectionPercentage { get; set; }
The item reflection percentage.
0.0 indicates no reflection and 1.0 indicates 100% of the height of the original item
Gets a collection of RadItem objects managed by RadCarousel.
public RadItemCollection Items { get; }
Items are populated automatically when RadCarousel is data-bound. When using Virtualized, carousel displays only VisibleItemCount number of items at a time.
Gets the element, which contains all visible carousel items
public CarouselItemsContainer ItemsContainer { get; }
Gets or sets the offset for positioning the navigation buttons relative to their default positions.
[Browsable(false)]
public virtual Size NavigationButtonsOffset { get; set; }
Gets or sets the zero-based index of the currently selected item in the carousel.
[Browsable(false)]
public virtual int SelectedIndex { get; set; }
Gets or sets the currently selected item in the carousel.
[Browsable(false)]
[Bindable(true)]
public virtual object SelectedItem { get; set; }
Gets or sets the value of the currently selected item in the carousel, based on the ValueMember property.
[Browsable(false)]
[Bindable(true)]
public object SelectedValue { get; set; }
Gets or sets the field from the data source to use as the actual value for the carousel items.
[Browsable(false)]
public string ValueMember { get; set; }
Methods
Arranges the child elements within the final layout size, positioning the navigation buttons according to their configured position.
Suspends layout updates for the carousel to improve performance during bulk operations.
public void BeginUpdate()
Creates and initializes the child elements including background, border, carousel container, and navigation buttons.
protected override void CreateChildElements()
Overrides:
Creates a new carousel item instance and allows customization through the NewCarouselItemCreating event.
Handles complete refresh of items when the data manager notifies of changes.
protected virtual void DataManagerItemChanged()
Handles item changes in the data manager when data binding is used.
protected virtual void DataManagerItemChanged(object sender, ItemChangedEventArgs e)
The source of the event.
eItemChangedEventArgsThe item changed event arguments containing the index of the changed item.
Resumes layout updates for the carousel after a BeginUpdate() call.
public void EndUpdate()
Finds the first item in the carousel with text containing the specified substring.
Gets the value of the specified item using the ValueMember property.
Initializes the internal fields and sets up the default behavior for the carousel element.
protected override void InitializeFields()
Overrides:
Determines whether the specified key is an input key for the carousel navigation.
protected override bool IsInputKey(InputKeyEventArgs e)
The input key event arguments containing the key information.
Returns:true if the key is handled by the carousel; otherwise, false.
Overrides:
Called when a carousel animation finishes and handles auto-loop continuation logic.
public virtual void OnAnimationFinished()
Called when a carousel animation starts and raises the AnimationStarted event.
public virtual void OnAnimationStarted()
Raises the ItemDataBound event.
protected virtual void OnItemDataBound(ItemDataBoundEventArgs e)
Fires the ItemEntering event
protected void OnItemEntering(ItemEnteringEventArgs args)
Event specific arguemtns
Fires the ItemLeaving event
protected void OnItemLeaving(ItemLeavingEventArgs args)
Event specific arguemtns
Called when the element is loaded and triggers the initial selection events.
protected override void OnLoaded()
Overrides:
Raises the CreateNewCarouselItem event.
protected virtual void OnNewCarouselItemCreating(NewCarouselItemCreatingEventArgs e)
Handles property change notifications and performs appropriate actions based on the changed property.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the property that changed.
Overrides:
Handles pan gesture events for touch-based carousel navigation.
protected override void OnPanGesture(PanGestureEventArgs args)
The pan gesture event arguments containing gesture information.
Overrides:
Called when a property value changes and handles specific property change logic.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
A RadPropertyChangedEventArgs that contains the event data.
Overrides:
Raises the SelectedIndexChanged event.
protected virtual void OnSelectedIndexChanged(SelectedIndexChangedEventArgs e)
Raises the SelectedItemChanged event.
Raises the SelectedValueChanged event.
Processes keyboard input for carousel navigation when keyboard navigation is enabled.
protected virtual void ProcessOnKeyDown(KeyEventArgs e)
The key event arguments containing the pressed key information.
Refreshes the carousel items from the current data source.
protected virtual void RefreshItems()
Sets the core items collection from the provided list of data items.
protected virtual void SetItemsCore(IList items)
The list of data items to populate the carousel with.
Events
Occurs when carousel animation finishes.
public event EventHandler AnimationFinished
Occurs when carousel animation starts.
public event EventHandler AnimationStarted
Occurs after an Item is data-bound.
[Browsable(false)]
public event ItemDataBoundEventHandler ItemDataBound
Occurs when an Item is about to enter carousel view
public event ItemEnteringEventHandler ItemEntering
Occurs when an Item is about to leave carousel view
public event ItemLeavingEventHandler ItemLeaving
Occurs before a new databound carousel item is created. You can use this event to replace the default item.
[Browsable(false)]
public event NewCarouselItemCreatingEventHandler NewCarouselItemCreating
Occurs when the SelectedIndex property has changed.
[Browsable(true)]
public event EventHandler SelectedIndexChanged
Occurs when the selected item is changed.
[Browsable(false)]
public event EventHandler SelectedItemChanged
Occurs when the SelectedValue property has changed.
[Browsable(true)]
public event EventHandler SelectedValueChanged