Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-apply-a-guidelineset-to-a-drawing.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

2.1 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Apply a GuidelineSet to a Drawing 03/30/2017
GuidelineSet property [WPF], applying to drawings
graphics [WPF], GuidelineSet property
45f3e0b4-8820-45a7-b865-b8ea5b17b0c8

How to: Apply a GuidelineSet to a Drawing

This example shows how to apply a xref:System.Windows.Media.GuidelineSet to a xref:System.Windows.Media.DrawingGroup.

The xref:System.Windows.Media.DrawingGroup class is the only type of xref:System.Windows.Media.Drawing that has a xref:System.Windows.Media.DrawingGroup.GuidelineSet%2A property. To apply a xref:System.Windows.Media.GuidelineSet to another type of xref:System.Windows.Media.Drawing, add it to a xref:System.Windows.Media.DrawingGroup and then apply the xref:System.Windows.Media.GuidelineSet to your xref:System.Windows.Media.DrawingGroup.

Example

The following example creates two xref:System.Windows.Media.DrawingGroup objects that are almost identical; the only difference is: the second xref:System.Windows.Media.DrawingGroup has a xref:System.Windows.Media.GuidelineSet and the first does not.

The following illustration shows the output from the example. Because the rendering difference between the two xref:System.Windows.Media.DrawingGroup objects is so subtle, portions of the drawings are enlarged.

A DrawingGroup with and without a GuidelineSet

[!code-csharpDrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage] [!code-xamlDrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage]

See also