CarouselPanel.PointPathFunction Property

Gets or sets a piece-linear function that specifies a path for the Carousel's items.

Namespace: DevExpress.Xpf.Carousel

Assembly: DevExpress.Xpf.Carousel.v20.2.dll


public PieceLinearFunction PointPathFunction { get; set; }
Public Property PointPathFunction As PieceLinearFunction

Property Value

Type Description

A DevExpress.Xpf.Carousel.PieceLinearFunction object that specifies the path.


You can specify a path for a Carousel's items via the CarouselPanel.ItemMovingPath or PointPathFunction property. If a path is specified via the CarouselPanel.ItemMovingPath property, the Carousel's items are evenly arranged along the path.

If the PointPathFunction property is used to specifiy a path, the CarouselPanel.ItemMovingPath property is ignored, and the Carousel's items are displayed strictly at the points defined by the PointPathFunction function.


This example shows how to anchor a Carousel's items to specific points along a path.

Items can be anchored to points by specifying a path via the PointPathFunction property. In the example, a complex piece linear function is defined. Items are displayed within points specified by the function.

The following image shows the result:


View Example

<Window x:Class="CarouselPointPathFunction.Window1" 
        Title="Window1" Height="300" Width="548" >
            <Style TargetType="{x:Type Rectangle}" BasedOn="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=advancedCarouselItemStyle}}">
                <Setter Property="Opacity" Value="1" />

        <dxca:CarouselPanel Margin="12" Name="carouselPanel1" VisibleItemCount="5" ActiveItemIndex="3">
                            <Point X="0" Y="100" />
                            <Point X="50" Y="100" />
                            <Point X="100" Y="100" />
                            <Point X="100" Y="0" />
                            <Point X="160" Y="100" />
                            <Point X="280" Y="100" />
                            <Point X="300" Y="100" />

            <Rectangle Fill="Red" />
            <Rectangle Fill="Green" />
            <Rectangle Fill="Blue" />
            <Rectangle Fill="Yellow" />
            <Rectangle Fill="Cyan" />
            <Rectangle Fill="Orchid" />
            <Rectangle Fill="Black" />
            <Rectangle Fill="Orange" />
See Also