* 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
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 |
|
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.
[!code-csharpDrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage] [!code-xamlDrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage]
