--- title: "How to: Draw an Ellipse or a Circle" description: Learn how to draw an ellipse or circle with choices for outline thickness and interior color in Windows Presentation Foundation (WPF). ms.date: "03/30/2017" helpviewer_keywords: - "ellipses [WPF], drawing" - "circles [WPF], drawing" - "drawing circles [WPF]" - "drawing ellipses [WPF]" - "graphics [WPF], drawing circles" - "graphics [WPF], drawing ellipses" ms.assetid: 99763b8c-bfc8-44be-8231-8a70daf5481a --- # How to: Draw an Ellipse or a Circle This example shows how to draw ellipses and circles by using the element. To draw an ellipse, create an element and specify its and . Use its property to specify the that is used to paint the interior of the ellipse. Use its property to specify the that is used to paint the outline of the ellipse. The property specifies the thickness of the ellipse outline. To draw a circle, make the and of the element equal to each other. The following example draws four elements within a . ## Example [!code-xaml[drawingwithshapeelements#EllipseExample1](~/samples/snippets/csharp/VS_Snippets_Wpf/DrawingWithShapeElements/CS/ellipseexample.xaml#ellipseexample1)] Although this example uses a to contain the ellipses, you can use ellipse elements (and all the other shape elements) with any or that supports non-text content. This example is part of a larger sample; for the complete sample, see [Shape Elements Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/ShapeElements). ## See also - - - [Shape Elements Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/ShapeElements)