title | description | ms.date | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|
How to: Create Multiple Subpaths Within a PathGeometry |
Learn how to create multiple subpaths in a PathGeometry, you must create a PathFigure for each subpath. |
03/30/2017 |
|
104a862c-dde2-4e62-ac87-80660dd1681c |
This example shows how to create multiple subpaths in a xref:System.Windows.Media.PathGeometry. To create multiple subpaths, you create a xref:System.Windows.Media.PathFigure for each subpath.
The following example creates two subpaths, each one a triangle.
[!code-xamlGeometrySample#38]
The following example shows how to create multiple subpaths by using a xref:System.Windows.Shapes.Path and XAML attribute syntax. Each M
creates a new subpath so that the example creates two subpaths that each draw a triangle.
[!code-xamlGeometrySample#58]
(Note that this attribute syntax actually creates a xref:System.Windows.Media.StreamGeometry, a lighter-weight version of a xref:System.Windows.Media.PathGeometry. For more information, see the Path Markup Syntax page.)