This documentation is archived and is not being maintained.

Color.IsNamedColor Property

Specifies whether this Color structure is a pre-defined color. Pre-defined colors are represented by the elements of the KnownColor enumeration.

[Visual Basic]
Public ReadOnly Property IsNamedColor As Boolean
[C#]
public bool IsNamedColor {get;}
[C++]
public: __property bool get_IsNamedColor();
[JScript]
public function get IsNamedColor() : Boolean;

Property Value

This property returns true if this Color structure instance was created from a pre-defined color by using either the FromName method or the FromKnownColor method; otherwise, false.

Remarks

This property does not do a comparison of the ARGB values. Therefore, when the IsNamedColor property is applied to a Color structure that is created by using the FromArgb method, the IsNamedColor property returns false, even if the ARGB value matches the ARGB value of a pre-defined color.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Color Structure | Color Members | System.Drawing Namespace

Show: