LineSegment
LineSegment
LineSegment
LineSegment
Class
Definition
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 .../>
- Inheritance
-
LineSegmentLineSegmentLineSegmentLineSegment
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
ClearValue(DependencyProperty)ClearValue(DependencyProperty)ClearValue(DependencyProperty)ClearValue(DependencyProperty)
GetAnimationBaseValue(DependencyProperty)GetAnimationBaseValue(DependencyProperty)GetAnimationBaseValue(DependencyProperty)GetAnimationBaseValue(DependencyProperty)
GetValue(DependencyProperty)GetValue(DependencyProperty)GetValue(DependencyProperty)GetValue(DependencyProperty)
ReadLocalValue(DependencyProperty)ReadLocalValue(DependencyProperty)ReadLocalValue(DependencyProperty)ReadLocalValue(DependencyProperty)
RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)
Inherited properties
Examples
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).
<Canvas>
<Path Stroke="Black" StrokeThickness="4">
<Path.Data>
<PathGeometry>
<PathGeometry.Figures>
<PathFigure StartPoint="10,20">
<PathFigure.Segments>
<LineSegment Point="100,130"/>
</PathFigure.Segments>
</PathFigure>
</PathGeometry.Figures>
</PathGeometry>
</Path.Data>
</Path>
</Canvas>
Constructors
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.
Properties
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"/>
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.
The identifier for the Point dependency property.