<UserControl x:Class="CtrEditor.ObjetosSim.ucDescarte" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:CtrEditor.ObjetosSim"
        xmlns:vm="clr-namespace:CtrEditor.ObjetosSim" mc:Ignorable="d">

    <UserControl.Resources>
        <Storyboard x:Key="PulsingStoryboard" RepeatBehavior="Forever">
            <DoubleAnimation Storyboard.TargetName="AnimatedEllipse"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                    From="1" To="0.5" Duration="0:0:1" AutoReverse="True" />
            <DoubleAnimation Storyboard.TargetName="AnimatedEllipse"
                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                    From="1" To="0.5" Duration="0:0:1" AutoReverse="True" />
        </Storyboard>
    </UserControl.Resources>

    <UserControl.DataContext>
        <vm:osDescarte />
    </UserControl.DataContext>

    <Grid>
        <Ellipse Height="{Binding Diametro, Converter={StaticResource MeterToPixelConverter}}"
                Width="{Binding Diametro, Converter={StaticResource MeterToPixelConverter}}" Stroke="Yellow"
                Fill="Black" Opacity="0.5" />
        <Ellipse x:Name="AnimatedEllipse" Height="{Binding Diametro, Converter={StaticResource MeterToPixelConverter}}"
                Width="{Binding Diametro, Converter={StaticResource MeterToPixelConverter}}" Stroke="Blue"
                Fill="Transparent" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                </TransformGroup>
            </Ellipse.RenderTransform>
        </Ellipse>
    </Grid>
</UserControl>
