Pen.StartLineCap Property

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

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

public PenLineCap StartLineCap { get; set; }
/** @property */
public PenLineCap get_StartLineCap ()

/** @property */
public void set_StartLineCap (PenLineCap value)

public function get StartLineCap () : PenLineCap

public function set StartLineCap (value : PenLineCap)

<object StartLineCap="PenLineCap" .../>

Property Value

The type of shape that starts 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" />



Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions