--- title: "How to: Create a GeometryDrawing" ms.date: "03/30/2017" helpviewer_keywords: - "shapes [WPF], renderable" - "renderable shapes [WPF]" - "graphics [WPF], GeometryDrawing class" - "classes [WPF], GeometryDrawing" ms.assetid: 11d3c096-91ba-4d41-9bba-aeac0db70f97 --- # How to: Create a GeometryDrawing This example shows how to create and display a . A enables you to create shape with a fill and an outline by associating a and a with a . The describes the shape's structure, the describes the shape's fill, and the describes the shape's outline. ## Example The following example uses a to render a shape. The shape is described by a and two objects. The shape's interior is painted with a and its outline is drawn with a . The is displayed using an and an element. [!code-csharp[DrawingMiscSnippets_snip#GeometryDrawingExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/DrawingMiscSnippets_snip/CSharp/GeometryDrawingExample.cs#geometrydrawingexamplewholepage)] [!code-xaml[DrawingMiscSnippets_snip#GeometryDrawingExampleWholePage](~/samples/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/GeometryDrawingExample.xaml#geometrydrawingexamplewholepage)] The following illustration shows the resulting . ![A GeometryDrawing of two ellipses](./media/graphicsmm-geodraw.jpg "graphicsmm_geodraw") To create more complex drawings, you can combine multiple drawing objects into a single composite drawing using a . ## See also - - [Drawing Objects Overview](drawing-objects-overview.md) - [Geometry Overview](geometry-overview.md) - [Create a Composite Drawing](how-to-create-a-composite-drawing.md)