Export (0) Print
Expand All
Expand Minimize

Color.IsNamedColor Property

Gets a value indicating whether this Color structure is a named color or a member of the KnownColor enumeration.

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

public bool IsNamedColor { get; }
/** @property */
public boolean get_IsNamedColor ()

public function get IsNamedColor () : boolean

Not applicable.

Property Value

true if this Color was created by using either the FromName method or the FromKnownColor method; otherwise, false.

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, IsNamedColor returns false, even if the ARGB value matches the ARGB value of a predefined color.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft