Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-modify-the-cap-at-the-end-of-a-line-or-segment.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.6 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Modify the Cap at the End of a Line or Segment 03/30/2017
Shape elements [WPF], ends
Shape elements [WPF], caps
graphics [WPF], Shape caps
f4bf3416-b3d8-4568-b98e-3eda8f6dbf7a

How to: Modify the Cap at the End of a Line or Segment

This example shows how to modify the shape at the start or end of an open xref:System.Windows.Shapes.Shape element. To change the cap at the beginning of an open xref:System.Windows.Shapes.Shape, use its xref:System.Windows.Shapes.Shape.StrokeStartLineCap%2A property. To change the cap at the end of an open xref:System.Windows.Shapes.Shape, use its xref:System.Windows.Shapes.Shape.StrokeEndLineCap%2A property. To view the available line caps, see the xref:System.Windows.Media.PenLineCap enumeration.

Note

This property only affects an open shape, such as a xref:System.Windows.Shapes.Line, a xref:System.Windows.Shapes.Polyline, or an open xref:System.Windows.Shapes.Path element.

The following example draws four xref:System.Windows.Shapes.Polyline elements and uses a different set of shapes on the ends of each.

Example

[!code-xamldrawingwithshapeelements#ShapeLineCaps1]

This example is part of a larger sample; for the complete sample, see Shape Elements Sample.

See also