Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Colors Class

Implements a set of predefined colors.

System.Object
  System.Windows.Media.Colors

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
public sealed class Colors

The Colors type exposes the following members.

  NameDescription
Public propertyStatic memberSupported by Silverlight for Windows PhoneBlackGets the system-defined color that has the ARGB value of #FF000000.
Public propertyStatic memberSupported by Silverlight for Windows PhoneBlueGets the system-defined color that has the ARGB value of #FF0000FF.
Public propertyStatic memberSupported by Silverlight for Windows PhoneBrownGets the system-defined color that has the ARGB value of #FFA52A2A.
Public propertyStatic memberSupported by Silverlight for Windows PhoneCyanGets the system-defined color that has the ARGB value of #FF00FFFF.
Public propertyStatic memberSupported by Silverlight for Windows PhoneDarkGrayGets the system-defined color that has the ARGB value of #FFA9A9A9.
Public propertyStatic memberSupported by Silverlight for Windows PhoneGrayGets the system-defined color that has the ARGB value of #FF808080.
Public propertyStatic memberSupported by Silverlight for Windows PhoneGreenGets the system-defined color that has the ARGB value of #FF008000.
Public propertyStatic memberSupported by Silverlight for Windows PhoneLightGrayGets the system-defined color that has the ARGB value of #FFD3D3D3.
Public propertyStatic memberSupported by Silverlight for Windows PhoneMagentaGets the system-defined color that has the ARGB value of #FFFF00FF.
Public propertyStatic memberSupported by Silverlight for Windows PhoneOrangeGets the system-defined color that has the ARGB value of #FFFFA500.
Public propertyStatic memberSupported by Silverlight for Windows PhonePurpleGets the system-defined color that has the ARGB value of #FF800080.
Public propertyStatic memberSupported by Silverlight for Windows PhoneRedGets the system-defined color that has the ARGB value of #FFFF0000.
Public propertyStatic memberSupported by Silverlight for Windows PhoneTransparentGets the system-defined color that has the ARGB value of #00FFFFFF.
Public propertyStatic memberSupported by Silverlight for Windows PhoneWhiteGets the system-defined color that has the ARGB value of #FFFFFFFF.
Public propertyStatic memberSupported by Silverlight for Windows PhoneYellowGets the system-defined color that has the ARGB value of #FFFFFF00.
Top
  NameDescription
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top

XAML Usage for Colors

You cannot instantiate objects from this managed class in XAML, but you can use its static properties to provide property values in XAML. There are additional named colors that can be specified in XAML, but these are not backed by static property values of Colors. For information about other color usages in XAML, including named colors and ARGB or scARGB syntax, see Color.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.