DrawingContext.DrawGeometry(Brush, Pen, Geometry) Method

Definition

Draws the specified Geometry using the specified Brush and Pen.

C#
public abstract void DrawGeometry(System.Windows.Media.Brush brush, System.Windows.Media.Pen pen, System.Windows.Media.Geometry geometry);

Parameters

brush
Brush

The Brush with which to fill the Geometry. This is optional, and can be null. If the brush is null, no fill is drawn.

pen
Pen

The Pen with which to stroke the Geometry. This is optional, and can be null. If the pen is null, no stroke is drawn.

geometry
Geometry

The Geometry to draw.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10