<UserControl x:Class="BeWo.View.WaitLayer2" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:BeWo="clr-namespace:BeWo" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             mc:Ignorable="d"
             Foreground="{DynamicResource BSOrangeBrush}">
	<UserControl.Resources>
        
        <Style TargetType="{x:Type Rectangle}">
            <Setter Property="Fill" Value="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" />
            <Setter Property="Width" Value="12" />
            <Setter Property="Height" Value="40" />
        </Style>

        <Storyboard x:Key="OnLoaded1" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="45" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="90" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.3" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="135" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="180" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.5" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="225" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="270" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.7" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="315" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
                <LinearDoubleKeyFrame KeyTime="0:0:0" Value="360" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
	</UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource OnLoaded1}" />
        </EventTrigger>
    </UserControl.Triggers>

	<Grid>
		<Grid Background="White" Opacity="0.01" />
		<Border CornerRadius="5,5,5,5" Opacity="0.92" BorderThickness="1,1,1,1" Padding="5,5,5,5" BorderBrush="#FF606060" VerticalAlignment="Center" Width="250" Height="100" Background="#FFFFFFFF">
			<Border.OpacityMask>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#F3FFFFFF" Offset="0.027" />
					<GradientStop Color="#D7FFFFFF" Offset="1" />
				</LinearGradientBrush>
			</Border.OpacityMask>
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="*" />
					<RowDefinition Height="2*" />
				</Grid.RowDefinitions>

				<Label Content="Daten werden übertragen. Bitte warten..." Foreground="#FF000000" FontSize="12" FontFamily="Microsoft Sans Serif" FontWeight="Normal" HorizontalAlignment="Center" VerticalAlignment="Center" />

                <Grid Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="40" Height="40" x:Name="bSLogoControl" RenderTransformOrigin="0.5,0.5" Background="#00000000" >
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1" />
                            <SkewTransform AngleX="0" AngleY="0" />
                            <RotateTransform Angle="0" />
                            <TranslateTransform X="0" Y="0" />
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <Viewbox StretchDirection="Both" Stretch="Fill" MaxWidth="{Binding Path=Width, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" MaxHeight="{Binding Path=Height, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
                        <Canvas Width="100" Height="100">
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0">
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="45" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.875"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.75"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="135" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.625"/>
                            </Canvas>

                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.5"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="225" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.375"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="270" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.25"/>
                            </Canvas>
                            <Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="315" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Canvas.RenderTransform>
                                <Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.125"/>
                            </Canvas>
                        </Canvas>
                    </Viewbox>
                </Grid>
			</Grid>
		</Border>
	</Grid>
</UserControl>