LineSegment LineSegment LineSegment LineSegment Class


Represents a line drawn between two points, which can be part of a PathFigure within Path data.

public : sealed class LineSegment : PathSegment, ILineSegmentpublic sealed class LineSegment : PathSegment, ILineSegmentPublic NotInheritable Class LineSegment Inherits PathSegment Implements ILineSegment// This API is not available in Javascript.
<LineSegment .../>
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties


This example creates a simple PathGeometry made up of a single PathFigure with a LineSegment and displays it using a Path element. The PathFigure object's StartPoint is set to (10,20) and a LineSegment is defined with an end point of (100,130).

    <Path Stroke="Black" StrokeThickness="4">
                    <PathFigure StartPoint="10,20">
                            <LineSegment Point="100,130"/>


LineSegment() LineSegment() LineSegment() LineSegment()

Initializes a new instance of the LineSegment class.

public : LineSegment()public LineSegment()Public Sub New()// This API is not available in Javascript.


Point Point Point Point

Gets or sets the end point of the line segment.

public : Point Point { get; set; }public Point Point { get; set; }Public ReadWrite Property Point As Point// This API is not available in Javascript.
<LineSegment Point="x,y"/>
Point Point Point Point

The end point of the line segment. The default is a Point with value 0,0.

PointProperty PointProperty PointProperty PointProperty

Identifies the Point dependency property.

public : static DependencyProperty PointProperty { get; }public static DependencyProperty PointProperty { get; }Public Static ReadOnly Property PointProperty As DependencyProperty// This API is not available in Javascript.
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Point dependency property.

See Also