<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="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
    xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
    xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
    xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
	xmlns:telerikTransitions="clr-namespace:Telerik.Windows.Controls.TransitionEffects;assembly=Telerik.Windows.Controls"
    xmlns:telerikTransitonControl="clr-namespace:Telerik.Windows.Controls.TransitionControl;assembly=Telerik.Windows.Controls"
    
>

    <LinearGradientBrush x:Key="ProgressBar_FillBrush" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFCDFFCD" Offset="0" />
		<GradientStop Color="#FF1CE233" Offset="1" />
		<GradientStop Color="#FF9CEEAC" Offset="0.5" />
		<GradientStop Color="#FF00D328" Offset="0.51" />
	</LinearGradientBrush>
<LinearGradientBrush x:Key="ProgressBar_Background" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFFFFFFF" Offset="0" />
		<GradientStop Color="#FFD0D0D0" Offset="1" />
		<GradientStop Color="#FFF4F4F4" Offset="0.5" />
		<GradientStop Color="#FFE2E2E2" Offset="0.51" />
	</LinearGradientBrush>
<LinearGradientBrush x:Key="ProgressBar_OuterBorder" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFB2B2B2" Offset="0" />
		<GradientStop Color="#FF8C8C8C" Offset="1" />
	</LinearGradientBrush>
<CornerRadius x:Key="ProgressBar_OuterBorderCornerRadius">2</CornerRadius>
<SolidColorBrush x:Key="ProgressBar_InnerBorder" Color="#FFFFFFFF" />
<CornerRadius x:Key="ProgressBar_InnerBorderCornerRadius">1</CornerRadius>

    
    <Style TargetType="telerik:RadProgressBar"
        
        x:Key="{telerik:ThemeResourceKey ThemeType=vistaCopy:VistaThemeCopyTheme, ElementType=telerik:RadProgressBar}"
         >
		<Setter Property="Foreground" Value="{StaticResource ProgressBar_FillBrush}" />
		<Setter Property="Background" Value="{StaticResource ProgressBar_Background}" />
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Maximum" Value="100"/>
        <Setter Property="Orientation" Value="Horizontal"/>
		<Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="{StaticResource ProgressBar_OuterBorder}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadProgressBar">
                    <Grid>
                        
                        <telerikPrimitives:LayoutTransformControl x:Name="transformationRoot">
                            <Grid x:Name="Root">
                                <Border x:Name="ProgressBarTrack"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource ProgressBar_OuterBorderCornerRadius}"/>
                                <Grid x:Name="ProgressBarRootGrid">
									<Border Margin="{TemplateBinding BorderThickness}"
											x:Name="ProgressBarRootGradient" Canvas.ZIndex="1"
											BorderBrush="{StaticResource ProgressBar_InnerBorder}"
											BorderThickness="{TemplateBinding BorderThickness}"
											CornerRadius="{StaticResource ProgressBar_InnerBorderCornerRadius}" />

									<Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
                                        <Border Margin="{TemplateBinding BorderThickness}"
											    x:Name="IndeterminateSolidFill"
											    Opacity="1"
											    RenderTransformOrigin="0.5,0.5"
											    Background="{TemplateBinding Foreground}"
											    CornerRadius="{StaticResource ProgressBar_OuterBorderCornerRadius}"/>
                                        <Rectangle Margin="{TemplateBinding BorderThickness}"
											    x:Name="IndeterminateGradientFill"
											    Opacity="0.7" RadiusX="1" RadiusY="1">
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint="0,1" StartPoint="20,1"
                                                             MappingMode="Absolute" SpreadMethod="Repeat">
                                                    <LinearGradientBrush.Transform>
                                                        <TransformGroup>
                                                            <TranslateTransform X="0"/>
                                                            <SkewTransform AngleX="-30"/>
                                                        </TransformGroup>
                                                    </LinearGradientBrush.Transform>
                                                    <GradientStop Color="#CCFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#00FFFFFF" Offset=".50"/>
                                                    <GradientStop Color="#CCFFFFFF" Offset="1.10"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                    </Grid>
                                    <Grid Margin="1" x:Name="DeterminateRoot">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Rectangle x:Name="SkipValueSpacer"
                                           Fill="Transparent" Width="0" Height="1"/>
                                        <Rectangle HorizontalAlignment="Left"
                                           Margin="{TemplateBinding BorderThickness}"
                                           x:Name="ProgressBarIndicator"
                                           Fill="{TemplateBinding Foreground}"
                                           StrokeThickness="0.5"
                                           RadiusX="1" RadiusY="1"
                                           Grid.Column="1"/>
                                    </Grid>
                                </Grid>
                            </Grid>
                        </telerikPrimitives:LayoutTransformControl>
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="IsIndeterminateStoryboard">
                                    <Storyboard RepeatBehavior="Forever">
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00"
                                                                       Storyboard.TargetName="IndeterminateRoot"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00"
                                                                       Storyboard.TargetName="DeterminateRoot"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill"
                                                                       Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="IsIndeterminateStoryboard" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="Orientation" Value="Horizontal">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="horizontalStoryboard">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00"
                                                                       Storyboard.TargetName="transformationRoot"
                                                                       Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="0" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="horizontalStoryboard" />
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="verticalStoryboard">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00"
                                                                       Storyboard.TargetName="transformationRoot"
                                                                       Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="-90" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="verticalStoryboard" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
