ClassRadCarouselPanel
Represents a specialized panel that arranges its child elements along a specified path, enabling smooth navigation and customizable visual effects. The RadCarouselPanel supports touch gestures for swiping through items, and allows for various animation effects such as scaling, opacity, and skewing. It provides properties for configuring the number of items displayed, the items moved per swipe, and the animation duration. This panel is typically used for creating carousel-like UI components, allowing items to be brought into view dynamically, while maintaining scroll capabilities and responsive user interaction.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Navigation.dll
Syntax:
[TelerikToolboxCategory("Navigation")]
public class RadCarouselPanel : VirtualizingPanel, IScrollInfo
Inheritance: objectRadCarouselPanel
Implements:
Constructors
RadCarouselPanel()
Initializes a new instance of the RadCarouselPanel class.
Declaration
public RadCarouselPanel()
Fields
AutoLoadItemsProperty
Identifies the AutoLoadItems dependency property.
Declaration
public static readonly DependencyProperty AutoLoadItemsProperty
Field Value
DependencyProperty
IsAnimatingChangedEvent
Identifies the IsAnimatingChanged routed event.
Declaration
public static readonly RoutedEvent IsAnimatingChangedEvent
Field Value
RoutedEvent
IsAnimatingProperty
Identifies the IsAnimating dependency property.
Declaration
public static readonly DependencyProperty IsAnimatingProperty
Field Value
DependencyProperty
IsContinuousProperty
Gets or sets a value indicating whether items should wrap around after the last item is displayed.
Declaration
public static readonly DependencyProperty IsContinuousProperty
Field Value
DependencyProperty
IsOpacityEnabledProperty
Identifies the IsOpacityEnabled dependency property.
Declaration
public static readonly DependencyProperty IsOpacityEnabledProperty
Field Value
DependencyProperty
IsPathVisibleProperty
Identifies the IsPathVisible dependency property.
Declaration
public static readonly DependencyProperty IsPathVisibleProperty
Field Value
DependencyProperty
IsScalingEnabledProperty
Identifies the IsScalingEnabled dependency property.
Declaration
public static readonly DependencyProperty IsScalingEnabledProperty
Field Value
DependencyProperty
IsSelectedTopItemProperty
Identifies the IsSelectedTopItem dependency property.
Declaration
public static readonly DependencyProperty IsSelectedTopItemProperty
Field Value
DependencyProperty
IsSkewAngleXEnabledProperty
Identifies the IsSkewAngleXEnabled dependency property.
Declaration
public static readonly DependencyProperty IsSkewAngleXEnabledProperty
Field Value
DependencyProperty
IsSkewAngleYEnabledProperty
Identifies the IsSkewAngleYEnabled dependency property.
Declaration
public static readonly DependencyProperty IsSkewAngleYEnabledProperty
Field Value
DependencyProperty
ItemsMovementAnimationDurationProperty
Identifies the ItemsMovementAnimationDuration dependency property.
Declaration
public static readonly DependencyProperty ItemsMovementAnimationDurationProperty
Field Value
DependencyProperty
ItemsPerPageProperty
Identifies the ItemsPerPage dependency property.
Declaration
public static readonly DependencyProperty ItemsPerPageProperty
Field Value
DependencyProperty
ItemsPerSwipeProperty
Identifies the ItemsPerSwipe dependency property.
Declaration
public static readonly DependencyProperty ItemsPerSwipeProperty
Field Value
DependencyProperty
OpacityStopsProperty
Identifies the OpacityStops dependency property.
Declaration
public static readonly DependencyProperty OpacityStopsProperty
Field Value
DependencyProperty
PathPaddingProperty
Identifies the PathPadding dependency property.
Declaration
public static readonly DependencyProperty PathPaddingProperty
Field Value
DependencyProperty
ScaleStopsProperty
Identifies the ScaleStops dependency property.
Declaration
public static readonly DependencyProperty ScaleStopsProperty
Field Value
DependencyProperty
SelectedIsTopItemEvent
Identifies the SelectedIsTopItem routed event.
Declaration
public static readonly RoutedEvent SelectedIsTopItemEvent
Field Value
RoutedEvent
SkewAngleXStopsProperty
Identifies the SkewAngleXStops dependency property.
Declaration
public static readonly DependencyProperty SkewAngleXStopsProperty
Field Value
DependencyProperty
SkewAngleYStopsProperty
Identifies the SkewAngleYStops dependency property.
Declaration
public static readonly DependencyProperty SkewAngleYStopsProperty
Field Value
DependencyProperty
TopContainerChangedEvent
Identifies the TopContainerChanged routed event.
Declaration
public static readonly RoutedEvent TopContainerChangedEvent
Field Value
RoutedEvent
TopContainerProperty
Identifies the TopContainer dependency property.
Declaration
public static readonly DependencyProperty TopContainerProperty
Field Value
DependencyProperty
TopItemPathFractionProperty
Identifies the TopItemPathFraction dependency property.
Declaration
public static readonly DependencyProperty TopItemPathFractionProperty
Field Value
DependencyProperty
Properties
AutoLoadItems
Gets or sets a value that indicates whether items will be loaded automatically when the carousel is shown.
CanHorizontallyScroll
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Declaration
public bool CanHorizontallyScroll { get; set; }
Property Value
true if scrolling is possible; otherwise, false. This property has no default value.
CanVerticallyScroll
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Declaration
public bool CanVerticallyScroll { get; set; }
Property Value
true if scrolling is possible; otherwise, false. This property has no default value.
ExtentHeight
Gets the vertical size of the extent.
ExtentWidth
Gets the horizontal size of the extent.
HorizontalOffset
Gets the horizontal offset of the scrolled content.
IsAnimating
Gets a value indicating whether the panel is currently animating.
Declaration
public bool IsAnimating { get; }
Property Value
true if the panel is animating; otherwise, false.
IsContinuous
Gets or sets a value indicating whether items should wrap around after the last item is displayed.
Declaration
public bool IsContinuous { get; set; }
Property Value
true Items should wrap around; otherwise, false.
IsOpacityEnabled
Gets or sets a value indicating whether opacity effect is enabled.
Declaration
public bool IsOpacityEnabled { get; set; }
Property Value
true if opacity effect is enabled; otherwise, false.
IsPathVisible
Gets or sets a value that indicates whether the carousel path is visible.
IsScalingEnabled
Gets or sets a value indicating whether scale effect is enabled.
Declaration
public bool IsScalingEnabled { get; set; }
Property Value
true if scale effect is enabled; otherwise, false.
IsSelectedTopItem
Gets a value indicating whether the selected items has been brought into view.
Declaration
public bool IsSelectedTopItem { get; set; }
Property Value
true if this the selected item's path fraction matches the TopItemPathFractionProperty; otherwise, false.
IsSkewAngleXEnabled
Gets or sets a value indicating whether this instance is skew angle X enabled.
Declaration
public bool IsSkewAngleXEnabled { get; set; }
Property Value
true if this instance is skew angle X enabled; otherwise, false.
IsSkewAngleYEnabled
Gets or sets a value indicating whether this instance is skew angle Y enabled.
Declaration
public bool IsSkewAngleYEnabled { get; set; }
Property Value
true if this instance is skew angle Y enabled; otherwise, false.
ItemsMovementAnimationDuration
Gets or sets the duration of the item movement animation.
Declaration
public TimeSpan ItemsMovementAnimationDuration { get; set; }
Property Value
ItemsPerPage
Gets or sets the number of items per page.
ItemsPerSwipe
Gets or sets the number of items to be scrolled per swipe gesture.
OpacityStops
Gets or sets the opacity stops.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public PathStopCollection OpacityStops { get; set; }
Property Value
The opacity stops.
Path
Gets or sets the carousel path.
Declaration
public Path Path { get; set; }
Property Value
Path
PathPadding
Gets or sets the path padding property.
Declaration
public Thickness PathPadding { get; set; }
Property Value
Thickness
The path padding.
ScaleStops
Gets or sets the scale stops.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public PathStopCollection ScaleStops { get; set; }
Property Value
The scale stops.
ScrollOwner
Gets or sets a ScrollViewer element that controls scrolling behavior.
Declaration
public ScrollViewer ScrollOwner { get; set; }
Property Value
ScrollViewer
A ScrollViewer element that controls scrolling behavior. This property has no default value.
SkewAngleXStops
Gets or sets the skew angle X stops.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public PathStopCollection SkewAngleXStops { get; set; }
Property Value
The skew angle X stops.
SkewAngleYStops
Gets or sets the skew angle Y stops.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public PathStopCollection SkewAngleYStops { get; set; }
Property Value
The skew angle Y stops.
TopContainer
Gets the container that has the largest ZIndex.
Declaration
public UIElement TopContainer { get; }
Property Value
UIElement
The top container.
TopItemPathFraction
Gets or sets the top item path fraction.
Declaration
public double TopItemPathFraction { get; set; }
Property Value
The top item path fraction.
VerticalOffset
Gets the vertical offset of the scrolled content.
ViewportHeight
Gets the vertical size of the viewport for this content.
ViewportWidth
Gets the horizontal size of the viewport for this content.
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
Size
The final area within the parent that this element should use to arrange itself and its children.
Returns
Size
The actual size used.
BringDataItemIntoView(object)
Brings the specified data item into view.
Declaration
public void BringDataItemIntoView(object dataItem)
Parameters
dataItem
The data item to bring into view.
BringIndexIntoView(int)
When implemented in a derived class, generates the item at the specified index location and makes it visible.
Declaration
protected override void BringIndexIntoView(int index)
Parameters
index
The index position of the item that is generated and made visible.
BringItemIntoView(UIElement, bool)
Brings the specified item into view.
Declaration
public void BringItemIntoView(UIElement item, bool isItemSelected)
Parameters
item
UIElement
The item to bring into view.
isItemSelected
Determines whether the item is currently selected.
ClearSelectedItem()
Clears the item that RadCarouselPanel considers as selected.
Declaration
public void ClearSelectedItem()
CreateUIElementCollection(FrameworkElement)
Overrides the default UIElementCollection .
Declaration
protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
Parameters
logicalParent
FrameworkElement
The logical parent element of the collection to be created.
Returns
UIElementCollection
An ordered collection of elements that have the specified logical parent.
LineDown()
Scrolls down within content by one logical unit.
Declaration
public void LineDown()
LineLeft()
Scrolls left within content by one logical unit.
Declaration
public void LineLeft()
LineRight()
Scrolls right within content by one logical unit.
Declaration
public void LineRight()
LineUp()
Scrolls up within content by one logical unit.
Declaration
public void LineUp()
MakeVisible(Visual, Rect)
Forces content to scroll until the coordinate space of a Visual object is visible.
Declaration
public Rect MakeVisible(Visual visual, Rect rectangle)
Parameters
visual
Visual
A Visual that becomes visible.
rectangle
Rect
A bounding rectangle that identifies the coordinate space to make visible.
Returns
Rect
A Rect that is visible.
MeasureOverride(Size)
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
availableSize
Size
The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.
Returns
Size
The size that this element determines it needs during layout, based on its calculations of child element sizes.
MouseWheelDown()
Scrolls down within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelDown()
MouseWheelLeft()
Scrolls left within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelLeft()
MouseWheelRight()
Scrolls right within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelRight()
MouseWheelUp()
Scrolls up within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelUp()
MoveBy(int)
Moves by a specified number of items.
Declaration
public void MoveBy(int displacement)
Parameters
displacement
The number of items to move by. Positive value will move the items forward, while negative one will move the items backwards.
OnIsAnimatingChanged(bool, bool)
Called when IsAnimating property is changed.
OnIsItemsHostChanged(bool, bool)
Indicates that the property value has changed.
OnItemsChanged(object, ItemsChangedEventArgs)
Called when the collection that is associated with the for this Panel changes.
OnRender(DrawingContext)
Draws the content of a DrawingContext object during the render pass of a Panel element.
Declaration
protected override void OnRender(DrawingContext dc)
Parameters
dc
DrawingContext
The DrawingContext object to draw.
OnTopContainerChanged(UIElement, UIElement)
Called when TopContainer property is changed.
Declaration
protected virtual void OnTopContainerChanged(UIElement oldValue, UIElement newValue)
Parameters
oldValue
UIElement
The old value.
newValue
UIElement
The new value.
PageDown()
Scrolls down within content by one page.
Declaration
public void PageDown()
PageLeft()
Scrolls left within content by one page.
Declaration
public void PageLeft()
PageRight()
Scrolls right within content by one page.
Declaration
public void PageRight()
SetHorizontalOffset(double)
Sets the amount of horizontal offset.
Declaration
public void SetHorizontalOffset(double offset)
Parameters
offset
The degree to which content is horizontally offset from the containing viewport.
SetVerticalOffset(double)
Sets the amount of vertical offset.
Declaration
public void SetVerticalOffset(double offset)
Parameters
offset
The degree to which content is vertically offset from the containing viewport.
Events
IsAnimatingChanged
Occurs when IsAnimating property is changed.
Declaration
public event RoutedEventHandler IsAnimatingChanged
Event Value
RoutedEventHandler
SelectedIsTopItem
Occurs when [selected is top item].
Declaration
public event RoutedEventHandler SelectedIsTopItem
Event Value
RoutedEventHandler
TopContainerChanged
Occurs when TopContainer property is changed.
Declaration
public event RoutedEventHandler TopContainerChanged
Event Value
RoutedEventHandler