Class Line
Draws a straight line between two points.
Inherited Members
Namespace: System.Windows.Shapes
Assembly: OpenSilver.dll
Syntax
public class Line : Shape, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourceLine()
Initializes a new instance of the Line class.
Declaration
public Line()
Fields
| Improve this Doc View SourceX1Property
Identifies the X1 dependency property.
Declaration
public static readonly DependencyProperty X1Property
Field Value
Type | Description |
---|---|
DependencyProperty |
X2Property
Identifies the X2 dependency property.
Declaration
public static readonly DependencyProperty X2Property
Field Value
Type | Description |
---|---|
DependencyProperty |
Y1Property
Identifies the Y1 dependency property.
Declaration
public static readonly DependencyProperty Y1Property
Field Value
Type | Description |
---|---|
DependencyProperty |
Y2Property
Identifies the Y2 dependency property.
Declaration
public static readonly DependencyProperty Y2Property
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceX1
Gets or sets the x-coordinate of the Line start point.
Declaration
public double X1 { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The x-coordinate for the start point of the line, in pixels. The default is 0. |
X2
Gets or sets the x-coordinate of the Line end point.
Declaration
public double X2 { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The x-coordinate for the end point of the line, in pixels. The default is 0. |
Y1
Gets or sets the y-coordinate of the Line start point.
Declaration
public double Y1 { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The y-coordinate for the start point of the line, in pixels. The default is 0. |
Y2
Gets or sets the y-coordinate of the Line end point.
Declaration
public double Y2 { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The y-coordinate for the end point of the line, in pixels. The default is 0. |