Pens Class

Pens Class

 

Pens for all the standard colors. This class cannot be inherited.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

System.Object
  System.Drawing.Pens

public sealed class Pens

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticAliceBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticAntiqueWhite

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticAqua

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticAquamarine

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticAzure

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBeige

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBisque

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBlack

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBlanchedAlmond

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBlueViolet

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBrown

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticBurlyWood

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCadetBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticChartreuse

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticChocolate

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCoral

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCornflowerBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCornsilk

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCrimson

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticCyan

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkCyan

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkGoldenrod

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkKhaki

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkMagenta

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkOliveGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkOrange

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkOrchid

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkSalmon

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkSeaGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkSlateBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkSlateGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkTurquoise

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDarkViolet

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDeepPink

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDeepSkyBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDimGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticDodgerBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticFirebrick

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticFloralWhite

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticForestGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticFuchsia

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGainsboro

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGhostWhite

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGold

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGoldenrod

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticGreenYellow

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticHoneydew

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticHotPink

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticIndianRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticIndigo

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticIvory

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticKhaki

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLavender

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLavenderBlush

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLawnGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLemonChiffon

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightCoral

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightCyan

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightGoldenrodYellow

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightPink

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightSalmon

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightSeaGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightSkyBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightSlateGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightSteelBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLightYellow

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLime

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLimeGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticLinen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMagenta

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMaroon

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumAquamarine

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumOrchid

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumPurple

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumSeaGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumSlateBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumSpringGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumTurquoise

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMediumVioletRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMidnightBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMintCream

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMistyRose

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticMoccasin

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticNavajoWhite

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticNavy

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOldLace

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOlive

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOliveDrab

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOrange

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOrangeRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticOrchid

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPaleGoldenrod

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPaleGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPaleTurquoise

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPaleVioletRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPapayaWhip

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPeachPuff

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPeru

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPink

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPlum

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPowderBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticPurple

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticRed

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticRosyBrown

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticRoyalBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSaddleBrown

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSalmon

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSandyBrown

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSeaGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSeaShell

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSienna

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSilver

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSkyBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSlateBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSlateGray

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSnow

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSpringGreen

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticSteelBlue

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticTan

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticTeal

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticThistle

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticTomato

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticTransparent

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticTurquoise

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticViolet

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticWheat

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticWhite

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticWhiteSmoke

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticYellow

A system-defined Pen object with a width of 1.

System_CAPS_pubpropertySystem_CAPS_staticYellowGreen

A system-defined Pen object with a width of 1.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The Pen objects returned by this class are immutable, meaning their properties cannot be changed. To see the colors represented by pens in this class, see Colors by Name.

The following method demonstrates how to use the Pens class. This example is designed to be used with Windows Forms. Paste the code into a form and call the UsePensClass method when handling the form's Paint event, passing e as PaintEventArgs.

private void UsePensClass(PaintEventArgs e)
{
    e.Graphics.DrawEllipse(Pens.SlateBlue, 
        new Rectangle(40, 40, 140, 140));
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft