Translate then Rotate : TranslateTransform « Graphics « Silverlight






Translate then Rotate

Translate then Rotate
  


<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>
            <Canvas Height="200" Width="200">
                <Polyline
                  Points="25,25 0,50 25,75 50,50 25,25 25,0" Stroke="Blue" StrokeThickness="10"
                  Canvas.Left="75" Canvas.Top="50">
                    <Polyline.RenderTransform>
                
                    
                        <TransformGroup>
                            <TransformGroup.Children>
                                <TransformCollection>
                                    <TranslateTransform X="50" Y="0" />
                                    <RotateTransform CenterX="25" CenterY="50" Angle="45" />
                                </TransformCollection>
                            </TransformGroup.Children>
                        </TransformGroup>

                    </Polyline.RenderTransform>
                </Polyline>
                <Polyline Points="25,25 0,50 25,75 50,50 25,25 25,0" Stroke="Blue" StrokeThickness="10"
                  Opacity="0.25" Canvas.Left="75" Canvas.Top="50" />

            </Canvas>

</UserControl>

   
    
  








Related examples in the same category

1.Skew the text using a TranslateTransformSkew the text using a TranslateTransform
2.TranslateTransform X: 50 / Y: 0
3.TranslateTransform X: 0 / Y : 50TranslateTransform X: 0 / Y : 50
4.TranslateTransform X: 50 / Y: 50TranslateTransform X: 50 / Y: 50
5.Rotate then TranslateRotate then Translate
6.Animated Text Transform
7.Rendering rectangles with TranslateTransform.Rendering rectangles with TranslateTransform.