O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Geometries and Transforms

If you’re using EllipseGeometry and you don’t want the axes of the ellipse to be aligned on the horizontal and vertical, you can apply a RotateTransform to it. And you have a choice. Because Path derives from UIElement, you can set this RotateTransform to the RenderTransform property of the Path:

<Grid Background="LightCyan">
  <Path Stroke="Maroon"
        StrokeThickness="8"
        Fill="Green">
    <Path.Data>
      <EllipseGeometry Center="250 150"
                       RadiusX="150"
                       RadiusY="100" />
    </Path.Data>
    <Path.RenderTransform>
      <RotateTransform Angle="45"
                       CenterX="250"
                       CenterY="150" />
    </Path.RenderTransform>
  </Path>
</Grid>
image with no caption

Notice that the CenterX and CenterY ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required