Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-create-multiple-subpaths-within-a-pathgeometry.md
T
Andy (Steve) De George be103da07e Replace various WPF include files with content (#1335)
* net-current-v30plus-md.md

* net-current-v40plus-md.md

* tla2sharptla-ui-md.md

* tla2sharptla-uiautomation-md.md

* tla2sharptla-winclient-md.md

* tla2sharptla-xaml-md.md

* tlasharptla-ui-md.md

* tlasharptla-uiautomation-md.md

* tlasharptla-winclient-md.md

* tlasharptla-xaml-md.md

* fix warnings
2022-03-16 12:14:11 -04:00

1.4 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Create Multiple Subpaths Within a PathGeometry 03/30/2017
multiple subpaths [WPF]
graphics [WPF], subpaths
subpaths [WPF]
104a862c-dde2-4e62-ac87-80660dd1681c

How to: Create Multiple Subpaths Within a PathGeometry

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.

Example

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.)

See also