<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:vistaCopy="clr-namespace:VistaThemeCopy"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:carousel="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">
    <SolidColorBrush x:Key="Carousel_ItemOuterBorder" Color="#FF84ADC5" />
<LinearGradientBrush x:Key="Carousel_ItemInnerBorder" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFF1FAFF" Offset="0.985"/>
		<GradientStop Color="#FF52D8E8" Offset="1"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="Carousel_ItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FF0A5276"/>
		<GradientStop Color="#FF4D95A9" Offset="0.185"/>
	</LinearGradientBrush>
<LinearGradientBrush x:Key="Carousel_ItemInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFF1FAFF" Offset="0.985"/>
		<GradientStop Color="#FF52D8E8" Offset="1"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="Carousel_ItemForeground_Selected" Color="White" />
<SolidColorBrush x:Key="Carousel_ItemBackground" Color="White" />
<SolidColorBrush x:Key="Carousel_ItemBorder" Color="#7FCEE5FC" />

    

	<carousel:ArithmeticValueConverter x:Key="ArithmeticValueConverter" />

	<ControlTemplate x:Key="CarouselItemTemplate" TargetType="{x:Type local:CarouselItem}">
		<Grid ClipToBounds="False" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" >
			<Border x:Name="reflection" RenderTransformOrigin="0.5, 1" ClipToBounds="False" Width="{Binding ElementName=dialog_Copy, Path=ActualWidth}"                        
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Opacity}" 
                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Visibility}"
                    BorderBrush="White" IsHitTestVisible="False"
                    BorderThickness="0">
				<Border.RenderTransform>
					<TransformGroup>
						<ScaleTransform 
                                        ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                        Path=ReflectionSettings.WidthOffset, 
                                                        Converter={StaticResource ArithmeticValueConverter}, 
                                                        ConverterParameter=1}" 
                                        ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                                        Path=ReflectionSettings.HeightOffset, 
                                                        Converter={StaticResource ArithmeticValueConverter}, 
                                                        ConverterParameter=-1}" 
                                        CenterY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.OffsetY}" />
						<TranslateTransform X="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.OffsetX}" />
						<SkewTransform AngleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.Angle}" />
					</TransformGroup>

				</Border.RenderTransform>
				<Border.OpacityMask>
					<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
						<LinearGradientBrush.GradientStops>
							<GradientStop Offset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ReflectionSettings.HiddenPercentage}" Color="Transparent"/>
							<GradientStop Offset="1" Color="Black"/>
						</LinearGradientBrush.GradientStops>
					</LinearGradientBrush>
				</Border.OpacityMask>
				<Border.Background>
					<VisualBrush Visual="{Binding ElementName=dialog_Copy}">
					</VisualBrush>
				</Border.Background>

			</Border>
			<Border x:Name="dialog_Copy" BorderThickness="1" CornerRadius="4" Background="{TemplateBinding BorderBrush}" BorderBrush="{StaticResource Carousel_ItemOuterBorder}">
				<Border x:Name="CarouselItemBackground" BorderBrush="{StaticResource Carousel_ItemInnerBorder}" BorderThickness="1" CornerRadius="3" Margin="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
					<ContentPresenter x:Name="CarouselContentPresenter" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
				</Border>
			</Border>
		</Grid>

		<ControlTemplate.Triggers>
			<Trigger Property="IsSelected" Value="True">
				<Setter TargetName="CarouselItemBackground" Property="Background" Value="{StaticResource Carousel_ItemBackground_Selected}" />
				<Setter TargetName="CarouselItemBackground" Property="BorderBrush" Value="{StaticResource Carousel_ItemInnerBorder_Selected}" />
				<Setter Property="Foreground" Value="{StaticResource Carousel_ItemForeground_Selected}" />
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>

	<Style x:Key="{telerik:ThemeResourceKey ThemeType=vistaCopy:VistaThemeCopyTheme, ElementType=local:CarouselItem}" TargetType="{x:Type local:CarouselItem}">
		<Setter Property="Template" Value="{StaticResource CarouselItemTemplate}" />
		<Setter Property="Padding" Value="0" />
		<Setter Property="Background" Value="{StaticResource Carousel_ItemBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource Carousel_ItemBorder}" />
		<Setter Property="BorderThickness" Value="6" />
		<Setter Property="VerticalContentAlignment" Value="Top" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
	</Style>

	

</ResourceDictionary>
