Class RadCarousel
Represents a carousel control that animates a group of items in a carousel-style rotation with customizable paths and animations.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadCarousel : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Remarks
You can add item to RadCarousel control using Items collection, or through binding to data by assigning its DataSource properties. In order to manage the display of great number of items you may need to set the VirtualMode property to true. In this case you should specify the maximum visible number of item, using the VisibleItemCount property. Item path can be specified through CarouselPath property. Each carousel path instance contains properties to adjust various aspects of the path curve, including "start" and "end" position, selected items position. If you use a RadCarousel bound to a data, you would need to handle the ItemDataBound event to change each carouselItem's properties according to items in the data source. You may also need to handle the NewCarouselItemCreating event, to change the default type of items RadCarousel will produce when data binding.
Constructors
RadCarousel()
Properties
AnimationDelay
Gets or sets the delay in ms. between two frames of animation.
Declaration
public int AnimationDelay { get; set; }
Property Value
System.Int32
|
AnimationFrames
Gets or sets the number of animation frames between two positions.
Declaration
public int AnimationFrames { get; set; }
Property Value
System.Int32
|
AnimationsToApply
Gets or sets value indicating which of the predefined animations will be applied to carousel items
Declaration
public Animations AnimationsToApply { get; set; }
Property Value
Animations
|
AutoLoopDirection
Gets or sets a value indicating whether carousel will increment or decrement item indexes when in auto-loop mode.
Declaration
public AutoLoopDirections AutoLoopDirection { get; set; }
Property Value
AutoLoopDirections
|
AutoLoopPauseCondition
Gets or sets a value indicating when carousel will pause looping if in auto-loop mode.
Declaration
public AutoLoopPauseConditions AutoLoopPauseCondition { get; set; }
Property Value
AutoLoopPauseConditions
|
AutoLoopPauseInterval
Gets or sets a value indicating the interval (in seconds) after which the carousel will resume looping when in auto-loop mode.
Declaration
public int AutoLoopPauseInterval { get; set; }
Property Value
System.Int32
|
AutoSize
This property is not relevant for this class.
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
ButtonNext
Gets the Next button that is used to navigate to the next item.
Declaration
public RadRepeatButtonElement ButtonNext { get; }
Property Value
RadRepeatButtonElement
|
ButtonPositions
Represent the Navigation buttons Positions
Declaration
public virtual NavigationButtonsPosition ButtonPositions { get; set; }
Property Value
NavigationButtonsPosition
|
ButtonPrevious
Gets the Previous button that is used to navigate to the previous item.
Declaration
public RadRepeatButtonElement ButtonPrevious { get; }
Property Value
RadRepeatButtonElement
|
CarouselElement
Gets a reference to the Carousel element, which encapsulates the most of the functionality of RadCarousel
Declaration
public RadCarouselElement CarouselElement { get; }
Property Value
RadCarouselElement
|
CarouselPath
Gets or sets the path that carousel items will follow when animated.
Declaration
public CarouselParameterPath CarouselPath { get; set; }
Property Value
CarouselParameterPath
|
DataSource
Gets or sets the data source for the carousel items.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
|
DefaultSize
Gets the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
EasingType
Gets or sets the easing equation to be used for the animations.
Declaration
public RadEasingType EasingType { get; set; }
Property Value
RadEasingType
|
EnableAnimationOnFormResize
Enable or disable the re-animation of RadCarousel on form maximize, minimize or resize
Declaration
public virtual bool EnableAnimationOnFormResize { get; set; }
Property Value
System.Boolean
|
EnableAutoLoop
Gets or sets a value indicating that the Carousel will loop items automatically.
Declaration
public bool EnableAutoLoop { get; set; }
Property Value
System.Boolean
|
EnableKeyboardNavigation
EnableLooping
Gets or sets value indicating that when item position goes beyond the carousel path, it will be displayed again in the beginning of the carousel path.
Declaration
public bool EnableLooping { get; set; }
Property Value
System.Boolean
|
EnableRelativePath
Gets or sets a value indicating whether relative point coordinates are used. If set to true, each point should be between 0 and 100.
Declaration
public bool EnableRelativePath { get; set; }
Property Value
System.Boolean
|
FormattingEnabled
Gets or sets a value indicating whether formatting is applied to the DisplayMember property.
Declaration
public bool FormattingEnabled { get; set; }
Property Value
System.Boolean
|
ItemClickDefaultAction
Gets or sets the default action when item is clicked as CarouselItemClickAction member.
Declaration
public CarouselItemClickAction ItemClickDefaultAction { get; set; }
Property Value
CarouselItemClickAction
The item click default action. |
ItemReflectionPercentage
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.
Declaration
public double ItemReflectionPercentage { get; set; }
Property Value
System.Double
The item reflection percentage. |
Remarks
0.0 indicates no reflection and 1.0 indicates 100% of the height of the original item
Items
Gets the collection of items in the carousel.
Declaration
[RadEditItemsAction]
[RadDescription("Items", typeof(RadCarouselElement))]
public RadItemCollection Items { get; }
Property Value
RadItemCollection
|
MinFadeOpacity
Gets or sets value indicating the minimum value of the opacity applied to items
Declaration
public double MinFadeOpacity { get; set; }
Property Value
System.Double
|
NavigationButtonsOffset
OpacityChangeCondition
Sets the way opacity is applied to carousel items
Declaration
public OpacityChangeConditions OpacityChangeCondition { get; set; }
Property Value
OpacityChangeConditions
|
SelectedIndex
Gets or sets the item in the carousel that is currently selected.
Declaration
public virtual int SelectedIndex { get; set; }
Property Value
System.Int32
|
SelectedItem
Gets or sets the currently selected item in the carousel.
Declaration
public virtual object SelectedItem { get; set; }
Property Value
System.Object
|
SelectedValue
Gets or sets the value of the currently selected item in the carousel.
Declaration
public object SelectedValue { get; set; }
Property Value
System.Object
|
ValueMember
Gets or sets the field from the data source to use as the actual value for the carousel items.
Declaration
public string ValueMember { get; set; }
Property Value
System.String
|
VirtualMode
Get or sets value indicating the maximum number of items that will be displayed in the carousel, even when there are more Items in the Items collection. Virtualizing the carousel would significantly improve its performance.
Declaration
public bool VirtualMode { get; set; }
Property Value
System.Boolean
|
Remarks
False indicates that all items be displayed. It depends on SelectedIndex, which items are displayed in this case.
VisibleItemCount
Gets or sets the number of items that carousel displays when VirtualMode is set to true.
Declaration
public int VisibleItemCount { get; set; }
Property Value
System.Int32
|
Methods
ControlDefinesThemeForElement(RadElement)
Determines whether the control defines the theme for the specified element.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
RadElement
element
The element to check. |
Returns
System.Boolean
true if the control defines the theme for the element; otherwise, false. |
Overrides
CreateChildItems(RadElement)
Creates the child elements for the RadCarousel control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
The parent element to which the child elements will be added. |
Overrides
GetInputElement()
Gets the input element for keyboard navigation.
Declaration
protected override RadElement GetInputElement()
Returns
RadElement
The RadCarouselElement that handles input. |
Overrides
OnLoad(Size)
Called when the control is loaded. Enables pan gesture support for the carousel.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size
desiredSize
The desired size for the control. |
Overrides
Events
ItemDataBound
Occurs after an Item is data-bound.
Declaration
public event ItemDataBoundEventHandler ItemDataBound
Event Type
ItemDataBoundEventHandler
|
NewCarouselItemCreating
Occurs before a new data-bound carousel item is created. You can use this event to replace the default item.
Declaration
public event NewCarouselItemCreatingEventHandler NewCarouselItemCreating
Event Type
NewCarouselItemCreatingEventHandler
|
SelectedIndexChanged
Occurs when the SelectedIndex property has changed.
Declaration
public event EventHandler SelectedIndexChanged
Event Type
System.EventHandler
|
SelectedItemChanged
Occurs when the selected item is changed.
Declaration
public event EventHandler SelectedItemChanged
Event Type
System.EventHandler
|
SelectedValueChanged
Occurs when the SelectedValue property has changed.
Declaration
public event EventHandler SelectedValueChanged
Event Type
System.EventHandler
|