--- title: "How to: Modify the Cap at the End of a Line or Segment" ms.date: "03/30/2017" helpviewer_keywords: - "Shape elements [WPF], ends" - "Shape elements [WPF], caps" - "graphics [WPF], Shape caps" ms.assetid: 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 element. To change the cap at the beginning of an open , use its property. To change the cap at the end of an open , use its property. To view the available line caps, see the enumeration. > [!NOTE] > This property only affects an open shape, such as a , a , or an open element. The following example draws four elements and uses a different set of shapes on the ends of each. ## Example [!code-xaml[drawingwithshapeelements#ShapeLineCaps1](~/samples/snippets/csharp/VS_Snippets_Wpf/DrawingWithShapeElements/CS/linecapsandjoinsexample.xaml#shapelinecaps1)] This example is part of a larger sample; for the complete sample, see [Shape Elements Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/ShapeElements). ## See also - -