<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					
				
					xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"     
					xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:treelist="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
				
				
			
	>

    <SolidColorBrush x:Key="GridView_LoadingBackground" Color="#98080808"/>
<SolidColorBrush x:Key="GridView_LoadingIndicatorBackground" Color="#8C878787"/>
<LinearGradientBrush x:Key="GridView_LoadingIndicatorBorder" EndPoint="0.04,0.5" StartPoint="0.972,0.5">
		<GradientStop Color="#FF707070" Offset="0"/>
		<GradientStop Color="#FF707070" Offset="1"/>
		<GradientStop Color="#FFA3A3A3" Offset="0.5"/>
		<GradientStop Color="#FF707070" Offset="0.993"/>
	</LinearGradientBrush>

    

	<Storyboard x:Key="FadeIn">
		<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BusyIndicatorBackground" Storyboard.TargetProperty="Opacity">
			<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
		</DoubleAnimationUsingKeyFrames>
	</Storyboard>
	<Storyboard x:Key="BusyAnimation" RepeatBehavior="Forever">
		<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BusyIndicator" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
			<SplineDoubleKeyFrame KeyTime="00:00:01" Value="180"/>
		</DoubleAnimationUsingKeyFrames>
	</Storyboard>
	
	<ControlTemplate x:Key="GridViewLoadingIndicatorTemplate" TargetType="grid:GridViewLoadingIndicator" >		
		<Border x:Name="BusyIndicatorBackground" Background="{StaticResource GridView_LoadingBackground}" 
				
				Opacity="0" 
				
			>
			<Path x:Name="BusyIndicator" Stretch="Fill" 
				  Stroke="{TemplateBinding BorderBrush}" 
				  StrokeThickness="{TemplateBinding BorderThickness}"
				  Fill="{TemplateBinding Background}"
				  Margin="{TemplateBinding Padding}"
				  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
				  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="36" Height="36" Data="M18,5.0000002 C10.820298,5 5,10.820298 5.0000002,18 5,25.179701 10.820298,31 18,31 25.179701,31 31,25.179701 31,18 31,10.820298 25.179701,5 18,5.0000002 z M18,0 C27.941126,0 36,8.0588746 36,18 36,27.941126 27.941126,36 18,36 8.0588746,36 0,27.941126 0,18 0,8.0588746 8.0588746,0 18,0 z" RenderTransformOrigin="0.5,0.5">
				<Path.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-180"/>
						<TranslateTransform/>
					</TransformGroup>
				</Path.RenderTransform>
			</Path>
			
		</Border>

		
		<ControlTemplate.Triggers>
			<Trigger Property="Visibility" Value="Visible">
				<Trigger.EnterActions>
					<BeginStoryboard Storyboard="{StaticResource BusyAnimation}" x:Name="Animation" />
					<BeginStoryboard Storyboard="{StaticResource FadeIn}" x:Name="Fade" />
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<StopStoryboard BeginStoryboardName="Animation" />
					<StopStoryboard BeginStoryboardName="Fade" />
				</Trigger.ExitActions>
			</Trigger>
		</ControlTemplate.Triggers>
		
		
	</ControlTemplate>

   
    <Style  
        x:Key="{telerik:ThemeResourceKey ThemeType=telerik:ExpressionDarkTheme, ElementType=grid:GridViewLoadingIndicator}"
        
        TargetType="grid:GridViewLoadingIndicator">
        <Setter Property="Template" Value="{StaticResource GridViewLoadingIndicatorTemplate}" />
		
		<Setter Property="Background" Value="{StaticResource GridView_LoadingIndicatorBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource GridView_LoadingIndicatorBorder}" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Padding" Value="0" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Center" />

    </Style>
        
	
</ResourceDictionary>