wpf-devexpress-dot-xpf-dot-carousel-dot-carouselpanel-2834cb1b.md
Gets or sets the path along which the Carousel’s items are evenly arranged.
Namespace : DevExpress.Xpf.Carousel
Assembly : DevExpress.Xpf.Carousel.v25.2.dll
NuGet Package : DevExpress.Wpf.Carousel
public PathGeometry ItemMovingPath { get; set; }
Public Property ItemMovingPath As PathGeometry
| Type | Description |
|---|---|
| PathGeometry |
A PathGeometry value that specifies the item path.
|
If you specify an item path via the ItemMovingPath property, items are arranged evenly along the path. If you need to arrange items at specific points along a path, specify a path via the CarouselPanel.PointPathFunction property. In this instance, the ItemMovingPath property will be ignored.
The DXCarousel library defines a set of commonly used paths in its resources. They can be applied via the ItemMovingPath property:
Ellipse
HalfEllipse
Line
Angle
Arc
Rectangle
Sine
Spiral
This example shows how to use the ItemMovingPath property to specify a path for a CarouselPanel.
The path assigned to this property is retrieved from a specific resource (ResourceId=Ellipse) defined in the DXCarousel library. Other built-in path types include: HalfEllipse, Line, Angle, Arc, Rectangle, Sine, and Spiral.
<Window x:Class="CarouselItemMovingPath.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxca="http://schemas.devexpress.com/winfx/2008/xaml/carousel"
Title="Window1" Height="300" Width="300" >
<Grid>
<Grid.Resources>
<Style TargetType="{x:Type Rectangle}"
BasedOn="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=advancedCarouselItemStyle}}" />
</Grid.Resources>
<dxca:CarouselPanel Margin="12" Name="carouselPanel1" VisibleItemCount="5" ActiveItemIndex="2"
ItemMovingPath="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=Ellipse}}">
<Rectangle Fill="Red" />
<Rectangle Fill="Green" />
<Rectangle Fill="Blue" />
<Rectangle Fill="Yellow" />
<Rectangle Fill="Beige" />
</dxca:CarouselPanel>
</Grid>
</Window>
See Also