EllipseGeometry::RadiusX Property

Gets or sets the x-radius value of the EllipseGeometry.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property double RadiusX {
	double get ();
	void set (double value);
}
<object RadiusX="double" .../>

Property Value

Type: System::Double
The x-radius value of the EllipseGeometry.

Identifier field

RadiusXProperty

Metadata properties set to true

None

This example shows how to create a shape using the PathGeometry class. PathGeometry objects are composed of one or more PathFigure objects; each PathFigure represents a different "figure" or shape. Each PathFigure is itself composed of one or more PathSegment objects, each representing a connected portion of the figure or shape. Segment types include LineSegment, ArcSegment, and BezierSegment.

The following example uses a PathGeometry to create a triangle. The PathGeometry is displayed using a Path element.

<Path Stroke="Black" StrokeThickness="1">
  <Path.Data>
    <PathGeometry>
      <PathGeometry.Figures>
        <PathFigureCollection>
          <PathFigure IsClosed="True" StartPoint="10,100">
            <PathFigure.Segments>
              <PathSegmentCollection>
                <LineSegment Point="100,100" />
                <LineSegment Point="100,50" />
              </PathSegmentCollection>
            </PathFigure.Segments>
          </PathFigure>
        </PathFigureCollection>
      </PathGeometry.Figures>
    </PathGeometry>
  </Path.Data>
</Path>

The following illustration shows the shape created in the previous example.

A triangle created with a PathGeometry

A PathGeometry

The previous example showed how to create a relatively simple shape, a triangle. A PathGeometry can also be used to create more complex shapes, including arcs and curves. For examples, see How to: Create an Elliptical Arc, How to: Create a Cubic Bezier Curve, and How to: Create a Quadratic Bezier Curve.

This example is part of larger sample; for the complete sample, see the Geometries Sample.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft