<Window x:Class="StoryBoardBeginStoryboard.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="260" Width="509">
	<StackPanel Name="myPanel">
		<StackPanel.Resources>
			<Storyboard x:Key="myAnimation"  >
				<DoubleAnimation Storyboard.TargetName="myRectangle" Storyboard.TargetProperty="Opacity"
 			From="0" To="1" RepeatBehavior="Forever" Duration="0:0:0.25"/>
				<DoubleAnimation Storyboard.TargetName="myRectangle" Storyboard.TargetProperty="Width"
To="400" RepeatBehavior="Forever" Duration="0:0:0.25" AutoReverse="True" />
			</Storyboard>
		</StackPanel.Resources>
		<Rectangle Margin="30" Width="100" Height="100" Fill="Red" x:Name="myRectangle">
		</Rectangle>
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
			<Button Content="Start" Click="Start_Animation"/>
			<Button Content="Stop" Click="Stop_Animation"/>
			<Button Content="Pauza" Click="Pause_Animation"/>
			<Button Content="Wznów" Click="Resume_Animation"/>
		</StackPanel>
	</StackPanel>
</Window>
