RadCarouselPanel
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
Initializes a new instance of the RadCarouselPanel class.
public RadCarouselPanel()
Fields
AutoLoadItemsProperty
DependencyProperty
Identifies the AutoLoadItems dependency property.
public static readonly DependencyProperty AutoLoadItemsProperty
IsAnimatingChangedEvent
RoutedEvent
Identifies the IsAnimatingChanged routed event.
public static readonly RoutedEvent IsAnimatingChangedEvent
IsAnimatingProperty
DependencyProperty
Identifies the IsAnimating dependency property.
public static readonly DependencyProperty IsAnimatingProperty
IsContinuousProperty
DependencyProperty
Gets or sets a value indicating whether items should wrap around after the last item is displayed.
public static readonly DependencyProperty IsContinuousProperty
IsOpacityEnabledProperty
DependencyProperty
Identifies the IsOpacityEnabled dependency property.
public static readonly DependencyProperty IsOpacityEnabledProperty
IsPathVisibleProperty
DependencyProperty
Identifies the IsPathVisible dependency property.
public static readonly DependencyProperty IsPathVisibleProperty
IsScalingEnabledProperty
DependencyProperty
Identifies the IsScalingEnabled dependency property.
public static readonly DependencyProperty IsScalingEnabledProperty
IsSelectedTopItemProperty
DependencyProperty
Identifies the IsSelectedTopItem dependency property.
public static readonly DependencyProperty IsSelectedTopItemProperty
IsSkewAngleXEnabledProperty
DependencyProperty
Identifies the IsSkewAngleXEnabled dependency property.
public static readonly DependencyProperty IsSkewAngleXEnabledProperty
IsSkewAngleYEnabledProperty
DependencyProperty
Identifies the IsSkewAngleYEnabled dependency property.
public static readonly DependencyProperty IsSkewAngleYEnabledProperty
ItemsMovementAnimationDurationProperty
DependencyProperty
Identifies the ItemsMovementAnimationDuration dependency property.
public static readonly DependencyProperty ItemsMovementAnimationDurationProperty
ItemsPerPageProperty
DependencyProperty
Identifies the ItemsPerPage dependency property.
public static readonly DependencyProperty ItemsPerPageProperty
ItemsPerSwipeProperty
DependencyProperty
Identifies the ItemsPerSwipe dependency property.
public static readonly DependencyProperty ItemsPerSwipeProperty
OpacityStopsProperty
DependencyProperty
Identifies the OpacityStops dependency property.
public static readonly DependencyProperty OpacityStopsProperty
PathPaddingProperty
DependencyProperty
Identifies the PathPadding dependency property.
public static readonly DependencyProperty PathPaddingProperty
ScaleStopsProperty
DependencyProperty
Identifies the ScaleStops dependency property.
public static readonly DependencyProperty ScaleStopsProperty
SelectedIsTopItemEvent
RoutedEvent
Identifies the SelectedIsTopItem routed event.
public static readonly RoutedEvent SelectedIsTopItemEvent
SkewAngleXStopsProperty
DependencyProperty
Identifies the SkewAngleXStops dependency property.
public static readonly DependencyProperty SkewAngleXStopsProperty
SkewAngleYStopsProperty
DependencyProperty
Identifies the SkewAngleYStops dependency property.
public static readonly DependencyProperty SkewAngleYStopsProperty
TopContainerChangedEvent
RoutedEvent
Identifies the TopContainerChanged routed event.
public static readonly RoutedEvent TopContainerChangedEvent
TopContainerProperty
DependencyProperty
Identifies the TopContainer dependency property.
public static readonly DependencyProperty TopContainerProperty
TopItemPathFractionProperty
DependencyProperty
Identifies the TopItemPathFraction dependency property.
public static readonly DependencyProperty TopItemPathFractionProperty
Properties
Gets or sets a value that indicates whether items will be loaded automatically when the carousel is shown.
public bool AutoLoadItems { get; set; }
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
public bool CanHorizontallyScroll { get; set; }
true if scrolling is possible; otherwise, false. This property has no default value.
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
public bool CanVerticallyScroll { get; set; }
true if scrolling is possible; otherwise, false. This property has no default value.
Gets the vertical size of the extent.
public double ExtentHeight { get; }
Gets the horizontal size of the extent.
public double ExtentWidth { get; }
Gets the horizontal offset of the scrolled content.
public double HorizontalOffset { get; }
Gets a value indicating whether the panel is currently animating.
public bool IsAnimating { get; }
true if the panel is animating; otherwise, false.
Gets or sets a value indicating whether items should wrap around after the last item is displayed.
public bool IsContinuous { get; set; }
true Items should wrap around; otherwise, false.
Gets or sets a value indicating whether opacity effect is enabled.
public bool IsOpacityEnabled { get; set; }
true if opacity effect is enabled; otherwise, false.
Gets or sets a value that indicates whether the carousel path is visible.
public bool IsPathVisible { get; set; }
Gets or sets a value indicating whether scale effect is enabled.
public bool IsScalingEnabled { get; set; }
true if scale effect is enabled; otherwise, false.
Gets a value indicating whether the selected items has been brought into view.
public bool IsSelectedTopItem { get; set; }
true if this the selected item's path fraction matches the TopItemPathFractionProperty; otherwise, false.
Gets or sets a value indicating whether this instance is skew angle X enabled.
public bool IsSkewAngleXEnabled { get; set; }
true if this instance is skew angle X enabled; otherwise, false.
Gets or sets a value indicating whether this instance is skew angle Y enabled.
public bool IsSkewAngleYEnabled { get; set; }
true if this instance is skew angle Y enabled; otherwise, false.
Gets or sets the duration of the item movement animation.
public TimeSpan ItemsMovementAnimationDuration { get; set; }
Gets or sets the number of items per page.
public int ItemsPerPage { get; set; }
Gets or sets the number of items to be scrolled per swipe gesture.
public int ItemsPerSwipe { get; set; }
Gets or sets the opacity stops.
public PathStopCollection OpacityStops { get; set; }
The opacity stops.
Path
Path
Gets or sets the carousel path.
public Path Path { get; set; }
PathPadding
Thickness
Gets or sets the path padding property.
public Thickness PathPadding { get; set; }
The path padding.
Gets or sets the scale stops.
public PathStopCollection ScaleStops { get; set; }
The scale stops.
ScrollOwner
ScrollViewer
Gets or sets a ScrollViewer element that controls scrolling behavior.
public ScrollViewer ScrollOwner { get; set; }
A ScrollViewer element that controls scrolling behavior. This property has no default value.
Gets or sets the skew angle X stops.
public PathStopCollection SkewAngleXStops { get; set; }
The skew angle X stops.
Gets or sets the skew angle Y stops.
public PathStopCollection SkewAngleYStops { get; set; }
The skew angle Y stops.
TopContainer
UIElement
Gets the container that has the largest ZIndex.
public UIElement TopContainer { get; }
The top container.
Gets or sets the top item path fraction.
public double TopItemPathFraction { get; set; }
The top item path fraction.
Gets the vertical offset of the scrolled content.
public double VerticalOffset { get; }
A double that represents, in device independent pixels, the vertical offset of the scrolled content. Valid values are between zero and the minus the . This property has no default value.
Gets the vertical size of the viewport for this content.
public double ViewportHeight { get; }
A double that represents, in device independent pixels, the vertical size of the viewport for this content. This property has no default value.
Gets the horizontal size of the viewport for this content.
public double ViewportWidth { get; }
A double that represents, in device independent pixels, the vertical size of the viewport for this content. This property has no default value.
Methods
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size finalSize)
The final area within the parent that this element should use to arrange itself and its children.
Returns:Size
The actual size used.
Brings the specified data item into view.
public void BringDataItemIntoView(object dataItem)
The data item to bring into view.
When implemented in a derived class, generates the item at the specified index location and makes it visible.
protected override void BringIndexIntoView(int index)
The index position of the item that is generated and made visible.
Brings the specified item into view.
public void BringItemIntoView(UIElement item, bool isItemSelected)
The item to bring into view.
isItemSelectedboolDetermines whether the item is currently selected.
Clears the item that RadCarouselPanel considers as selected.
public void ClearSelectedItem()
CreateUIElementCollection(FrameworkElement)
UIElementCollection
Overrides the default UIElementCollection .
protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
The logical parent element of the collection to be created.
Returns:UIElementCollection
An ordered collection of elements that have the specified logical parent.
Scrolls down within content by one logical unit.
public void LineDown()
Scrolls left within content by one logical unit.
public void LineLeft()
Scrolls right within content by one logical unit.
public void LineRight()
Scrolls up within content by one logical unit.
public void LineUp()
Forces content to scroll until the coordinate space of a Visual object is visible.
public Rect MakeVisible(Visual visual, Rect rectangle)
A Visual that becomes visible.
rectangleRectA bounding rectangle that identifies the coordinate space to make visible.
Returns:Rect
A Rect that is visible.
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override Size MeasureOverride(Size availableSize)
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.
Scrolls down within content after a user clicks the wheel button on a mouse.
public void MouseWheelDown()
Scrolls left within content after a user clicks the wheel button on a mouse.
public void MouseWheelLeft()
Scrolls right within content after a user clicks the wheel button on a mouse.
public void MouseWheelRight()
Scrolls up within content after a user clicks the wheel button on a mouse.
public void MouseWheelUp()
Moves by a specified number of items.
public void MoveBy(int displacement)
The number of items to move by. Positive value will move the items forward, while negative one will move the items backwards.
Called when IsAnimating property is changed.
Draws the content of a DrawingContext object during the render pass of a Panel element.
protected override void OnRender(DrawingContext dc)
The DrawingContext object to draw.
Called when TopContainer property is changed.
protected virtual void OnTopContainerChanged(UIElement oldValue, UIElement newValue)
The old value.
newValueUIElementThe new value.
Scrolls down within content by one page.
public void PageDown()
Scrolls left within content by one page.
public void PageLeft()
Scrolls right within content by one page.
public void PageRight()
Scrolls up within content by one page.
public void PageUp()
Sets the amount of horizontal offset.
public void SetHorizontalOffset(double offset)
The degree to which content is horizontally offset from the containing viewport.
Sets the amount of vertical offset.
public void SetVerticalOffset(double offset)
The degree to which content is vertically offset from the containing viewport.
Events
IsAnimatingChanged
RoutedEventHandler
Occurs when IsAnimating property is changed.
public event RoutedEventHandler IsAnimatingChanged
SelectedIsTopItem
RoutedEventHandler
Occurs when [selected is top item].
public event RoutedEventHandler SelectedIsTopItem
TopContainerChanged
RoutedEventHandler
Occurs when TopContainer property is changed.
public event RoutedEventHandler TopContainerChanged