CtrEditor/ObjetosSim/Estaticos/ucTransporteTTop.xaml

41 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

<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"
2024-05-22 06:19:31 -03:00
xmlns:vm="clr-namespace:CtrEditor.ObjetosSim"
2024-05-31 10:06:49 -03:00
mc:Ignorable="d">
2024-05-22 06:19:31 -03:00
2024-05-08 08:41:26 -03:00
<UserControl.Resources>
2024-05-22 06:19:31 -03:00
<!-- 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">
2024-05-22 06:19:31 -03:00
<VisualBrush.Transform>
<TransformGroup>
<TranslateTransform/>
</TransformGroup>
2024-05-22 06:19:31 -03:00
</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>
2024-05-08 08:41:26 -03:00
</UserControl.Resources>
2024-05-22 06:19:31 -03:00
<UserControl.DataContext>
<vm:osTransporteTTop Ancho="2"/>
</UserControl.DataContext>
<Canvas>
2024-05-22 06:19:31 -03:00
<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>
2024-05-04 10:53:47 -03:00
</Canvas>
</UserControl>