Editare

Partajați prin


Color.IsNamedColor Property

Definition

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

public:
 property bool IsNamedColor { bool get(); };
public bool IsNamedColor { get; }
member this.IsNamedColor : bool
Public ReadOnly Property IsNamedColor As Boolean

Property Value

true if this Color was created by using either the FromName(String) method or the FromKnownColor(KnownColor) 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, IsNamedColor returns false, even if the ARGB value matches the ARGB value of a predefined color.

Applies to