--- title: "How to: Apply a GuidelineSet to a Drawing" ms.date: "03/30/2017" helpviewer_keywords: - "GuidelineSet property [WPF], applying to drawings" - "graphics [WPF], GuidelineSet property" ms.assetid: 45f3e0b4-8820-45a7-b865-b8ea5b17b0c8 --- # How to: Apply a GuidelineSet to a Drawing This example shows how to apply a to a . The class is the only type of that has a property. To apply a to another type of , add it to a and then apply the to your . ## Example The following example creates two objects that are almost identical; the only difference is: the second has a and the first does not. The following illustration shows the output from the example. Because the rendering difference between the two objects is so subtle, portions of the drawings are enlarged. ![A DrawingGroup with and without a GuidelineSet](./media/graphicsmm-drawinggroup-guidelineset.png "graphicsmm_drawinggroup_guidelineset") [!code-csharp[DrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/DrawingMiscSnippets_snip/CSharp/DrawingGroupGuidelineSetExample.cs#graphicsmmdrawinggroupguidelinesetexamplewholepage)] [!code-xaml[DrawingMiscSnippets_snip#GraphicsMMDrawingGroupGuidelineSetExampleWholePage](~/samples/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/DrawingGroupGuidelineSetExample.xaml#graphicsmmdrawinggroupguidelinesetexamplewholepage)] ## See also - - - [Drawing Objects Overview](drawing-objects-overview.md)