simulationRobo.xaml 1.77 KB
<UserControl x:Class="RoboforkApp.simulationRobo"
             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" 
             mc:Ignorable="d" 
             x:Name="SimulationRobo">
    <Path  Name="smuliRobo" Stroke="Orange" StrokeThickness="2" Fill="Orange" RenderTransformOrigin="0.5,0.5" Margin="0,0">
        <Path.Effect>
            <DropShadowEffect BlurRadius="20" Opacity="0.5" ShadowDepth="4" />
        </Path.Effect>       
        <Path.Data>
            <PathGeometry>
                <PathGeometry.Figures>
                    <PathFigure StartPoint="0,0" IsClosed="True">
                        <LineSegment Point="40,0"/>
                        <LineSegment Point="60,15"/>
                        <LineSegment Point="40,30"/>
                        <LineSegment Point="0,30"/>
                    </PathFigure>
                </PathGeometry.Figures>
            </PathGeometry>
        </Path.Data>
        
        <Path.RenderTransform>
            <TransformGroup>
                <MatrixTransform x:Name="fl">
                    <MatrixTransform.Matrix>
                        <Matrix />
                    </MatrixTransform.Matrix>
                </MatrixTransform>
            </TransformGroup>
        </Path.RenderTransform>

        <Path.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard Storyboard="{Binding storyBoard, ElementName=SimulationRobo}" >
                </BeginStoryboard>
            </EventTrigger>
        </Path.Triggers>
    </Path>
</UserControl>