Path with ScaleTransformation : RenderTransform « Windows Presentation Foundation « C# / C Sharp






Path with ScaleTransformation

Path with ScaleTransformation
    

<Window x:Class="Animation.KeySplineAnimation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="KeySplineAnimation" Height="250" Width="600">
    <Canvas Margin="10">

        <Path Stroke="Blue" StrokeThickness="1" StrokeDashArray="2 1" Canvas.Top="25">
            <Path.Data>
                <PathGeometry>
                    <PathFigure>
                        <BezierSegment Point1="25,0" Point2="50,70" Point3="100,100" />
                    </PathFigure>
                </PathGeometry>
            </Path.Data>
            <Path.RenderTransform>
                <ScaleTransform ScaleX="2.5"></ScaleTransform>
            </Path.RenderTransform>
        </Path>
        <Path Stroke="Blue" StrokeThickness="1" StrokeDashArray="2 1" Canvas.Left="250" Canvas.Top="25">
            <Path.Data>
                <PathGeometry>
                    <PathFigure>
                        <BezierSegment Point1="25,80" Point2="20,40" Point3="100,100" />
                    </PathFigure>
                </PathGeometry>
            </Path.Data>
            <Path.RenderTransform>
                <ScaleTransform ScaleX="2.5"></ScaleTransform>
            </Path.RenderTransform>
        </Path>
    </Canvas>
</Window>

   
    
    
    
  








Related examples in the same category

1.Rotate the text 90 degrees using a RotateTransformRotate the text 90 degrees using a RotateTransform
2.Skew the text using a TranslateTransformSkew the text using a TranslateTransform
3.Skew the text using a SkewTransformSkew the text using a SkewTransform
4.Scale the text using a ScaleTransformScale the text using a ScaleTransform
5.Scales a rectangle by 200% from a center of (0,0)
6.Scales a rectangle by 200% from a center of (25,25)
7.ScaleX: 0.5 /ScaleY: 0.5 /Center: (25,25)
8.Scales a rectangle by 200% from a center of (0.5,0.5)
9.ScaleX: 0.5 / ScaleY: 0.5 / RenderTransformOrigin: (0.25,0.25)ScaleX: 0.5 / ScaleY: 0.5 / RenderTransformOrigin: (0.25,0.25)
10.Applies a horizontal skew of 45 degrees from a center point of (0,0)Applies a horizontal skew of 45 degrees from a center point of (0,0)
11.Applies a horizontal skew of 45 degrees from a center point of (25,25)Applies a horizontal skew of 45 degrees from a center point of (25,25)
12.Applies a vertical skew of 45 degrees from a center point of (25,25)Applies a vertical skew of 45 degrees from a center point of (25,25)
13.SkewTransform AngleX: 45 / AngleY: 0 / RenderTransformOrigin: (0.5,0.5)SkewTransform AngleX: 45 / AngleY: 0 / RenderTransformOrigin: (0.5,0.5)
14.TranslateTransform X: 50 / Y: 0
15.TranslateTransform X: 0 / Y : 50TranslateTransform X: 0 / Y : 50
16.TranslateTransform X: 50 / Y: 50TranslateTransform X: 50 / Y: 50
17.The X and Y properties of this TranslateTransform are each animated from -50 to 50The X and Y properties of this TranslateTransform are each animated from -50 to 50
18.Rotate then TranslateRotate then Translate
19.Translate then RotateTranslate then Rotate
20.Animated ScaleTransformAnimated ScaleTransform
21.Animated SkewTransform ExampleAnimated SkewTransform Example
22.The ScaleX and ScaleY properties of this ScaleTransform are each animated from 0 to 1The ScaleX and ScaleY properties of this ScaleTransform are each animated from 0 to 1