menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Carousel - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Carousel

    Inheritance
    System.Object
    Carousel
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Shared
    Assembly: Syncfusion.Shared.Wpf.dll
    Syntax
    public class Carousel : ItemsControl, IDisposable

    Constructors

    Carousel()

    Initializes a new instance of the Carousel class.

    Declaration
    public Carousel()

    Fields

    EnableLoopingProperty

    Using a DependencyProperty as the backing store for EnableContinuousList. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty EnableLoopingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnableRotationAnimationProperty

    Declaration
    public static readonly DependencyProperty EnableRotationAnimationProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnableTouchProperty

    Declaration
    public static readonly DependencyProperty EnableTouchProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnableVirtualizationProperty

    Declaration
    public static readonly DependencyProperty EnableVirtualizationProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ItemsPerPageProperty

    Declaration
    public static readonly DependencyProperty ItemsPerPageProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    OpacityEnabledProperty

    Declaration
    public static readonly DependencyProperty OpacityEnabledProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    OpacityFractionProperty

    Declaration
    public static readonly DependencyProperty OpacityFractionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    OpacityFractionsProperty

    Declaration
    public static readonly DependencyProperty OpacityFractionsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PathProperty

    Declaration
    public static readonly DependencyProperty PathProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RadiusXProperty

    Declaration
    public static readonly DependencyProperty RadiusXProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RadiusYProperty

    Declaration
    public static readonly DependencyProperty RadiusYProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RotationAngleProperty

    Declaration
    public static readonly DependencyProperty RotationAngleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RotationSpeedProperty

    Declaration
    public static readonly DependencyProperty RotationSpeedProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScaleFractionProperty

    Declaration
    public static readonly DependencyProperty ScaleFractionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScaleFractionsProperty

    Declaration
    public static readonly DependencyProperty ScaleFractionsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScalingEnabledProperty

    Declaration
    public static readonly DependencyProperty ScalingEnabledProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedIndexProperty

    Declaration
    public static readonly DependencyProperty SelectedIndexProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedItemProperty

    Declaration
    public static readonly DependencyProperty SelectedItemProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedValueProperty

    Declaration
    public static readonly DependencyProperty SelectedValueProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleXEnabledProperty

    Declaration
    public static readonly DependencyProperty SkewAngleXEnabledProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleXFractionProperty

    Declaration
    public static readonly DependencyProperty SkewAngleXFractionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleXFractionsProperty

    Declaration
    public static readonly DependencyProperty SkewAngleXFractionsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleYEnabledProperty

    Declaration
    public static readonly DependencyProperty SkewAngleYEnabledProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleYFractionProperty

    Declaration
    public static readonly DependencyProperty SkewAngleYFractionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SkewAngleYFractionsProperty

    Declaration
    public static readonly DependencyProperty SkewAngleYFractionsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    TopItemPositionProperty

    Declaration
    public static readonly DependencyProperty TopItemPositionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    VisualModeProperty

    Declaration
    public static readonly DependencyProperty VisualModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    EnableLooping

    Gets or sets whether to enable continuous scrolling after reaching last item by repeating from start.

    Declaration
    public bool EnableLooping { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    Looping is disabled by default.

    EnableRotationAnimation

    Declaration
    public bool EnableRotationAnimation { get; set; }
    Property Value
    Type
    System.Boolean

    EnableTouch

    Declaration
    public bool EnableTouch { get; set; }
    Property Value
    Type
    System.Boolean

    EnableVirtualization

    Gets or sets a value that indicates whether the virtualization is enabled or not.

    Declaration
    public bool EnableVirtualization { get; set; }
    Property Value
    Type
    System.Boolean

    ItemsPerPage

    Gets or sets the items per page.

    Declaration
    public int ItemsPerPage { get; set; }
    Property Value
    Type Description
    System.Int32

    The items per page.

    OpacityEnabled

    Gets or sets a value indicating whether [opacity enabled].

    Declaration
    public bool OpacityEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [opacity enabled]; otherwise, false.

    OpacityFraction

    Declaration
    public double OpacityFraction { get; set; }
    Property Value
    Type
    System.Double

    OpacityFractions

    Gets or sets the opacity fractions.

    Declaration
    public PathFractionCollection OpacityFractions { get; set; }
    Property Value
    Type Description
    PathFractionCollection

    The opacity fractions.

    Path

    Gets or sets the path.

    Declaration
    public Path Path { get; set; }
    Property Value
    Type Description
    System.Windows.Shapes.Path

    The path.

    RadiusX

    Declaration
    public double RadiusX { get; set; }
    Property Value
    Type
    System.Double

    RadiusY

    Declaration
    public double RadiusY { get; set; }
    Property Value
    Type
    System.Double

    RotationAngle

    Declaration
    public double RotationAngle { get; set; }
    Property Value
    Type
    System.Double

    RotationSpeed

    Declaration
    public double RotationSpeed { get; set; }
    Property Value
    Type
    System.Double

    ScaleFraction

    Declaration
    public double ScaleFraction { get; set; }
    Property Value
    Type
    System.Double

    ScaleFractions

    Gets or sets the scale fractions.

    Declaration
    public PathFractionCollection ScaleFractions { get; set; }
    Property Value
    Type Description
    PathFractionCollection

    The scale fractions.

    ScalingEnabled

    Gets or sets a value indicating whether [scaling enabled].

    Declaration
    public bool ScalingEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [scaling enabled]; otherwise, false.

    SelectedIndex

    Gets or sets the index of the selected

    Declaration
    public int SelectedIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    The index of the selected.

    SelectedItem

    Gets or sets the selected item.

    Declaration
    public object SelectedItem { get; set; }
    Property Value
    Type Description
    System.Object

    The selected item.

    SelectedValue

    Gets or sets the selected value.

    Declaration
    public object SelectedValue { get; set; }
    Property Value
    Type Description
    System.Object

    The selected value.

    SelectFirstItemCommand

    Gets the value that represents the SelectFirstItemCommand

    Declaration
    public static RoutedCommand SelectFirstItemCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the first item in carousel control. It is executed when home key is pressed.

    SelectLastItemCommand

    Gets the value that represents the SelectLastItemCommand

    Declaration
    public static RoutedCommand SelectLastItemCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the last item in carousel control. It is executed when end key is pressed.

    SelectNextItemCommand

    Gets the value that represents the SelectNextItemCommand

    Declaration
    public static RoutedCommand SelectNextItemCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the next item in carousel control. It is executed when right or down arrow key is pressed.

    SelectNextPageCommand

    Gets the value that represents the SelectNextPageCommand

    Declaration
    public static RoutedCommand SelectNextPageCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the item in next page of carousel control. It is executed when page down key is pressed.

    SelectPreviousItemCommand

    Gets the value that represents the SelectPreviousItemCommand

    Declaration
    public static RoutedCommand SelectPreviousItemCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the previous item in carousel control. It is executed when left or top arrow key is pressed.

    SelectPreviousPageCommand

    Gets the value that represents the SelectPreviousPageCommand

    Declaration
    public static RoutedCommand SelectPreviousPageCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedCommand
    Remarks

    This command selects the item in previous page of carousel control. It is executed when page up key is pressed.

    SkewAngleXEnabled

    Gets or sets a value indicating whether [skew angle X enabled].

    Declaration
    public bool SkewAngleXEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [skew angle X enabled]; otherwise, false.

    SkewAngleXFraction

    Gets or sets the skew angle X fraction value applied to the carousel item.

    Declaration
    public double SkewAngleXFraction { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    Default opacity is 0. Expected values are between 0 and 360.

    SkewAngleXFractions

    Gets or sets the skew angle X fractions.

    Declaration
    public PathFractionCollection SkewAngleXFractions { get; set; }
    Property Value
    Type Description
    PathFractionCollection

    The skew angle X fractions.

    SkewAngleYEnabled

    Gets or sets a value indicating whether [skew angle Y enabled].

    Declaration
    public bool SkewAngleYEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [skew angle Y enabled]; otherwise, false.

    SkewAngleYFraction

    Gets or sets the skew angle Y fraction value for carousel item.

    Declaration
    public double SkewAngleYFraction { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    Default opacity is 0. Expected values are between 0 and 360.

    SkewAngleYFractions

    Gets or sets the skew angle Y fractions.

    Declaration
    public PathFractionCollection SkewAngleYFractions { get; set; }
    Property Value
    Type Description
    PathFractionCollection

    The skew angle Y fractions.

    TopItemPosition

    Gets or sets the top item position.

    Declaration
    public double TopItemPosition { get; set; }
    Property Value
    Type Description
    System.Double

    The top item position.

    VisualMode

    Declaration
    public VisualMode VisualMode { get; set; }
    Property Value
    Type
    VisualMode

    Methods

    Dispose()

    Helps to dispose the instances used by Carousel.

    Declaration
    public void Dispose()

    GetContainerForItemOverride()

    Creates or identifies the element that is used to display the given item.

    Declaration
    protected override DependencyObject GetContainerForItemOverride()
    Returns
    Type Description
    System.Windows.DependencyObject

    The element that is used to display the given item.

    IsItemItsOwnContainerOverride(Object)

    Determines if the specified item is (or is eligible to be) its own container.

    Declaration
    protected override bool IsItemItsOwnContainerOverride(object item)
    Parameters
    Type Name Description
    System.Object item

    The item to check.

    Returns
    Type Description
    System.Boolean

    true if the item is (or is eligible to be) its own container; otherwise, false.

    OnApplyTemplate()

    Declaration
    public override void OnApplyTemplate()

    OnItemsChanged(NotifyCollectionChangedEventArgs)

    Raises on Items Changed

    Declaration
    protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    NotifyCollection event args

    OnItemsPerPageChanged(DependencyObject)

    Called when [items per page changed].

    Declaration
    protected void OnItemsPerPageChanged(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The obj.

    OnItemsSourceChanged(IEnumerable, IEnumerable)

    Declaration
    protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
    Parameters
    Type Name Description
    System.Collections.IEnumerable oldValue
    System.Collections.IEnumerable newValue

    OnItemsVisualChanged(DependencyObject)

    Called when [items visual changed].

    Declaration
    protected void OnItemsVisualChanged(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The obj.

    OnMouseDown(MouseButtonEventArgs)

    Declaration
    protected override void OnMouseDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseMove(MouseEventArgs)

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    OnMouseUp(MouseButtonEventArgs)

    Declaration
    protected override void OnMouseUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseWheel(MouseWheelEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseWheel(MouseWheelEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseWheelEventArgs e

    The System.Windows.Input.MouseWheelEventArgs that contains the event data.

    OnPropertyChanged(DependencyPropertyChangedEventArgs)

    Declaration
    protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    OnSelectedIndexChanged(DependencyPropertyChangedEventArgs)

    Raises the SelectedIndexChanged event.

    Declaration
    protected virtual void OnSelectedIndexChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnSelectedItemChanged(DependencyPropertyChangedEventArgs)

    Called when [selected item changed].

    Declaration
    protected void OnSelectedItemChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    OnSelectedValueChanged(DependencyPropertyChangedEventArgs)

    Declaration
    protected void OnSelectedValueChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    OnTopItemPositionChanged(DependencyObject)

    Called when [top item position changed].

    Declaration
    protected void OnTopItemPositionChanged(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj

    The obj.

    PrepareContainerForItemOverride(DependencyObject, Object)

    Prepares the specified element to display the specified item.

    Declaration
    protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
    Parameters
    Type Name Description
    System.Windows.DependencyObject element

    Element used to display the specified item.

    System.Object item

    Specified item.

    SelectFirstItem()

    Selects the first item in Carousel

    Declaration
    public void SelectFirstItem()

    SelectLastItem()

    Selects the last item in Carousel

    Declaration
    public void SelectLastItem()

    SelectNextItem()

    Selects the next item in Carousel

    Declaration
    public void SelectNextItem()

    SelectNextPage()

    Selects item in next page of Carousel

    Declaration
    public void SelectNextPage()

    SelectPreviousItem()

    Selects the previous item in Carousel

    Declaration
    public void SelectPreviousItem()

    SelectPreviousPage()

    Selects item in previous page of Carousel

    Declaration
    public void SelectPreviousPage()

    Events

    SelectedIndexChanged

    Occurs when selected index is changed.

    Declaration
    public event PropertyChangedCallback SelectedIndexChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    SelectedValueChanged

    Occurs when selected value is changed.

    Declaration
    public event PropertyChangedCallback SelectedValueChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    SelectionChanged

    Occurs when selection is changed.

    Declaration
    public event PropertyChangedCallback SelectionChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved