44 lines
2.0 KiB
XML
44 lines
2.0 KiB
XML
<UserControl x:Class="CtrEditor.ObjetosSim.ucTransporteTTop"
|
|
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"
|
|
mc:Ignorable="d"
|
|
xmlns:vm="clr-namespace:CtrEditor.ObjetosSim"
|
|
xmlns:convert="clr-namespace:CtrEditor.Convertidores">
|
|
|
|
<UserControl.Resources>
|
|
<convert:MeterToPixelConverter x:Key="MeterToPixelConverter"/>
|
|
|
|
<!-- 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="Gray" Width="10" Height="10"/>
|
|
<Rectangle Fill="DarkGray" Width="10" Height="10" Canvas.Left="10"/>
|
|
</Canvas>
|
|
</VisualBrush.Visual>
|
|
</VisualBrush>
|
|
</UserControl.Resources>
|
|
|
|
<UserControl.DataContext>
|
|
<vm:osTransporteTTop Ancho="2"/>
|
|
</UserControl.DataContext>
|
|
|
|
<Canvas>
|
|
<Rectangle x:Name="Transporte"
|
|
Width="{Binding Ancho, Converter={StaticResource MeterToPixelConverter}}"
|
|
Height="{Binding Alto, Converter={StaticResource MeterToPixelConverter}}"
|
|
Fill="{StaticResource BeltBrush}">
|
|
<Rectangle.RenderTransform>
|
|
<RotateTransform Angle="{Binding Angulo}"/>
|
|
</Rectangle.RenderTransform>
|
|
</Rectangle>
|
|
</Canvas>
|
|
</UserControl> |