Pen.EndLineCap Property


Gets or sets the type of shape to use at the end of a stroke.

 property System::Windows::Media::PenLineCap EndLineCap { System::Windows::Media::PenLineCap get(); void set(System::Windows::Media::PenLineCap value); };
public System.Windows.Media.PenLineCap EndLineCap { get; set; }
member this.EndLineCap : System.Windows.Media.PenLineCap with get, set
Public Property EndLineCap As PenLineCap

Property Value

The type of shape that ends the stroke. The default value is Flat.


The following example shows how to use the StartLineCap and EndLineCap properties to create a rounded end on one side of a stroke and a triangular end on the other side of the stroke.

  <StackPanel Margin="20">

    <Canvas Margin="100"  Width="100" Height="100">
                <LineGeometry StartPoint="10,10" EndPoint="50,100" />
                <!-- This Pen specifies a round line cap at the beginning of
                     the line and a triangular line cap at the end of the line. -->
                <Pen Brush="Blue" Thickness="8"  StartLineCap="Round" 
                     EndLineCap="Triangle" />




Dependency Property Information

Identifier field EndLineCapProperty
Metadata properties set to true None

Applies to

See also