Path.Data Property

 

Gets or sets a Geometry that specifies the shape to be drawn.

Namespace:   System.Windows.Shapes
Assembly:  PresentationFramework (in PresentationFramework.dll)

member Data : Geometry with get, set

Property Value

Type: System.Windows.Media.Geometry

A description of the shape to be drawn.

To draw simple shapes, use the EllipseGeometry, LineGeometry, and RectangleGeometry objects. To draw curves, arcs, or complex shapes, use the PathGeometry object. To create a composite geometry, use a GeometryGroup. To combine geometries, use a CombinedGeometry.

<Path>
  <Path.Data>
    singleGeometry
  </Path.Data>
</Path>

<object Data="moveAndDrawCommands"/>

singleGeometry

A single object element that derives from Geometry. This can be one of the following:

moveAndDrawCommands

One or more move and draw commands. For the complete syntax, see Path Markup Syntax.

Identifier field

DataProperty

Metadata properties set to true

AffectsRender, AffectsMeasure

The following example shows how to create a Path element and set the Data property by using code.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: