Transform Property
Collapse the table of content
Expand the table of content

Geometry.Transform Property


Gets or sets the Transform object applied to a Geometry.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public Transform Transform { get; set; }

Property Value

Type: System.Windows.Media.Transform

The transformation applied to the Geometry. Note that this value may be a single Transform or a TransformCollection cast as a Transform.

This method returns the identity transformation if the current object has no transformation value. Otherwise, it returns the Transform applied to the current object.

Identifier field


Metadata properties set to true


The following example shows how to use the Transform property to apply a RotateTransform to a Geometry object.

The example uses a GeometryGroup to create a composite shape from three Geometry objects and then rotates the geometry 45 degrees by using the Transform property.

<Page  xmlns=""

    <!-- Displays the geometry. -->
    <Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">

        <!-- Creates a composite shape from three geometries. -->
        <GeometryGroup FillRule="EvenOdd">
          <LineGeometry StartPoint="10,10" EndPoint="50,30" />
          <EllipseGeometry Center="40,70" RadiusX="30" RadiusY="30" />
          <RectangleGeometry Rect="30,55 100 30" />

          <!-- Rotate the geometry 45 degrees using the Transform Property. -->
            <RotateTransform CenterX="40" CenterY="70" Angle="45" />


.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft