LineGeometry.EndPoint Property

Gets or sets the end point of a line.

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

'Declaration
Public Property EndPoint As Point
<object>
  <object.EndPoint>
    <Point .../>
  </object.EndPoint>
</object>
<object EndPoint="Point" .../>

Property Value

Type: System.Windows.Point
The end point of the line. The default is (0,0).

Identifier field

EndPointProperty

Metadata properties set to true

None

This example shows how to use the LineGeometry class to describe a line. A LineGeometry is defined by its start and end points.

The following example shows how to create and render a LineGeometry. A Path element is used to render the line. Since a line has no area, the Path object's Fill is not specified; instead the Stroke and StrokeThickness properties are used.

<Path Stroke="Black" StrokeThickness="1" >
  <Path.Data>
    <LineGeometry StartPoint="10,20" EndPoint="100,130" />
  </Path.Data>
</Path>
			Dim myLineGeometry As New LineGeometry()
			myLineGeometry.StartPoint = New Point(10,20)
			myLineGeometry.EndPoint = New Point(100,130)

			Dim myPath As New Path()
			myPath.Stroke = Brushes.Black
			myPath.StrokeThickness = 1
			myPath.Data = myLineGeometry
A LineGeometry drawn from (10,20) to (100,130)

A LineGeometry

Other simple geometry classes include LineGeometry and EllipseGeometry. These geometries, as well as more complex ones, can also be created using a PathGeometry or StreamGeometry. For more information, see the Geometry Overview.

.NET Framework

Supported in: 4.5.3, 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