Represents the geometry of a line.

<LineGeometry   .../>

FillRule is technically a property inherited from the base Geometry object, but setting it has no effect on a LineGeometry object.

The following example shows how to create and render a LineGeometry object. A Geometry object only defines the geometry of the object—it does not render anything directly—so the example uses a Path shape to render the line. Because a line has no area, setting the Fill property of the Path would have no effect; instead, only the Stroke and StrokeThickness properties are specified. The following illustration shows the output from the example.

A LineGeometry drawn from (10,20) to (100,130)

Diagonal line.
  Width="200" Height="200"> 
  <Path Stroke="Black" StrokeThickness="1" >
      <LineGeometry StartPoint="10,20" EndPoint="100,130" />

Community Additions