Path

All the preceding shapes are just special cases of a powerful shape called Path. Path adds only a single Data property to Shape, which can be set to an instance of any geometry, for example:

<Path StrokeThickness="10" Fill="Red">  <Path.Data>    <RectangleGeometry Rect="0,0,100,100"/>  </Path.Data></Path>

Geometries are covered in the next section. First, let’s look at a number of ways to alter the appearance of any shape’s strokes.

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.