You are on page 1of 3

<Window x:Class="Animaciones.

Balanza"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Animaciones"
mc:Ignorable="d"
Title="Balanza" Height="450" Width="800" >
<Canvas>
<Canvas Canvas.Left="250" >
<Path Stroke="Black" StrokeThickness="2" Fill="SandyBrown" Data="M80,220
L140,220 L120,180 L120,20 L100,20 L100,180 L80,220"></Path>
<Canvas>
<Path Fill="SandyBrown" StrokeThickness="2" Data="M10,50 L220,50
L220,60 L10,60 L10,50"></Path>

<Canvas>
<Path Fill="Black" Canvas.Left="140" Data="M40,50 L10,100 L20,100
L46,55 L65,100 L75,100 L55,49 L40,50"></Path>
<Path Stroke="Black" Fill="Gray" Data="M10,150 A30,15 1 1 0 80,150
L10,150" Canvas.Left="140" Canvas.Top="-50"></Path>
</Canvas>

<Canvas>
<Path Fill="Black" Data="M40,50 L10,100 L20,100 L46,55 L65,100
L75,100 L55,49 L40,50"></Path>
<Path Stroke="Black" Fill="Gray" Data="M10,150 A30,15 1 1 0 80,150
L10,150" Canvas.Top="-50"></Path>
</Canvas>

<Canvas.RenderTransform>
<TransformGroup>
<RotateTransform Angle="0" CenterX="115" CenterY="55"
x:Name="rotar"></RotateTransform>
</TransformGroup>
</Canvas.RenderTransform>
<Canvas.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Angle"
RepeatBehavior="Forever" AutoReverse="True"
Storyboard.TargetName="rotar"
Duration="0:0:04" From="-15" To="15" SpeedRatio="2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Canvas.Triggers>

</Canvas>
</Canvas>
</Canvas>
</Window>

You might also like