Export (0) Print
Expand All

Pens Class

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

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

[<Sealed>]
type Pens =  class end

The Pens type exposes the following members.

  NameDescription
Public propertyStatic memberAliceBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberAntiqueWhiteA system-defined Pen object with a width of 1.
Public propertyStatic memberAquaA system-defined Pen object with a width of 1.
Public propertyStatic memberAquamarineA system-defined Pen object with a width of 1.
Public propertyStatic memberAzureA system-defined Pen object with a width of 1.
Public propertyStatic memberBeigeA system-defined Pen object with a width of 1.
Public propertyStatic memberBisqueA system-defined Pen object with a width of 1.
Public propertyStatic memberBlackA system-defined Pen object with a width of 1.
Public propertyStatic memberBlanchedAlmondA system-defined Pen object with a width of 1.
Public propertyStatic memberBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberBlueVioletA system-defined Pen object with a width of 1.
Public propertyStatic memberBrownA system-defined Pen object with a width of 1.
Public propertyStatic memberBurlyWoodA system-defined Pen object with a width of 1.
Public propertyStatic memberCadetBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberChartreuseA system-defined Pen object with a width of 1.
Public propertyStatic memberChocolateA system-defined Pen object with a width of 1.
Public propertyStatic memberCoralA system-defined Pen object with a width of 1.
Public propertyStatic memberCornflowerBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberCornsilkA system-defined Pen object with a width of 1.
Public propertyStatic memberCrimsonA system-defined Pen object with a width of 1.
Public propertyStatic memberCyanA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkCyanA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkGoldenrodA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkKhakiA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkMagentaA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkOliveGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkOrangeA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkOrchidA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkRedA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkSalmonA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkSeaGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkSlateBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkSlateGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkTurquoiseA system-defined Pen object with a width of 1.
Public propertyStatic memberDarkVioletA system-defined Pen object with a width of 1.
Public propertyStatic memberDeepPinkA system-defined Pen object with a width of 1.
Public propertyStatic memberDeepSkyBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberDimGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberDodgerBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberFirebrickA system-defined Pen object with a width of 1.
Public propertyStatic memberFloralWhiteA system-defined Pen object with a width of 1.
Public propertyStatic memberForestGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberFuchsiaA system-defined Pen object with a width of 1.
Public propertyStatic memberGainsboroA system-defined Pen object with a width of 1.
Public propertyStatic memberGhostWhiteA system-defined Pen object with a width of 1.
Public propertyStatic memberGoldA system-defined Pen object with a width of 1.
Public propertyStatic memberGoldenrodA system-defined Pen object with a width of 1.
Public propertyStatic memberGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberGreenYellowA system-defined Pen object with a width of 1.
Public propertyStatic memberHoneydewA system-defined Pen object with a width of 1.
Public propertyStatic memberHotPinkA system-defined Pen object with a width of 1.
Public propertyStatic memberIndianRedA system-defined Pen object with a width of 1.
Public propertyStatic memberIndigoA system-defined Pen object with a width of 1.
Public propertyStatic memberIvoryA system-defined Pen object with a width of 1.
Public propertyStatic memberKhakiA system-defined Pen object with a width of 1.
Public propertyStatic memberLavenderA system-defined Pen object with a width of 1.
Public propertyStatic memberLavenderBlushA system-defined Pen object with a width of 1.
Public propertyStatic memberLawnGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberLemonChiffonA system-defined Pen object with a width of 1.
Public propertyStatic memberLightBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberLightCoralA system-defined Pen object with a width of 1.
Public propertyStatic memberLightCyanA system-defined Pen object with a width of 1.
Public propertyStatic memberLightGoldenrodYellowA system-defined Pen object with a width of 1.
Public propertyStatic memberLightGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberLightGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberLightPinkA system-defined Pen object with a width of 1.
Public propertyStatic memberLightSalmonA system-defined Pen object with a width of 1.
Public propertyStatic memberLightSeaGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberLightSkyBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberLightSlateGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberLightSteelBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberLightYellowA system-defined Pen object with a width of 1.
Public propertyStatic memberLimeA system-defined Pen object with a width of 1.
Public propertyStatic memberLimeGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberLinenA system-defined Pen object with a width of 1.
Public propertyStatic memberMagentaA system-defined Pen object with a width of 1.
Public propertyStatic memberMaroonA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumAquamarineA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumOrchidA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumPurpleA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumSeaGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumSlateBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumSpringGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumTurquoiseA system-defined Pen object with a width of 1.
Public propertyStatic memberMediumVioletRedA system-defined Pen object with a width of 1.
Public propertyStatic memberMidnightBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberMintCreamA system-defined Pen object with a width of 1.
Public propertyStatic memberMistyRoseA system-defined Pen object with a width of 1.
Public propertyStatic memberMoccasinA system-defined Pen object with a width of 1.
Public propertyStatic memberNavajoWhiteA system-defined Pen object with a width of 1.
Public propertyStatic memberNavyA system-defined Pen object with a width of 1.
Public propertyStatic memberOldLaceA system-defined Pen object with a width of 1.
Public propertyStatic memberOliveA system-defined Pen object with a width of 1.
Public propertyStatic memberOliveDrabA system-defined Pen object with a width of 1.
Public propertyStatic memberOrangeA system-defined Pen object with a width of 1.
Public propertyStatic memberOrangeRedA system-defined Pen object with a width of 1.
Public propertyStatic memberOrchidA system-defined Pen object with a width of 1.
Public propertyStatic memberPaleGoldenrodA system-defined Pen object with a width of 1.
Public propertyStatic memberPaleGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberPaleTurquoiseA system-defined Pen object with a width of 1.
Public propertyStatic memberPaleVioletRedA system-defined Pen object with a width of 1.
Public propertyStatic memberPapayaWhipA system-defined Pen object with a width of 1.
Public propertyStatic memberPeachPuffA system-defined Pen object with a width of 1.
Public propertyStatic memberPeruA system-defined Pen object with a width of 1.
Public propertyStatic memberPinkA system-defined Pen object with a width of 1.
Public propertyStatic memberPlumA system-defined Pen object with a width of 1.
Public propertyStatic memberPowderBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberPurpleA system-defined Pen object with a width of 1.
Public propertyStatic memberRedA system-defined Pen object with a width of 1.
Public propertyStatic memberRosyBrownA system-defined Pen object with a width of 1.
Public propertyStatic memberRoyalBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberSaddleBrownA system-defined Pen object with a width of 1.
Public propertyStatic memberSalmonA system-defined Pen object with a width of 1.
Public propertyStatic memberSandyBrownA system-defined Pen object with a width of 1.
Public propertyStatic memberSeaGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberSeaShellA system-defined Pen object with a width of 1.
Public propertyStatic memberSiennaA system-defined Pen object with a width of 1.
Public propertyStatic memberSilverA system-defined Pen object with a width of 1.
Public propertyStatic memberSkyBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberSlateBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberSlateGrayA system-defined Pen object with a width of 1.
Public propertyStatic memberSnowA system-defined Pen object with a width of 1.
Public propertyStatic memberSpringGreenA system-defined Pen object with a width of 1.
Public propertyStatic memberSteelBlueA system-defined Pen object with a width of 1.
Public propertyStatic memberTanA system-defined Pen object with a width of 1.
Public propertyStatic memberTealA system-defined Pen object with a width of 1.
Public propertyStatic memberThistleA system-defined Pen object with a width of 1.
Public propertyStatic memberTomatoA system-defined Pen object with a width of 1.
Public propertyStatic memberTransparentA system-defined Pen object with a width of 1.
Public propertyStatic memberTurquoiseA system-defined Pen object with a width of 1.
Public propertyStatic memberVioletA system-defined Pen object with a width of 1.
Public propertyStatic memberWheatA system-defined Pen object with a width of 1.
Public propertyStatic memberWhiteA system-defined Pen object with a width of 1.
Public propertyStatic memberWhiteSmokeA system-defined Pen object with a width of 1.
Public propertyStatic memberYellowA system-defined Pen object with a width of 1.
Public propertyStatic memberYellowGreenA system-defined Pen object with a width of 1.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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