<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    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"
    xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
	xmlns:filteringEditors="clr-namespace:Telerik.Windows.Controls.Filtering.Editors;assembly=Telerik.Windows.Controls"
    

    >
    <SolidColorBrush x:Key="BusyIndicatorIndeterminateBorderBrush" Color="White" />
<LinearGradientBrush x:Key="BusyIndicatorIndeterminateBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#E620AEC3" Offset="0"/>
        <GradientStop Color="#821475B5" Offset="1"/>
        <GradientStop Color="#FDC8FBFB" Offset="0.254"/>
        <GradientStop Color="#BE1E79AB" Offset="0.5"/>
    </LinearGradientBrush>
<RadialGradientBrush x:Key="BusyIndicatorIndeterminateCommetFill" Center="0.5,-0.23" GradientOrigin="0.8,0.25" RadiusX="0.68" RadiusY="0.68">
        <GradientStop Color="#BFFFFFFF" Offset="0" />
        <GradientStop Color="#00FFFFFF" Offset="1" />
        <GradientStop Color="#21FFFFFF" Offset="0.65"/>
    </RadialGradientBrush>
<SolidColorBrush x:Key="BusyIndicatorProgressBackground" Color="#FF70AACB" />
<LinearGradientBrush x:Key="BusyIndicatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#A9DCDADA" Offset="1"/>
    </LinearGradientBrush>
<SolidColorBrush x:Key="BusyIndicatorBorderBrush" Color="#FFD0D0D0" />
<SolidColorBrush x:Key="BusyIndicatorBusyOverlayBrush" Color="#88FFFFFF" />

    

    
    <Storyboard x:Key="IndeterminateStoryboard" RepeatBehavior="Forever">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="IndeterminateDonut" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)">
            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="360"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    

    <Style x:Key="BusyIndicatorProgressBarStyle" TargetType="telerik:RadProgressBar">
        
        <Setter Property="Margin" Value="15 15 15 5" />

        <Setter Property="IsIndeterminate" Value="True" />
        
        <Setter Property="Maximum" Value="100" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="IsTabStop" Value="False" />
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadProgressBar">
                    <Grid>

                        
                        
                        <Path x:Name="IndeterminateBackgroundDonut" RenderTransformOrigin="0.5 0.5" Stroke="{StaticResource BusyIndicatorIndeterminateBorderBrush}" Fill="{StaticResource BusyIndicatorIndeterminateBackground}" Height="44" Width="44">
                            <Path.Data>
                                <GeometryGroup FillRule="EvenOdd">
                                    <EllipseGeometry Center="22 22" RadiusX="20" RadiusY="20" />
                                    <EllipseGeometry Center="22 22" RadiusX="14" RadiusY="14" />
                                </GeometryGroup>
                            </Path.Data>
                        </Path>
                        <Path x:Name="IndeterminateDonut" Visibility="Collapsed" Fill="{StaticResource BusyIndicatorIndeterminateCommetFill}" RenderTransformOrigin="0.5 0.5" Height="44" Width="44">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <RotateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                            <Path.Data>
                                <GeometryGroup FillRule="EvenOdd">
                                    <EllipseGeometry Center="22 22" RadiusX="20" RadiusY="20" />
                                    <EllipseGeometry Center="22 22" RadiusX="14" RadiusY="14" />
                                </GeometryGroup>
                            </Path.Data>
                        </Path>
                        <Grid x:Name="ProgressBarTrack" Width="24" Height="24" RenderTransformOrigin="0.5 0.5">
                            <Grid.Clip>
                                <EllipseGeometry RadiusX="12" RadiusY="12" Center="12 12"/>
                            </Grid.Clip>
                            <Grid.RenderTransform>
                                <RotateTransform Angle="-90" />
                            </Grid.RenderTransform>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle x:Name="SkipValueSpacer" />
                            <Rectangle x:Name="ProgressBarIndicator" Grid.Column="1" Fill="{StaticResource BusyIndicatorProgressBackground}" />
                        </Grid>
                    </Grid>
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="True">
                            <Setter TargetName="IndeterminateDonut" Property="Visibility" Value="Visible" />
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="MouseOverStoryboard_BeginStoryboard" Storyboard="{StaticResource IndeterminateStoryboard}"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="MouseOverStoryboard_BeginStoryboard" />
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="telerik:RadBusyIndicator" x:Key="{telerik:ThemeResourceKey ThemeType=telerik:VistaTheme , ElementType=telerik:RadBusyIndicator}" >

        <Setter Property="BusyContent" Value="Loading..."/>
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="DisplayAfter" Value="00:00:00.1" />

        <Setter Property="Background" Value="{StaticResource BusyIndicatorBackground}" />
        <Setter Property="BorderBrush" Value="{StaticResource BusyIndicatorBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />

        <Setter Property="ProgressBarStyle" Value="{StaticResource BusyIndicatorProgressBarStyle}" />
        
        <Setter Property="animation:AnimationManager.AnimationSelector">
            <Setter.Value>
                <animation:AnimationSelector>
                    <animation:FadeAnimation AnimationName="Hide" Direction="Out" TargetElementName="Indicator" />
                    <animation:FadeAnimation AnimationName="Show" Direction="In" TargetElementName="Indicator" />
                </animation:AnimationSelector>
            </Setter.Value>
        </Setter>
        
        <Setter Property="OverlayStyle">
            <Setter.Value>
                <Style TargetType="Rectangle">
                    <Setter Property="Fill" Value="{StaticResource BusyIndicatorBusyOverlayBrush}"/>
                </Style>
            </Setter.Value>
        </Setter>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadBusyIndicator">
                    <Grid Background="{TemplateBinding Background}">
                        
                        
                        <ContentControl x:Name="Content"
                                IsEnabled="False"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />

                        <Rectangle x:Name="Overlay" Style="{TemplateBinding OverlayStyle}" />

						<Border x:Name="Indicator" MinWidth="180" CornerRadius="2" HorizontalAlignment="Center" VerticalAlignment="Center" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <StackPanel>
                                <telerik:RadProgressBar x:Name="ProgressBar" IsIndeterminate="{TemplateBinding IsIndeterminate}" Value="{TemplateBinding ProgressValue}" Style="{TemplateBinding ProgressBarStyle}" />
                                <ContentPresenter Margin="15 5 15 15" HorizontalAlignment="Center" Content="{TemplateBinding BusyContent}" ContentTemplate="{TemplateBinding BusyContentTemplate}" />
                            </StackPanel>
                        </Border>
                    </Grid>
                    
                    
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsBusyIndicationVisible" Value="False">
                            <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="Overlay" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="ProgressBar" Property="IsIndeterminate" Value="False" />
                            <Setter TargetName="Content" Property="IsEnabled" Value="True" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
