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

    <UserControl.DataContext>
        <vm:osBoton Color="#FFADE6C0" ColorButton="#FFC72323" Color_Pressed="#FF9A9A9A" />
    </UserControl.DataContext>

    <Canvas RenderTransformOrigin="0.5,0.5">
        <Canvas.RenderTransform>
            <TransformGroup>
                <ScaleTransform/>
                <SkewTransform/>
                <RotateTransform Angle="{Binding Angulo}"/>
                <TranslateTransform/>
            </TransformGroup>
        </Canvas.RenderTransform>
        <Border x:Name="BackgroundRectangle"
                BorderBrush="Black"
                BorderThickness="2"
                CornerRadius="0,0,10,10"
                Width="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}"
                Height="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}, ConverterParameter=1.5}"
                VerticalAlignment="Top"
                HorizontalAlignment="Left"
                Background="{Binding Color_Pressed, Converter={StaticResource ColorToBrushConverter}}"/>
        <Ellipse Fill="{Binding ColorButton, Converter={StaticResource ColorToBrushConverter}}"
                 Stroke="Black"
                 StrokeThickness="2"
                 Width="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}"
                 Height="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}"
                 Canvas.Top="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}, ConverterParameter=0.5}"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Bottom"
                 MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"
                 MouseLeftButtonUp="Ellipse_MouseLeftButtonUp">
        </Ellipse>
        <Viewbox Height="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}, ConverterParameter=0.5}" 
                 Width="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}">
            <Label Content="{Binding Button_Name}"                       
                   VerticalAlignment="Top" HorizontalAlignment="Center"
                   Foreground="{Binding Color_Titulo, Converter={StaticResource ColorToBrushConverter}}"/>
        </Viewbox>

    </Canvas>
</UserControl>
