Pens Pens Pens Pens Class

Definition

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

public ref class Pens sealed
public sealed class Pens
type Pens = class
Public NotInheritable Class Pens
Inheritance
PensPensPensPens

Examples

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, Rectangle(40,40,140,140) );
   }
private void UsePensClass(PaintEventArgs e)
{
    e.Graphics.DrawEllipse(Pens.SlateBlue, 
        new Rectangle(40, 40, 140, 140));
}
Private Sub UsePensClass(ByVal e As PaintEventArgs)
    e.Graphics.DrawEllipse(Pens.SlateBlue, _
        New Rectangle(40, 40, 140, 140))
End Sub

Remarks

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.

Properties

AliceBlue AliceBlue AliceBlue AliceBlue

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

AntiqueWhite AntiqueWhite AntiqueWhite AntiqueWhite

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

Aqua Aqua Aqua Aqua

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

Aquamarine Aquamarine Aquamarine Aquamarine

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

Azure Azure Azure Azure

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

Beige Beige Beige Beige

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

Bisque Bisque Bisque Bisque

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

Black Black Black Black

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

BlanchedAlmond BlanchedAlmond BlanchedAlmond BlanchedAlmond

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

Blue Blue Blue Blue

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

BlueViolet BlueViolet BlueViolet BlueViolet

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

Brown Brown Brown Brown

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

BurlyWood BurlyWood BurlyWood BurlyWood

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

CadetBlue CadetBlue CadetBlue CadetBlue

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

Chartreuse Chartreuse Chartreuse Chartreuse

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

Chocolate Chocolate Chocolate Chocolate

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

Coral Coral Coral Coral

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

CornflowerBlue CornflowerBlue CornflowerBlue CornflowerBlue

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

Cornsilk Cornsilk Cornsilk Cornsilk

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

Crimson Crimson Crimson Crimson

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

Cyan Cyan Cyan Cyan

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

DarkBlue DarkBlue DarkBlue DarkBlue

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

DarkCyan DarkCyan DarkCyan DarkCyan

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

DarkGoldenrod DarkGoldenrod DarkGoldenrod DarkGoldenrod

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

DarkGray DarkGray DarkGray DarkGray

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

DarkGreen DarkGreen DarkGreen DarkGreen

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

DarkKhaki DarkKhaki DarkKhaki DarkKhaki

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

DarkMagenta DarkMagenta DarkMagenta DarkMagenta

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

DarkOliveGreen DarkOliveGreen DarkOliveGreen DarkOliveGreen

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

DarkOrange DarkOrange DarkOrange DarkOrange

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

DarkOrchid DarkOrchid DarkOrchid DarkOrchid

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

DarkRed DarkRed DarkRed DarkRed

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

DarkSalmon DarkSalmon DarkSalmon DarkSalmon

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

DarkSeaGreen DarkSeaGreen DarkSeaGreen DarkSeaGreen

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

DarkSlateBlue DarkSlateBlue DarkSlateBlue DarkSlateBlue

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

DarkSlateGray DarkSlateGray DarkSlateGray DarkSlateGray

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

DarkTurquoise DarkTurquoise DarkTurquoise DarkTurquoise

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

DarkViolet DarkViolet DarkViolet DarkViolet

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

DeepPink DeepPink DeepPink DeepPink

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

DeepSkyBlue DeepSkyBlue DeepSkyBlue DeepSkyBlue

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

DimGray DimGray DimGray DimGray

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

DodgerBlue DodgerBlue DodgerBlue DodgerBlue

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

Firebrick Firebrick Firebrick Firebrick

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

FloralWhite FloralWhite FloralWhite FloralWhite

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

ForestGreen ForestGreen ForestGreen ForestGreen

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

Fuchsia Fuchsia Fuchsia Fuchsia

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

Gainsboro Gainsboro Gainsboro Gainsboro

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

GhostWhite GhostWhite GhostWhite GhostWhite

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

Gold Gold Gold Gold

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

Goldenrod Goldenrod Goldenrod Goldenrod

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

Gray Gray Gray Gray

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

Green Green Green Green

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

GreenYellow GreenYellow GreenYellow GreenYellow

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

Honeydew Honeydew Honeydew Honeydew

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

HotPink HotPink HotPink HotPink

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

IndianRed IndianRed IndianRed IndianRed

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

Indigo Indigo Indigo Indigo

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

Ivory Ivory Ivory Ivory

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

Khaki Khaki Khaki Khaki

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

Lavender Lavender Lavender Lavender

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

LavenderBlush LavenderBlush LavenderBlush LavenderBlush

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

LawnGreen LawnGreen LawnGreen LawnGreen

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

LemonChiffon LemonChiffon LemonChiffon LemonChiffon

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

LightBlue LightBlue LightBlue LightBlue

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

LightCoral LightCoral LightCoral LightCoral

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

LightCyan LightCyan LightCyan LightCyan

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

LightGoldenrodYellow LightGoldenrodYellow LightGoldenrodYellow LightGoldenrodYellow

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

LightGray LightGray LightGray LightGray

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

LightGreen LightGreen LightGreen LightGreen

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

LightPink LightPink LightPink LightPink

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

LightSalmon LightSalmon LightSalmon LightSalmon

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

LightSeaGreen LightSeaGreen LightSeaGreen LightSeaGreen

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

LightSkyBlue LightSkyBlue LightSkyBlue LightSkyBlue

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

LightSlateGray LightSlateGray LightSlateGray LightSlateGray

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

LightSteelBlue LightSteelBlue LightSteelBlue LightSteelBlue

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

LightYellow LightYellow LightYellow LightYellow

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

Lime Lime Lime Lime

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

LimeGreen LimeGreen LimeGreen LimeGreen

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

Linen Linen Linen Linen

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

Magenta Magenta Magenta Magenta

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

Maroon Maroon Maroon Maroon

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

MediumAquamarine MediumAquamarine MediumAquamarine MediumAquamarine

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

MediumBlue MediumBlue MediumBlue MediumBlue

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

MediumOrchid MediumOrchid MediumOrchid MediumOrchid

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

MediumPurple MediumPurple MediumPurple MediumPurple

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

MediumSeaGreen MediumSeaGreen MediumSeaGreen MediumSeaGreen

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

MediumSlateBlue MediumSlateBlue MediumSlateBlue MediumSlateBlue

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

MediumSpringGreen MediumSpringGreen MediumSpringGreen MediumSpringGreen

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

MediumTurquoise MediumTurquoise MediumTurquoise MediumTurquoise

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

MediumVioletRed MediumVioletRed MediumVioletRed MediumVioletRed

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

MidnightBlue MidnightBlue MidnightBlue MidnightBlue

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

MintCream MintCream MintCream MintCream

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

MistyRose MistyRose MistyRose MistyRose

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

Moccasin Moccasin Moccasin Moccasin

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

NavajoWhite NavajoWhite NavajoWhite NavajoWhite

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

Navy Navy Navy Navy

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

OldLace OldLace OldLace OldLace

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

Olive Olive Olive Olive

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

OliveDrab OliveDrab OliveDrab OliveDrab

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

Orange Orange Orange Orange

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

OrangeRed OrangeRed OrangeRed OrangeRed

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

Orchid Orchid Orchid Orchid

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

PaleGoldenrod PaleGoldenrod PaleGoldenrod PaleGoldenrod

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

PaleGreen PaleGreen PaleGreen PaleGreen

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

PaleTurquoise PaleTurquoise PaleTurquoise PaleTurquoise

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

PaleVioletRed PaleVioletRed PaleVioletRed PaleVioletRed

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

PapayaWhip PapayaWhip PapayaWhip PapayaWhip

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

PeachPuff PeachPuff PeachPuff PeachPuff

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

Peru Peru Peru Peru

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

Pink Pink Pink Pink

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

Plum Plum Plum Plum

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

PowderBlue PowderBlue PowderBlue PowderBlue

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

Purple Purple Purple Purple

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

Red Red Red Red

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

RosyBrown RosyBrown RosyBrown RosyBrown

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

RoyalBlue RoyalBlue RoyalBlue RoyalBlue

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

SaddleBrown SaddleBrown SaddleBrown SaddleBrown

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

Salmon Salmon Salmon Salmon

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

SandyBrown SandyBrown SandyBrown SandyBrown

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

SeaGreen SeaGreen SeaGreen SeaGreen

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

SeaShell SeaShell SeaShell SeaShell

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

Sienna Sienna Sienna Sienna

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

Silver Silver Silver Silver

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

SkyBlue SkyBlue SkyBlue SkyBlue

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

SlateBlue SlateBlue SlateBlue SlateBlue

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

SlateGray SlateGray SlateGray SlateGray

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

Snow Snow Snow Snow

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

SpringGreen SpringGreen SpringGreen SpringGreen

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

SteelBlue SteelBlue SteelBlue SteelBlue

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

Tan Tan Tan Tan

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

Teal Teal Teal Teal

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

Thistle Thistle Thistle Thistle

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

Tomato Tomato Tomato Tomato

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

Transparent Transparent Transparent Transparent

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

Turquoise Turquoise Turquoise Turquoise

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

Violet Violet Violet Violet

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

Wheat Wheat Wheat Wheat

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

White White White White

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

WhiteSmoke WhiteSmoke WhiteSmoke WhiteSmoke

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

Yellow Yellow Yellow Yellow

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

YellowGreen YellowGreen YellowGreen YellowGreen

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

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also