<UserControl x:Class="CtrEditor.ObjetosSim.ucTransporteTTopDualInverter"
        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:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:vm="clr-namespace:CtrEditor.ObjetosSim"
        mc:Ignorable="d">

    <UserControl.Resources>
        <!-- Define the VisualBrush for the conveyor belt pattern -->
        <VisualBrush x:Key="BeltBrush" TileMode="Tile" Viewport="0,0,20,10" ViewportUnits="Absolute" Viewbox="0,0,20,10"
                ViewboxUnits="Absolute">
            <VisualBrush.Transform>
                <TransformGroup>
                    <TranslateTransform />
                </TransformGroup>
            </VisualBrush.Transform>
            <VisualBrush.Visual>
                <Canvas>
                    <Rectangle Fill="LightGray" Width="10" Height="10" />
                    <Rectangle Fill="GhostWhite" Width="10" Height="10" Canvas.Left="10" />
                </Canvas>
            </VisualBrush.Visual>
        </VisualBrush>
    </UserControl.Resources>

    <UserControl.DataContext>
        <vm:osTransporteTTop Ancho="2" />
    </UserControl.DataContext>

    <Canvas RenderTransformOrigin="0,0">
        <Canvas.RenderTransform>
            <TransformGroup>
                <ScaleTransform />
                <SkewTransform />
                <RotateTransform Angle="{Binding Angulo}" />
                <TranslateTransform />
            </TransformGroup>
        </Canvas.RenderTransform>
        <Rectangle x:Name="Transporte" Width="{Binding Ancho, Converter={StaticResource MeterToPixelConverter}}"
                Height="{Binding Alto, Converter={StaticResource MeterToPixelConverter}}"
                Fill="{StaticResource BeltBrush}">
        </Rectangle>
        <Viewbox Width="{Binding Ancho, Converter={StaticResource MeterToPixelConverter}}"
                Height="{Binding Alto, Converter={StaticResource MeterToPixelConverter}}" Stretch="Uniform">
            <Label Content="{Binding Nombre}" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold"
                    FontSize="18" Opacity="0.9" />
        </Viewbox>
    </Canvas>
</UserControl>