<Window x:Class="BallAnimation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Funkcje ułatwiające" Height="235" Width="313">
    <Window.Background>
        <ImageBrush >
            <ImageBrush.ImageSource>
                <BitmapImage UriSource="Images/background.png"/>
            </ImageBrush.ImageSource>
        </ImageBrush>
    </Window.Background>

    <Canvas Height="150" Width="250" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Image Canvas.Top="0" Canvas.Left="0" Source="Images\ball.png" Height="50" Width="50">
            <Image.RenderTransform>
                <RotateTransform CenterX="25" CenterY="25"/>
            </Image.RenderTransform>
            <Image.Triggers>
                <EventTrigger RoutedEvent="Image.Loaded">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetProperty="(Canvas.Left)"
 To="250" Duration="0:0:3"/>
                                <DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle"
To="700" Duration="0:0:3"/>
                                <DoubleAnimation Storyboard.TargetProperty="(Canvas.Top)"
 To="150" Duration="0:0:3">
                                    <DoubleAnimation.EasingFunction>
                                        <BounceEase />
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Image.Triggers>
        </Image>
    </Canvas>
</Window>