Mini Kabibi Habibi
<local:CarouselDemoModule x:Class="CarouselDemo.PhotoGallery"
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"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
xmlns:local="clr-namespace:CarouselDemo"
xmlns:collection="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
>
<dxdb:DemoModuleControl>
<Grid ClipToBounds="False">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<dxca:CarouselPanel RenderOptions.BitmapScalingMode="HighQuality"
x:Name="carousel"
AnimationTime="500"
VisibleItemCount="9"
AttractorPointIndex="4"
PathSizingMode="Stretch"
PathPadding="10,5,10,20"
IsAutoSizeItem="True"
ClipToBounds="True"
PathVisible="False"
IsInvertedDirection="True"
Grid.RowSpan="2"
IsRepeat="False"
ItemSize="75,75"
>
<dxca:CarouselPanel.Resources>
<ControlTemplate x:Key="itemTemplate" TargetType="{x:Type ContentControl}">
<Grid VerticalAlignment="Center">
<Border Margin="3,3,0,0" Background="Black" Opacity="0.25" CornerRadius="1" />
<Border Margin="0,0,3,3" Padding="4" BorderBrush="#5F000000" BorderThickness="1" Background="White">
<Image Source="{Binding Path=DataContext, RelativeSource={RelativeSource TemplatedParent}}" Stretch="Uniform" />
</Border>
</Grid>
</ControlTemplate>
<Style TargetType="{x:Type FrameworkElement}" x:Key="itemStyle">
<Setter Property="RenderTransformOrigin" Value="0.5, 0.5" />
<Setter Property="Opacity" Value="{Binding Path=(dxca:CarouselPanel.Parameters).Opacity, RelativeSource={RelativeSource Self}}" />
<Setter Property="Panel.ZIndex" Value="{Binding Path=(dxca:CarouselPanel.Parameters).ZIndex, Converter={local:DoubleToIntConverter}, RelativeSource={RelativeSource Self}}" />
<Setter Property="RenderTransform">
<Setter.Value>
<TransformGroup>
<ScaleTransform ScaleX="{Binding Path=(dxca:CarouselPanel.Parameters).Scale, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ContentControl}}}"
ScaleY="{Binding Path=(dxca:CarouselPanel.Parameters).Scale, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ContentControl}}}"
/>
<TranslateTransform X="{Binding Path=(dxca:CarouselPanel.Parameters).OffsetX, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ContentControl}}}"
Y="{Binding Path=(dxca:CarouselPanel.Parameters).OffsetY, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ContentControl}}}"
/>
</TransformGroup>
</Setter.Value>
</Setter>
</Style>
</dxca:CarouselPanel.Resources>
<dxca:CarouselPanel.ParameterSet>
<dxca:ParameterCollection>
<dxca:Parameter Name="Opacity" DistributionFunction="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=Linear3PConvexNr}}" />
<dxca:Parameter Name="Scale" DistributionFunction="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=Linear3PConvexNr}}" />
<dxca:Parameter Name="ZIndex" DistributionFunction="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type dxca:CarouselPanel}, ResourceId=Linear3PConvexERIntMax}}" />
</dxca:ParameterCollection>
</dxca:CarouselPanel.ParameterSet>
<dxca:CarouselPanel.ItemMovingPath>
<PathGeometry Figures="M255,0 C352.86864,0.5 454.5,61.389274 454.5,136.5 C454.5,211.61073 352.86864,272.5 227.5,272.5 C102.13136,272.5 0.5,211.61073 0.5,136.5 C0.5,61.389274 102.13136,0.5 200,0.5 " />
</dxca:CarouselPanel.ItemMovingPath>
</dxca:CarouselPanel>
<dxdb:ImageControl Margin="30,30,30,0" Source="{Binding ElementName=carousel, Path=ActiveItem.DataContext}" VerticalAlignment="Center" HorizontalAlignment="Center" />
<dxca:CarouselNavigator Width="300"
Height="24"
Grid.Row="2"
Carousel="{Binding ElementName=carousel}"
/>
</Grid>
</dxdb:DemoModuleControl>
</local:CarouselDemoModule>