LineGeometry LineGeometry LineGeometry Class

Represents the geometry of a line.

Syntax

Declaration

public sealed class LineGeometrypublic sealed class LineGeometryPublic NotInheritable Class LineGeometry
<LineGeometry .../>

Inheritance Hierarchy

Remarks

Examples

This 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.

<Canvas Width="200" Height="200">
    <Path Stroke="Black" StrokeThickness="4" >
        <Path.Data>
            <LineGeometry StartPoint="10,20" EndPoint="100,130" />
        </Path.Data>
    </Path>
</Canvas>

Constructors summary

Initializes a new instance of the LineGeometry class that has no length.

Properties summary

Gets or sets the end point of a line.

Identifies the EndPoint dependency property.

Gets or sets the start point of the line.

Identifies the StartPoint dependency property.

Constructors

  • LineGeometry()
    LineGeometry()
    LineGeometry()
    LineGeometry()

    Initializes a new instance of the LineGeometry class that has no length.

    public LineGeometry()public New()Public Sub New()public LineGeometry()

Properties

  • EndPoint
    EndPoint
    EndPoint
    EndPoint

    Gets or sets the end point of a line.

    public Point EndPoint { get; set; }public Point EndPoint { get; set; }Public ReadWrite Property EndPoint As Pointpublic Point EndPoint { get; set; }
    <LineGeometry EndPoint="x,y"/>
    

    Property Value

  • EndPointProperty
    EndPointProperty
    EndPointProperty
    EndPointProperty

    Identifies the EndPoint dependency property.

    public static DependencyProperty EndPointProperty { get; }public static DependencyProperty EndPointProperty { get; }Public Static ReadOnly Property EndPointProperty As DependencyPropertypublic static DependencyProperty EndPointProperty { get; }

    Property Value

  • StartPoint
    StartPoint
    StartPoint
    StartPoint

    Gets or sets the start point of the line.

    public Point StartPoint { get; set; }public Point StartPoint { get; set; }Public ReadWrite Property StartPoint As Pointpublic Point StartPoint { get; set; }
    <LineGeometry StartPoint="x,y"/>
    

    Property Value

  • StartPointProperty
    StartPointProperty
    StartPointProperty
    StartPointProperty

    Identifies the StartPoint dependency property.

    public static DependencyProperty StartPointProperty { get; }public static DependencyProperty StartPointProperty { get; }Public Static ReadOnly Property StartPointProperty As DependencyPropertypublic static DependencyProperty StartPointProperty { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Media.dll