Knowncolors.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / Knowncolors.cs / 1 / Knowncolors.cs

                            //------------------------------------------------------------------------------ 
//  Microsoft Avalon
//  Copyright (c) Microsoft Corporation, 2001, 2002
//
//  File: knowncolors.cs 
//-----------------------------------------------------------------------------
 
#if PBTCOMPILER 
namespace MS.Internal.Markup
#else 
using System.Windows.Media;
using MS.Internal;
using System.Collections.Generic;
 
using System;
 
namespace System.Windows.Media 
#endif
{ 
    /// Enum containing handles to all known colors
    /// Since the first element is 0, second is 1, etc, we can use this to index
    /// directly into an array
    internal enum KnownColor : uint 
    {
        // We've reserved the value "1" as unknown.  If for some odd reason "1" is added to the 
        // list, redefined UnknownColor 

        AliceBlue = 0xFFF0F8FF, 
        AntiqueWhite = 0xFFFAEBD7,
        Aqua = 0xFF00FFFF,
        Aquamarine = 0xFF7FFFD4,
        Azure = 0xFFF0FFFF, 
        Beige = 0xFFF5F5DC,
        Bisque = 0xFFFFE4C4, 
        Black = 0xFF000000, 
        BlanchedAlmond = 0xFFFFEBCD,
        Blue = 0xFF0000FF, 
        BlueViolet = 0xFF8A2BE2,
        Brown = 0xFFA52A2A,
        BurlyWood = 0xFFDEB887,
        CadetBlue = 0xFF5F9EA0, 
        Chartreuse = 0xFF7FFF00,
        Chocolate = 0xFFD2691E, 
        Coral = 0xFFFF7F50, 
        CornflowerBlue = 0xFF6495ED,
        Cornsilk = 0xFFFFF8DC, 
        Crimson = 0xFFDC143C,
        Cyan = 0xFF00FFFF,
        DarkBlue = 0xFF00008B,
        DarkCyan = 0xFF008B8B, 
        DarkGoldenrod = 0xFFB8860B,
        DarkGray = 0xFFA9A9A9, 
        DarkGreen = 0xFF006400, 
        DarkKhaki = 0xFFBDB76B,
        DarkMagenta = 0xFF8B008B, 
        DarkOliveGreen = 0xFF556B2F,
        DarkOrange = 0xFFFF8C00,
        DarkOrchid = 0xFF9932CC,
        DarkRed = 0xFF8B0000, 
        DarkSalmon = 0xFFE9967A,
        DarkSeaGreen = 0xFF8FBC8F, 
        DarkSlateBlue = 0xFF483D8B, 
        DarkSlateGray = 0xFF2F4F4F,
        DarkTurquoise = 0xFF00CED1, 
        DarkViolet = 0xFF9400D3,
        DeepPink = 0xFFFF1493,
        DeepSkyBlue = 0xFF00BFFF,
        DimGray = 0xFF696969, 
        DodgerBlue = 0xFF1E90FF,
        Firebrick = 0xFFB22222, 
        FloralWhite = 0xFFFFFAF0, 
        ForestGreen = 0xFF228B22,
        Fuchsia = 0xFFFF00FF, 
        Gainsboro = 0xFFDCDCDC,
        GhostWhite = 0xFFF8F8FF,
        Gold = 0xFFFFD700,
        Goldenrod = 0xFFDAA520, 
        Gray = 0xFF808080,
        Green = 0xFF008000, 
        GreenYellow = 0xFFADFF2F, 
        Honeydew = 0xFFF0FFF0,
        HotPink = 0xFFFF69B4, 
        IndianRed = 0xFFCD5C5C,
        Indigo = 0xFF4B0082,
        Ivory = 0xFFFFFFF0,
        Khaki = 0xFFF0E68C, 
        Lavender = 0xFFE6E6FA,
        LavenderBlush = 0xFFFFF0F5, 
        LawnGreen = 0xFF7CFC00, 
        LemonChiffon = 0xFFFFFACD,
        LightBlue = 0xFFADD8E6, 
        LightCoral = 0xFFF08080,
        LightCyan = 0xFFE0FFFF,
        LightGoldenrodYellow = 0xFFFAFAD2,
        LightGreen = 0xFF90EE90, 
        LightGray = 0xFFD3D3D3,
        LightPink = 0xFFFFB6C1, 
        LightSalmon = 0xFFFFA07A, 
        LightSeaGreen = 0xFF20B2AA,
        LightSkyBlue = 0xFF87CEFA, 
        LightSlateGray = 0xFF778899,
        LightSteelBlue = 0xFFB0C4DE,
        LightYellow = 0xFFFFFFE0,
        Lime = 0xFF00FF00, 
        LimeGreen = 0xFF32CD32,
        Linen = 0xFFFAF0E6, 
        Magenta = 0xFFFF00FF, 
        Maroon = 0xFF800000,
        MediumAquamarine = 0xFF66CDAA, 
        MediumBlue = 0xFF0000CD,
        MediumOrchid = 0xFFBA55D3,
        MediumPurple = 0xFF9370DB,
        MediumSeaGreen = 0xFF3CB371, 
        MediumSlateBlue = 0xFF7B68EE,
        MediumSpringGreen = 0xFF00FA9A, 
        MediumTurquoise = 0xFF48D1CC, 
        MediumVioletRed = 0xFFC71585,
        MidnightBlue = 0xFF191970, 
        MintCream = 0xFFF5FFFA,
        MistyRose = 0xFFFFE4E1,
        Moccasin = 0xFFFFE4B5,
        NavajoWhite = 0xFFFFDEAD, 
        Navy = 0xFF000080,
        OldLace = 0xFFFDF5E6, 
        Olive = 0xFF808000, 
        OliveDrab = 0xFF6B8E23,
        Orange = 0xFFFFA500, 
        OrangeRed = 0xFFFF4500,
        Orchid = 0xFFDA70D6,
        PaleGoldenrod = 0xFFEEE8AA,
        PaleGreen = 0xFF98FB98, 
        PaleTurquoise = 0xFFAFEEEE,
        PaleVioletRed = 0xFFDB7093, 
        PapayaWhip = 0xFFFFEFD5, 
        PeachPuff = 0xFFFFDAB9,
        Peru = 0xFFCD853F, 
        Pink = 0xFFFFC0CB,
        Plum = 0xFFDDA0DD,
        PowderBlue = 0xFFB0E0E6,
        Purple = 0xFF800080, 
        Red = 0xFFFF0000,
        RosyBrown = 0xFFBC8F8F, 
        RoyalBlue = 0xFF4169E1, 
        SaddleBrown = 0xFF8B4513,
        Salmon = 0xFFFA8072, 
        SandyBrown = 0xFFF4A460,
        SeaGreen = 0xFF2E8B57,
        SeaShell = 0xFFFFF5EE,
        Sienna = 0xFFA0522D, 
        Silver = 0xFFC0C0C0,
        SkyBlue = 0xFF87CEEB, 
        SlateBlue = 0xFF6A5ACD, 
        SlateGray = 0xFF708090,
        Snow = 0xFFFFFAFA, 
        SpringGreen = 0xFF00FF7F,
        SteelBlue = 0xFF4682B4,
        Tan = 0xFFD2B48C,
        Teal = 0xFF008080, 
        Thistle = 0xFFD8BFD8,
        Tomato = 0xFFFF6347, 
        Transparent = 0x00FFFFFF, 
        Turquoise = 0xFF40E0D0,
        Violet = 0xFFEE82EE, 
        Wheat = 0xFFF5DEB3,
        White = 0xFFFFFFFF,
        WhiteSmoke = 0xFFF5F5F5,
        Yellow = 0xFFFFFF00, 
        YellowGreen = 0xFF9ACD32,
        UnknownColor = 0x00000001 
    } 

    internal static class KnownColors 
    {
#if !PBTCOMPILER
        /// Return the solid color brush from a color string.  If there's no match, null
        public static SolidColorBrush ColorStringToKnownBrush(string s) 
        {
            if (null != s) 
            { 
                KnownColor result = ColorStringToKnownColor(s);
 
                // If the result is UnknownColor, that means this string wasn't found
                if (result != KnownColor.UnknownColor)
                {
                    // Otherwise, return the appropriate SolidColorBrush 
                    return SolidColorBrushFromUint((uint)result);
                } 
            } 
            return null;
        } 

        public static SolidColorBrush SolidColorBrushFromUint(uint argb)
        {
            SolidColorBrush scp = null; 

            lock(s_solidColorBrushCache) 
            { 
                // Attempt to retrieve the color.  If it fails create it.
                if (!s_solidColorBrushCache.TryGetValue(argb, out scp)) 
                {
                    scp = new SolidColorBrush(Color.FromUInt32(argb));
                    scp.Freeze();
                    s_solidColorBrushCache[argb] = scp; 
                }
#if DEBUG 
                else 
                {
                    s_count++; 
                }
#endif
            }
 
            return scp;
        } 
 
        static internal string MatchColor(string colorString, out bool isKnownColor, out bool isNumericColor, out bool isContextColor, out bool isScRgbColor)
        { 

            string trimmedString = colorString.Trim();

            if (((trimmedString.Length == 4) || 
                (trimmedString.Length == 5) ||
                (trimmedString.Length == 7) || 
                (trimmedString.Length == 9)) && 
                (trimmedString[0] == '#'))
            { 
                isNumericColor = true;
                isScRgbColor = false;
                isKnownColor = false;
                isContextColor = false; 
                return trimmedString;
            } 
            else 
                isNumericColor = false;
 
            if ((trimmedString.StartsWith("sc#", StringComparison.Ordinal) == true))
            {
                isNumericColor = false;
                isScRgbColor = true; 
                isKnownColor = false;
                isContextColor = false; 
            } 
            else
            { 
                isScRgbColor = false;
            }

            if ((trimmedString.StartsWith(Parsers.s_ContextColor, StringComparison.OrdinalIgnoreCase) == true)) 
            {
                isContextColor = true; 
                isScRgbColor = false; 
                isKnownColor = false;
                return trimmedString; 
            }
            else
            {
                isContextColor = false; 
                isKnownColor = true;
            } 
 
            return trimmedString;
        } 
#endif

        /// Return the KnownColor from a color string.  If there's no match, KnownColor.UnknownColor
        internal static KnownColor ColorStringToKnownColor(string colorString) 
        {
            if (null != colorString) 
            { 
                // We use invariant culture because we don't globalize our color names
                string colorUpper = colorString.ToUpper(System.Globalization.CultureInfo.InvariantCulture); 

                // Use String.Equals because it does explicit equality
                // StartsWith/EndsWith are culture sensitive and are 4-7 times slower than Equals
 
                switch (colorUpper.Length)
                { 
                    case 3: 
                        if (colorUpper.Equals("RED")) return KnownColor.Red;
                        if (colorUpper.Equals("TAN")) return KnownColor.Tan; 
                        break;
                    case 4:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("AQUA")) return KnownColor.Aqua; 
                            break; 
                        case 'B':
                            if (colorUpper.Equals("BLUE")) return KnownColor.Blue; 
                            break;
                        case 'C':
                            if (colorUpper.Equals("CYAN")) return KnownColor.Cyan;
                            break; 
                        case 'G':
                            if (colorUpper.Equals("GOLD")) return KnownColor.Gold; 
                            if (colorUpper.Equals("GRAY")) return KnownColor.Gray; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIME")) return KnownColor.Lime;
                            break;
                        case 'N':
                            if (colorUpper.Equals("NAVY")) return KnownColor.Navy; 
                            break;
                        case 'P': 
                            if (colorUpper.Equals("PERU")) return KnownColor.Peru; 
                            if (colorUpper.Equals("PINK")) return KnownColor.Pink;
                            if (colorUpper.Equals("PLUM")) return KnownColor.Plum; 
                            break;
                        case 'S':
                            if (colorUpper.Equals("SNOW")) return KnownColor.Snow;
                            break; 
                        case 'T':
                            if (colorUpper.Equals("TEAL")) return KnownColor.Teal; 
                            break; 
                    }
                        break; 
                    case 5:
                    switch(colorUpper[0])
                    {
                        case 'A': 
                            if (colorUpper.Equals("AZURE")) return KnownColor.Azure;
                            break; 
                        case 'B': 
                            if (colorUpper.Equals("BEIGE")) return KnownColor.Beige;
                            if (colorUpper.Equals("BLACK")) return KnownColor.Black; 
                            if (colorUpper.Equals("BROWN")) return KnownColor.Brown;
                            break;
                        case 'C':
                            if (colorUpper.Equals("CORAL")) return KnownColor.Coral; 
                            break;
                        case 'G': 
                            if (colorUpper.Equals("GREEN")) return KnownColor.Green; 
                            break;
                        case 'I': 
                            if (colorUpper.Equals("IVORY")) return KnownColor.Ivory;
                            break;
                        case 'K':
                            if (colorUpper.Equals("KHAKI")) return KnownColor.Khaki; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LINEN")) return KnownColor.Linen; 
                            break;
                        case 'O': 
                            if (colorUpper.Equals("OLIVE")) return KnownColor.Olive;
                            break;
                        case 'W':
                            if (colorUpper.Equals("WHEAT")) return KnownColor.Wheat; 
                            if (colorUpper.Equals("WHITE")) return KnownColor.White;
                            break; 
                    } 
                        break;
                    case 6: 
                    switch(colorUpper[0])
                    {
                        case 'B':
                            if (colorUpper.Equals("BISQUE")) return KnownColor.Bisque; 
                            break;
                        case 'I': 
                            if (colorUpper.Equals("INDIGO")) return KnownColor.Indigo; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MAROON")) return KnownColor.Maroon;
                            break;
                        case 'O':
                            if (colorUpper.Equals("ORANGE")) return KnownColor.Orange; 
                            if (colorUpper.Equals("ORCHID")) return KnownColor.Orchid;
                            break; 
                        case 'P': 
                            if (colorUpper.Equals("PURPLE")) return KnownColor.Purple;
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SALMON")) return KnownColor.Salmon;
                            if (colorUpper.Equals("SIENNA")) return KnownColor.Sienna;
                            if (colorUpper.Equals("SILVER")) return KnownColor.Silver; 
                            break;
                        case 'T': 
                            if (colorUpper.Equals("TOMATO")) return KnownColor.Tomato; 
                            break;
                        case 'V': 
                            if (colorUpper.Equals("VIOLET")) return KnownColor.Violet;
                            break;
                        case 'Y':
                            if (colorUpper.Equals("YELLOW")) return KnownColor.Yellow; 
                            break;
                    } 
                        break; 
                    case 7:
                    switch(colorUpper[0]) 
                    {
                        case 'C':
                            if (colorUpper.Equals("CRIMSON")) return KnownColor.Crimson;
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKRED")) return KnownColor.DarkRed; 
                            if (colorUpper.Equals("DIMGRAY")) return KnownColor.DimGray; 
                            break;
                        case 'F': 
                            if (colorUpper.Equals("FUCHSIA")) return KnownColor.Fuchsia;
                            break;
                        case 'H':
                            if (colorUpper.Equals("HOTPINK")) return KnownColor.HotPink; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MAGENTA")) return KnownColor.Magenta; 
                            break;
                        case 'O': 
                            if (colorUpper.Equals("OLDLACE")) return KnownColor.OldLace;
                            break;
                        case 'S':
                            if (colorUpper.Equals("SKYBLUE")) return KnownColor.SkyBlue; 
                            break;
                        case 'T': 
                            if (colorUpper.Equals("THISTLE")) return KnownColor.Thistle; 
                            break;
                    } 
                        break;
                    case 8:
                    switch(colorUpper[0])
                    { 
                        case 'C':
                            if (colorUpper.Equals("CORNSILK")) return KnownColor.Cornsilk; 
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKBLUE")) return KnownColor.DarkBlue; 
                            if (colorUpper.Equals("DARKCYAN")) return KnownColor.DarkCyan;
                            if (colorUpper.Equals("DARKGRAY")) return KnownColor.DarkGray;
                            if (colorUpper.Equals("DEEPPINK")) return KnownColor.DeepPink;
                            break; 
                        case 'H':
                            if (colorUpper.Equals("HONEYDEW")) return KnownColor.Honeydew; 
                            break; 
                        case 'L':
                            if (colorUpper.Equals("LAVENDER")) return KnownColor.Lavender; 
                            break;
                        case 'M':
                            if (colorUpper.Equals("MOCCASIN")) return KnownColor.Moccasin;
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SEAGREEN")) return KnownColor.SeaGreen; 
                            if (colorUpper.Equals("SEASHELL")) return KnownColor.SeaShell; 
                            break;
                    } 
                        break;
                    case 9:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("ALICEBLUE")) return KnownColor.AliceBlue; 
                            break; 
                        case 'B':
                            if (colorUpper.Equals("BURLYWOOD")) return KnownColor.BurlyWood; 
                            break;
                        case 'C':
                            if (colorUpper.Equals("CADETBLUE")) return KnownColor.CadetBlue;
                            if (colorUpper.Equals("CHOCOLATE")) return KnownColor.Chocolate; 
                            break;
                        case 'D': 
                            if (colorUpper.Equals("DARKGREEN")) return KnownColor.DarkGreen; 
                            if (colorUpper.Equals("DARKKHAKI")) return KnownColor.DarkKhaki;
                            break; 
                        case 'F':
                            if (colorUpper.Equals("FIREBRICK")) return KnownColor.Firebrick;
                            break;
                        case 'G': 
                            if (colorUpper.Equals("GAINSBORO")) return KnownColor.Gainsboro;
                            if (colorUpper.Equals("GOLDENROD")) return KnownColor.Goldenrod; 
                            break; 
                        case 'I':
                            if (colorUpper.Equals("INDIANRED")) return KnownColor.IndianRed; 
                            break;
                        case 'L':
                            if (colorUpper.Equals("LAWNGREEN")) return KnownColor.LawnGreen;
                            if (colorUpper.Equals("LIGHTBLUE")) return KnownColor.LightBlue; 
                            if (colorUpper.Equals("LIGHTCYAN")) return KnownColor.LightCyan;
                            if (colorUpper.Equals("LIGHTGRAY")) return KnownColor.LightGray; 
                            if (colorUpper.Equals("LIGHTPINK")) return KnownColor.LightPink; 
                            if (colorUpper.Equals("LIMEGREEN")) return KnownColor.LimeGreen;
                            break; 
                        case 'M':
                            if (colorUpper.Equals("MINTCREAM")) return KnownColor.MintCream;
                            if (colorUpper.Equals("MISTYROSE")) return KnownColor.MistyRose;
                            break; 
                        case 'O':
                            if (colorUpper.Equals("OLIVEDRAB")) return KnownColor.OliveDrab; 
                            if (colorUpper.Equals("ORANGERED")) return KnownColor.OrangeRed; 
                            break;
                        case 'P': 
                            if (colorUpper.Equals("PALEGREEN")) return KnownColor.PaleGreen;
                            if (colorUpper.Equals("PEACHPUFF")) return KnownColor.PeachPuff;
                            break;
                        case 'R': 
                            if (colorUpper.Equals("ROSYBROWN")) return KnownColor.RosyBrown;
                            if (colorUpper.Equals("ROYALBLUE")) return KnownColor.RoyalBlue; 
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SLATEBLUE")) return KnownColor.SlateBlue; 
                            if (colorUpper.Equals("SLATEGRAY")) return KnownColor.SlateGray;
                            if (colorUpper.Equals("STEELBLUE")) return KnownColor.SteelBlue;
                            break;
                        case 'T': 
                            if (colorUpper.Equals("TURQUOISE")) return KnownColor.Turquoise;
                            break; 
                    } 
                        break;
                    case 10: 
                    switch(colorUpper[0])
                    {
                        case 'A':
                            if (colorUpper.Equals("AQUAMARINE")) return KnownColor.Aquamarine; 
                            break;
                        case 'B': 
                            if (colorUpper.Equals("BLUEVIOLET")) return KnownColor.BlueViolet; 
                            break;
                        case 'C': 
                            if (colorUpper.Equals("CHARTREUSE")) return KnownColor.Chartreuse;
                            break;
                        case 'D':
                            if (colorUpper.Equals("DARKORANGE")) return KnownColor.DarkOrange; 
                            if (colorUpper.Equals("DARKORCHID")) return KnownColor.DarkOrchid;
                            if (colorUpper.Equals("DARKSALMON")) return KnownColor.DarkSalmon; 
                            if (colorUpper.Equals("DARKVIOLET")) return KnownColor.DarkViolet; 
                            if (colorUpper.Equals("DODGERBLUE")) return KnownColor.DodgerBlue;
                            break; 
                        case 'G':
                            if (colorUpper.Equals("GHOSTWHITE")) return KnownColor.GhostWhite;
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTCORAL")) return KnownColor.LightCoral;
                            if (colorUpper.Equals("LIGHTGREEN")) return KnownColor.LightGreen; 
                            break; 
                        case 'M':
                            if (colorUpper.Equals("MEDIUMBLUE")) return KnownColor.MediumBlue; 
                            break;
                        case 'P':
                            if (colorUpper.Equals("PAPAYAWHIP")) return KnownColor.PapayaWhip;
                            if (colorUpper.Equals("POWDERBLUE")) return KnownColor.PowderBlue; 
                            break;
                        case 'S': 
                            if (colorUpper.Equals("SANDYBROWN")) return KnownColor.SandyBrown; 
                            break;
                        case 'W': 
                            if (colorUpper.Equals("WHITESMOKE")) return KnownColor.WhiteSmoke;
                            break;
                    }
                        break; 
                    case 11:
                    switch(colorUpper[0]) 
                    { 
                        case 'D':
                            if (colorUpper.Equals("DARKMAGENTA")) return KnownColor.DarkMagenta; 
                            if (colorUpper.Equals("DEEPSKYBLUE")) return KnownColor.DeepSkyBlue;
                            break;
                        case 'F':
                            if (colorUpper.Equals("FLORALWHITE")) return KnownColor.FloralWhite; 
                            if (colorUpper.Equals("FORESTGREEN")) return KnownColor.ForestGreen;
                            break; 
                        case 'G': 
                            if (colorUpper.Equals("GREENYELLOW")) return KnownColor.GreenYellow;
                            break; 
                        case 'L':
                            if (colorUpper.Equals("LIGHTSALMON")) return KnownColor.LightSalmon;
                            if (colorUpper.Equals("LIGHTYELLOW")) return KnownColor.LightYellow;
                            break; 
                        case 'N':
                            if (colorUpper.Equals("NAVAJOWHITE")) return KnownColor.NavajoWhite; 
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SADDLEBROWN")) return KnownColor.SaddleBrown; 
                            if (colorUpper.Equals("SPRINGGREEN")) return KnownColor.SpringGreen;
                            break;
                        case 'T':
                            if (colorUpper.Equals("TRANSPARENT")) return KnownColor.Transparent; 
                            break;
                        case 'Y': 
                            if (colorUpper.Equals("YELLOWGREEN")) return KnownColor.YellowGreen; 
                            break;
                    } 
                        break;
                    case 12:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("ANTIQUEWHITE")) return KnownColor.AntiqueWhite; 
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKSEAGREEN")) return KnownColor.DarkSeaGreen; 
                            break;
                        case 'L':
                            if (colorUpper.Equals("LIGHTSKYBLUE")) return KnownColor.LightSkyBlue;
                            if (colorUpper.Equals("LEMONCHIFFON")) return KnownColor.LemonChiffon; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MEDIUMORCHID")) return KnownColor.MediumOrchid; 
                            if (colorUpper.Equals("MEDIUMPURPLE")) return KnownColor.MediumPurple;
                            if (colorUpper.Equals("MIDNIGHTBLUE")) return KnownColor.MidnightBlue; 
                            break;
                    }
                        break;
                    case 13: 
                    switch(colorUpper[0])
                    { 
                        case 'D': 
                            if (colorUpper.Equals("DARKSLATEBLUE")) return KnownColor.DarkSlateBlue;
                            if (colorUpper.Equals("DARKSLATEGRAY")) return KnownColor.DarkSlateGray; 
                            if (colorUpper.Equals("DARKGOLDENROD")) return KnownColor.DarkGoldenrod;
                            if (colorUpper.Equals("DARKTURQUOISE")) return KnownColor.DarkTurquoise;
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTSEAGREEN")) return KnownColor.LightSeaGreen;
                            if (colorUpper.Equals("LAVENDERBLUSH")) return KnownColor.LavenderBlush; 
                            break; 
                        case 'P':
                            if (colorUpper.Equals("PALEGOLDENROD")) return KnownColor.PaleGoldenrod; 
                            if (colorUpper.Equals("PALETURQUOISE")) return KnownColor.PaleTurquoise;
                            if (colorUpper.Equals("PALEVIOLETRED")) return KnownColor.PaleVioletRed;
                            break;
                    } 
                        break;
                    case 14: 
                    switch(colorUpper[0]) 
                    {
                        case 'B': 
                            if (colorUpper.Equals("BLANCHEDALMOND")) return KnownColor.BlanchedAlmond;
                            break;
                        case 'C':
                            if (colorUpper.Equals("CORNFLOWERBLUE")) return KnownColor.CornflowerBlue; 
                            break;
                        case 'D': 
                            if (colorUpper.Equals("DARKOLIVEGREEN")) return KnownColor.DarkOliveGreen; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTSLATEGRAY")) return KnownColor.LightSlateGray;
                            if (colorUpper.Equals("LIGHTSTEELBLUE")) return KnownColor.LightSteelBlue;
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MEDIUMSEAGREEN")) return KnownColor.MediumSeaGreen;
                            break; 
                    } 
                        break;
                    case 15: 
                        if (colorUpper.Equals("MEDIUMSLATEBLUE")) return KnownColor.MediumSlateBlue;
                        if (colorUpper.Equals("MEDIUMTURQUOISE")) return KnownColor.MediumTurquoise;
                        if (colorUpper.Equals("MEDIUMVIOLETRED")) return KnownColor.MediumVioletRed;
                        break; 
                    case 16:
                        if (colorUpper.Equals("MEDIUMAQUAMARINE")) return KnownColor.MediumAquamarine; 
                        break; 
                    case 17:
                        if (colorUpper.Equals("MEDIUMSPRINGGREEN")) return KnownColor.MediumSpringGreen; 
                        break;
                    case 20:
                        if (colorUpper.Equals("LIGHTGOLDENRODYELLOW")) return KnownColor.LightGoldenrodYellow;
                        break; 
                }
            } 
            // colorString was null or not found 
            return KnownColor.UnknownColor;
        } 

#if !PBTCOMPILER

#if DEBUG 
        private static int s_count = 0;
#endif 
 
        private static Dictionary s_solidColorBrushCache = new Dictionary();
#endif 
    }

#if !PBTCOMPILER
    ///  
    /// Colors - A collection of well-known Colors
    ///  
    public sealed class Colors 
    {
        #region Constructors 

        // Colors only has static members, so it shouldn't be constructable.
        private Colors()
        { 
        }
 
        #endregion Constructors 

        #region static Known Colors 

        /// 
        /// Well-known color: AliceBlue
        ///  
        public static Color AliceBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.AliceBlue); 
            }
        }

        ///  
        /// Well-known color: AntiqueWhite
        ///  
        public static Color AntiqueWhite 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.AntiqueWhite);
            }
        } 

        ///  
        /// Well-known color: Aqua 
        /// 
        public static Color Aqua 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Aqua); 
            }
        } 
 
        /// 
        /// Well-known color: Aquamarine 
        /// 
        public static Color Aquamarine
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Aquamarine); 
            } 
        }
 
        /// 
        /// Well-known color: Azure
        /// 
        public static Color Azure 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Azure);
            } 
        }

        /// 
        /// Well-known color: Beige 
        /// 
        public static Color Beige 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Beige);
            }
        }
 
        /// 
        /// Well-known color: Bisque 
        ///  
        public static Color Bisque
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Bisque);
            } 
        }
 
        ///  
        /// Well-known color: Black
        ///  
        public static Color Black
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Black);
            } 
        } 

        ///  
        /// Well-known color: BlanchedAlmond
        /// 
        public static Color BlanchedAlmond
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.BlanchedAlmond); 
            }
        } 

        /// 
        /// Well-known color: Blue
        ///  
        public static Color Blue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Blue); 
            }
        }

        ///  
        /// Well-known color: BlueViolet
        ///  
        public static Color BlueViolet 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.BlueViolet);
            }
        } 

        ///  
        /// Well-known color: Brown 
        /// 
        public static Color Brown 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Brown); 
            }
        } 
 
        /// 
        /// Well-known color: BurlyWood 
        /// 
        public static Color BurlyWood
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.BurlyWood); 
            } 
        }
 
        /// 
        /// Well-known color: CadetBlue
        /// 
        public static Color CadetBlue 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.CadetBlue);
            } 
        }

        /// 
        /// Well-known color: Chartreuse 
        /// 
        public static Color Chartreuse 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Chartreuse);
            }
        }
 
        /// 
        /// Well-known color: Chocolate 
        ///  
        public static Color Chocolate
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Chocolate);
            } 
        }
 
        ///  
        /// Well-known color: Coral
        ///  
        public static Color Coral
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Coral);
            } 
        } 

        ///  
        /// Well-known color: CornflowerBlue
        /// 
        public static Color CornflowerBlue
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.CornflowerBlue); 
            }
        } 

        /// 
        /// Well-known color: Cornsilk
        ///  
        public static Color Cornsilk
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Cornsilk); 
            }
        }

        ///  
        /// Well-known color: Crimson
        ///  
        public static Color Crimson 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Crimson);
            }
        } 

        ///  
        /// Well-known color: Cyan 
        /// 
        public static Color Cyan 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Cyan); 
            }
        } 
 
        /// 
        /// Well-known color: DarkBlue 
        /// 
        public static Color DarkBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkBlue); 
            } 
        }
 
        /// 
        /// Well-known color: DarkCyan
        /// 
        public static Color DarkCyan 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DarkCyan);
            } 
        }

        /// 
        /// Well-known color: DarkGoldenrod 
        /// 
        public static Color DarkGoldenrod 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkGoldenrod);
            }
        }
 
        /// 
        /// Well-known color: DarkGray 
        ///  
        public static Color DarkGray
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkGray);
            } 
        }
 
        ///  
        /// Well-known color: DarkGreen
        ///  
        public static Color DarkGreen
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkGreen);
            } 
        } 

        ///  
        /// Well-known color: DarkKhaki
        /// 
        public static Color DarkKhaki
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkKhaki); 
            }
        } 

        /// 
        /// Well-known color: DarkMagenta
        ///  
        public static Color DarkMagenta
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkMagenta); 
            }
        }

        ///  
        /// Well-known color: DarkOliveGreen
        ///  
        public static Color DarkOliveGreen 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkOliveGreen);
            }
        } 

        ///  
        /// Well-known color: DarkOrange 
        /// 
        public static Color DarkOrange 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkOrange); 
            }
        } 
 
        /// 
        /// Well-known color: DarkOrchid 
        /// 
        public static Color DarkOrchid
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkOrchid); 
            } 
        }
 
        /// 
        /// Well-known color: DarkRed
        /// 
        public static Color DarkRed 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DarkRed);
            } 
        }

        /// 
        /// Well-known color: DarkSalmon 
        /// 
        public static Color DarkSalmon 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSalmon);
            }
        }
 
        /// 
        /// Well-known color: DarkSeaGreen 
        ///  
        public static Color DarkSeaGreen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkSeaGreen);
            } 
        }
 
        ///  
        /// Well-known color: DarkSlateBlue
        ///  
        public static Color DarkSlateBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSlateBlue);
            } 
        } 

        ///  
        /// Well-known color: DarkSlateGray
        /// 
        public static Color DarkSlateGray
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSlateGray); 
            }
        } 

        /// 
        /// Well-known color: DarkTurquoise
        ///  
        public static Color DarkTurquoise
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkTurquoise); 
            }
        }

        ///  
        /// Well-known color: DarkViolet
        ///  
        public static Color DarkViolet 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkViolet);
            }
        } 

        ///  
        /// Well-known color: DeepPink 
        /// 
        public static Color DeepPink 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.DeepPink); 
            }
        } 
 
        /// 
        /// Well-known color: DeepSkyBlue 
        /// 
        public static Color DeepSkyBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DeepSkyBlue); 
            } 
        }
 
        /// 
        /// Well-known color: DimGray
        /// 
        public static Color DimGray 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DimGray);
            } 
        }

        /// 
        /// Well-known color: DodgerBlue 
        /// 
        public static Color DodgerBlue 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DodgerBlue);
            }
        }
 
        /// 
        /// Well-known color: Firebrick 
        ///  
        public static Color Firebrick
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Firebrick);
            } 
        }
 
        ///  
        /// Well-known color: FloralWhite
        ///  
        public static Color FloralWhite
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.FloralWhite);
            } 
        } 

        ///  
        /// Well-known color: ForestGreen
        /// 
        public static Color ForestGreen
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.ForestGreen); 
            }
        } 

        /// 
        /// Well-known color: Fuchsia
        ///  
        public static Color Fuchsia
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Fuchsia); 
            }
        }

        ///  
        /// Well-known color: Gainsboro
        ///  
        public static Color Gainsboro 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Gainsboro);
            }
        } 

        ///  
        /// Well-known color: GhostWhite 
        /// 
        public static Color GhostWhite 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.GhostWhite); 
            }
        } 
 
        /// 
        /// Well-known color: Gold 
        /// 
        public static Color Gold
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Gold); 
            } 
        }
 
        /// 
        /// Well-known color: Goldenrod
        /// 
        public static Color Goldenrod 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Goldenrod);
            } 
        }

        /// 
        /// Well-known color: Gray 
        /// 
        public static Color Gray 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Gray);
            }
        }
 
        /// 
        /// Well-known color: Green 
        ///  
        public static Color Green
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Green);
            } 
        }
 
        ///  
        /// Well-known color: GreenYellow
        ///  
        public static Color GreenYellow
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.GreenYellow);
            } 
        } 

        ///  
        /// Well-known color: Honeydew
        /// 
        public static Color Honeydew
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Honeydew); 
            }
        } 

        /// 
        /// Well-known color: HotPink
        ///  
        public static Color HotPink
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.HotPink); 
            }
        }

        ///  
        /// Well-known color: IndianRed
        ///  
        public static Color IndianRed 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.IndianRed);
            }
        } 

        ///  
        /// Well-known color: Indigo 
        /// 
        public static Color Indigo 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Indigo); 
            }
        } 
 
        /// 
        /// Well-known color: Ivory 
        /// 
        public static Color Ivory
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Ivory); 
            } 
        }
 
        /// 
        /// Well-known color: Khaki
        /// 
        public static Color Khaki 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Khaki);
            } 
        }

        /// 
        /// Well-known color: Lavender 
        /// 
        public static Color Lavender 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Lavender);
            }
        }
 
        /// 
        /// Well-known color: LavenderBlush 
        ///  
        public static Color LavenderBlush
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.LavenderBlush);
            } 
        }
 
        ///  
        /// Well-known color: LawnGreen
        ///  
        public static Color LawnGreen
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LawnGreen);
            } 
        } 

        ///  
        /// Well-known color: LemonChiffon
        /// 
        public static Color LemonChiffon
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LemonChiffon); 
            }
        } 

        /// 
        /// Well-known color: LightBlue
        ///  
        public static Color LightBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightBlue); 
            }
        }

        ///  
        /// Well-known color: LightCoral
        ///  
        public static Color LightCoral 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightCoral);
            }
        } 

        ///  
        /// Well-known color: LightCyan 
        /// 
        public static Color LightCyan 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightCyan); 
            }
        } 
 
        /// 
        /// Well-known color: LightGoldenrodYellow 
        /// 
        public static Color LightGoldenrodYellow
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightGoldenrodYellow); 
            } 
        }
 
        /// 
        /// Well-known color: LightGray
        /// 
        public static Color LightGray 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.LightGray);
            } 
        }

        /// 
        /// Well-known color: LightGreen 
        /// 
        public static Color LightGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightGreen);
            }
        }
 
        /// 
        /// Well-known color: LightPink 
        ///  
        public static Color LightPink
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightPink);
            } 
        }
 
        ///  
        /// Well-known color: LightSalmon
        ///  
        public static Color LightSalmon
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightSalmon);
            } 
        } 

        ///  
        /// Well-known color: LightSeaGreen
        /// 
        public static Color LightSeaGreen
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightSeaGreen); 
            }
        } 

        /// 
        /// Well-known color: LightSkyBlue
        ///  
        public static Color LightSkyBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightSkyBlue); 
            }
        }

        ///  
        /// Well-known color: LightSlateGray
        ///  
        public static Color LightSlateGray 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightSlateGray);
            }
        } 

        ///  
        /// Well-known color: LightSteelBlue 
        /// 
        public static Color LightSteelBlue 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightSteelBlue); 
            }
        } 
 
        /// 
        /// Well-known color: LightYellow 
        /// 
        public static Color LightYellow
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightYellow); 
            } 
        }
 
        /// 
        /// Well-known color: Lime
        /// 
        public static Color Lime 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Lime);
            } 
        }

        /// 
        /// Well-known color: LimeGreen 
        /// 
        public static Color LimeGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LimeGreen);
            }
        }
 
        /// 
        /// Well-known color: Linen 
        ///  
        public static Color Linen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Linen);
            } 
        }
 
        ///  
        /// Well-known color: Magenta
        ///  
        public static Color Magenta
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Magenta);
            } 
        } 

        ///  
        /// Well-known color: Maroon
        /// 
        public static Color Maroon
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Maroon); 
            }
        } 

        /// 
        /// Well-known color: MediumAquamarine
        ///  
        public static Color MediumAquamarine
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumAquamarine); 
            }
        }

        ///  
        /// Well-known color: MediumBlue
        ///  
        public static Color MediumBlue 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumBlue);
            }
        } 

        ///  
        /// Well-known color: MediumOrchid 
        /// 
        public static Color MediumOrchid 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.MediumOrchid); 
            }
        } 
 
        /// 
        /// Well-known color: MediumPurple 
        /// 
        public static Color MediumPurple
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumPurple); 
            } 
        }
 
        /// 
        /// Well-known color: MediumSeaGreen
        /// 
        public static Color MediumSeaGreen 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.MediumSeaGreen);
            } 
        }

        /// 
        /// Well-known color: MediumSlateBlue 
        /// 
        public static Color MediumSlateBlue 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumSlateBlue);
            }
        }
 
        /// 
        /// Well-known color: MediumSpringGreen 
        ///  
        public static Color MediumSpringGreen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.MediumSpringGreen);
            } 
        }
 
        ///  
        /// Well-known color: MediumTurquoise
        ///  
        public static Color MediumTurquoise
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumTurquoise);
            } 
        } 

        ///  
        /// Well-known color: MediumVioletRed
        /// 
        public static Color MediumVioletRed
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumVioletRed); 
            }
        } 

        /// 
        /// Well-known color: MidnightBlue
        ///  
        public static Color MidnightBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MidnightBlue); 
            }
        }

        ///  
        /// Well-known color: MintCream
        ///  
        public static Color MintCream 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MintCream);
            }
        } 

        ///  
        /// Well-known color: MistyRose 
        /// 
        public static Color MistyRose 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.MistyRose); 
            }
        } 
 
        /// 
        /// Well-known color: Moccasin 
        /// 
        public static Color Moccasin
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Moccasin); 
            } 
        }
 
        /// 
        /// Well-known color: NavajoWhite
        /// 
        public static Color NavajoWhite 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.NavajoWhite);
            } 
        }

        /// 
        /// Well-known color: Navy 
        /// 
        public static Color Navy 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Navy);
            }
        }
 
        /// 
        /// Well-known color: OldLace 
        ///  
        public static Color OldLace
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.OldLace);
            } 
        }
 
        ///  
        /// Well-known color: Olive
        ///  
        public static Color Olive
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Olive);
            } 
        } 

        ///  
        /// Well-known color: OliveDrab
        /// 
        public static Color OliveDrab
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.OliveDrab); 
            }
        } 

        /// 
        /// Well-known color: Orange
        ///  
        public static Color Orange
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Orange); 
            }
        }

        ///  
        /// Well-known color: OrangeRed
        ///  
        public static Color OrangeRed 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.OrangeRed);
            }
        } 

        ///  
        /// Well-known color: Orchid 
        /// 
        public static Color Orchid 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Orchid); 
            }
        } 
 
        /// 
        /// Well-known color: PaleGoldenrod 
        /// 
        public static Color PaleGoldenrod
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.PaleGoldenrod); 
            } 
        }
 
        /// 
        /// Well-known color: PaleGreen
        /// 
        public static Color PaleGreen 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.PaleGreen);
            } 
        }

        /// 
        /// Well-known color: PaleTurquoise 
        /// 
        public static Color PaleTurquoise 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PaleTurquoise);
            }
        }
 
        /// 
        /// Well-known color: PaleVioletRed 
        ///  
        public static Color PaleVioletRed
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.PaleVioletRed);
            } 
        }
 
        ///  
        /// Well-known color: PapayaWhip
        ///  
        public static Color PapayaWhip
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PapayaWhip);
            } 
        } 

        ///  
        /// Well-known color: PeachPuff
        /// 
        public static Color PeachPuff
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PeachPuff); 
            }
        } 

        /// 
        /// Well-known color: Peru
        ///  
        public static Color Peru
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Peru); 
            }
        }

        ///  
        /// Well-known color: Pink
        ///  
        public static Color Pink 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Pink);
            }
        } 

        ///  
        /// Well-known color: Plum 
        /// 
        public static Color Plum 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Plum); 
            }
        } 
 
        /// 
        /// Well-known color: PowderBlue 
        /// 
        public static Color PowderBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.PowderBlue); 
            } 
        }
 
        /// 
        /// Well-known color: Purple
        /// 
        public static Color Purple 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Purple);
            } 
        }

        /// 
        /// Well-known color: Red 
        /// 
        public static Color Red 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Red);
            }
        }
 
        /// 
        /// Well-known color: RosyBrown 
        ///  
        public static Color RosyBrown
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.RosyBrown);
            } 
        }
 
        ///  
        /// Well-known color: RoyalBlue
        ///  
        public static Color RoyalBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.RoyalBlue);
            } 
        } 

        ///  
        /// Well-known color: SaddleBrown
        /// 
        public static Color SaddleBrown
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SaddleBrown); 
            }
        } 

        /// 
        /// Well-known color: Salmon
        ///  
        public static Color Salmon
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Salmon); 
            }
        }

        ///  
        /// Well-known color: SandyBrown
        ///  
        public static Color SandyBrown 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SandyBrown);
            }
        } 

        ///  
        /// Well-known color: SeaGreen 
        /// 
        public static Color SeaGreen 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.SeaGreen); 
            }
        } 
 
        /// 
        /// Well-known color: SeaShell 
        /// 
        public static Color SeaShell
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SeaShell); 
            } 
        }
 
        /// 
        /// Well-known color: Sienna
        /// 
        public static Color Sienna 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Sienna);
            } 
        }

        /// 
        /// Well-known color: Silver 
        /// 
        public static Color Silver 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Silver);
            }
        }
 
        /// 
        /// Well-known color: SkyBlue 
        ///  
        public static Color SkyBlue
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.SkyBlue);
            } 
        }
 
        ///  
        /// Well-known color: SlateBlue
        ///  
        public static Color SlateBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SlateBlue);
            } 
        } 

        ///  
        /// Well-known color: SlateGray
        /// 
        public static Color SlateGray
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SlateGray); 
            }
        } 

        /// 
        /// Well-known color: Snow
        ///  
        public static Color Snow
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Snow); 
            }
        }

        ///  
        /// Well-known color: SpringGreen
        ///  
        public static Color SpringGreen 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SpringGreen);
            }
        } 

        ///  
        /// Well-known color: SteelBlue 
        /// 
        public static Color SteelBlue 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.SteelBlue); 
            }
        } 
 
        /// 
        /// Well-known color: Tan 
        /// 
        public static Color Tan
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Tan); 
            } 
        }
 
        /// 
        /// Well-known color: Teal
        /// 
        public static Color Teal 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Teal);
            } 
        }

        /// 
        /// Well-known color: Thistle 
        /// 
        public static Color Thistle 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Thistle);
            }
        }
 
        /// 
        /// Well-known color: Tomato 
        ///  
        public static Color Tomato
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Tomato);
            } 
        }
 
        ///  
        /// Well-known color: Transparent
        ///  
        public static Color Transparent
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Transparent);
            } 
        } 

        ///  
        /// Well-known color: Turquoise
        /// 
        public static Color Turquoise
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Turquoise); 
            }
        } 

        /// 
        /// Well-known color: Violet
        ///  
        public static Color Violet
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Violet); 
            }
        }

        ///  
        /// Well-known color: Wheat
        ///  
        public static Color Wheat 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Wheat);
            }
        } 

        ///  
        /// Well-known color: White 
        /// 
        public static Color White 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.White); 
            }
        } 
 
        /// 
        /// Well-known color: WhiteSmoke 
        /// 
        public static Color WhiteSmoke
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.WhiteSmoke); 
            } 
        }
 
        /// 
        /// Well-known color: Yellow
        /// 
        public static Color Yellow 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Yellow);
            } 
        }

        /// 
        /// Well-known color: YellowGreen 
        /// 
        public static Color YellowGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.YellowGreen);
            }
        }
 
        #endregion static Known Colors
    } 
#endif 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------ 
//  Microsoft Avalon
//  Copyright (c) Microsoft Corporation, 2001, 2002
//
//  File: knowncolors.cs 
//-----------------------------------------------------------------------------
 
#if PBTCOMPILER 
namespace MS.Internal.Markup
#else 
using System.Windows.Media;
using MS.Internal;
using System.Collections.Generic;
 
using System;
 
namespace System.Windows.Media 
#endif
{ 
    /// Enum containing handles to all known colors
    /// Since the first element is 0, second is 1, etc, we can use this to index
    /// directly into an array
    internal enum KnownColor : uint 
    {
        // We've reserved the value "1" as unknown.  If for some odd reason "1" is added to the 
        // list, redefined UnknownColor 

        AliceBlue = 0xFFF0F8FF, 
        AntiqueWhite = 0xFFFAEBD7,
        Aqua = 0xFF00FFFF,
        Aquamarine = 0xFF7FFFD4,
        Azure = 0xFFF0FFFF, 
        Beige = 0xFFF5F5DC,
        Bisque = 0xFFFFE4C4, 
        Black = 0xFF000000, 
        BlanchedAlmond = 0xFFFFEBCD,
        Blue = 0xFF0000FF, 
        BlueViolet = 0xFF8A2BE2,
        Brown = 0xFFA52A2A,
        BurlyWood = 0xFFDEB887,
        CadetBlue = 0xFF5F9EA0, 
        Chartreuse = 0xFF7FFF00,
        Chocolate = 0xFFD2691E, 
        Coral = 0xFFFF7F50, 
        CornflowerBlue = 0xFF6495ED,
        Cornsilk = 0xFFFFF8DC, 
        Crimson = 0xFFDC143C,
        Cyan = 0xFF00FFFF,
        DarkBlue = 0xFF00008B,
        DarkCyan = 0xFF008B8B, 
        DarkGoldenrod = 0xFFB8860B,
        DarkGray = 0xFFA9A9A9, 
        DarkGreen = 0xFF006400, 
        DarkKhaki = 0xFFBDB76B,
        DarkMagenta = 0xFF8B008B, 
        DarkOliveGreen = 0xFF556B2F,
        DarkOrange = 0xFFFF8C00,
        DarkOrchid = 0xFF9932CC,
        DarkRed = 0xFF8B0000, 
        DarkSalmon = 0xFFE9967A,
        DarkSeaGreen = 0xFF8FBC8F, 
        DarkSlateBlue = 0xFF483D8B, 
        DarkSlateGray = 0xFF2F4F4F,
        DarkTurquoise = 0xFF00CED1, 
        DarkViolet = 0xFF9400D3,
        DeepPink = 0xFFFF1493,
        DeepSkyBlue = 0xFF00BFFF,
        DimGray = 0xFF696969, 
        DodgerBlue = 0xFF1E90FF,
        Firebrick = 0xFFB22222, 
        FloralWhite = 0xFFFFFAF0, 
        ForestGreen = 0xFF228B22,
        Fuchsia = 0xFFFF00FF, 
        Gainsboro = 0xFFDCDCDC,
        GhostWhite = 0xFFF8F8FF,
        Gold = 0xFFFFD700,
        Goldenrod = 0xFFDAA520, 
        Gray = 0xFF808080,
        Green = 0xFF008000, 
        GreenYellow = 0xFFADFF2F, 
        Honeydew = 0xFFF0FFF0,
        HotPink = 0xFFFF69B4, 
        IndianRed = 0xFFCD5C5C,
        Indigo = 0xFF4B0082,
        Ivory = 0xFFFFFFF0,
        Khaki = 0xFFF0E68C, 
        Lavender = 0xFFE6E6FA,
        LavenderBlush = 0xFFFFF0F5, 
        LawnGreen = 0xFF7CFC00, 
        LemonChiffon = 0xFFFFFACD,
        LightBlue = 0xFFADD8E6, 
        LightCoral = 0xFFF08080,
        LightCyan = 0xFFE0FFFF,
        LightGoldenrodYellow = 0xFFFAFAD2,
        LightGreen = 0xFF90EE90, 
        LightGray = 0xFFD3D3D3,
        LightPink = 0xFFFFB6C1, 
        LightSalmon = 0xFFFFA07A, 
        LightSeaGreen = 0xFF20B2AA,
        LightSkyBlue = 0xFF87CEFA, 
        LightSlateGray = 0xFF778899,
        LightSteelBlue = 0xFFB0C4DE,
        LightYellow = 0xFFFFFFE0,
        Lime = 0xFF00FF00, 
        LimeGreen = 0xFF32CD32,
        Linen = 0xFFFAF0E6, 
        Magenta = 0xFFFF00FF, 
        Maroon = 0xFF800000,
        MediumAquamarine = 0xFF66CDAA, 
        MediumBlue = 0xFF0000CD,
        MediumOrchid = 0xFFBA55D3,
        MediumPurple = 0xFF9370DB,
        MediumSeaGreen = 0xFF3CB371, 
        MediumSlateBlue = 0xFF7B68EE,
        MediumSpringGreen = 0xFF00FA9A, 
        MediumTurquoise = 0xFF48D1CC, 
        MediumVioletRed = 0xFFC71585,
        MidnightBlue = 0xFF191970, 
        MintCream = 0xFFF5FFFA,
        MistyRose = 0xFFFFE4E1,
        Moccasin = 0xFFFFE4B5,
        NavajoWhite = 0xFFFFDEAD, 
        Navy = 0xFF000080,
        OldLace = 0xFFFDF5E6, 
        Olive = 0xFF808000, 
        OliveDrab = 0xFF6B8E23,
        Orange = 0xFFFFA500, 
        OrangeRed = 0xFFFF4500,
        Orchid = 0xFFDA70D6,
        PaleGoldenrod = 0xFFEEE8AA,
        PaleGreen = 0xFF98FB98, 
        PaleTurquoise = 0xFFAFEEEE,
        PaleVioletRed = 0xFFDB7093, 
        PapayaWhip = 0xFFFFEFD5, 
        PeachPuff = 0xFFFFDAB9,
        Peru = 0xFFCD853F, 
        Pink = 0xFFFFC0CB,
        Plum = 0xFFDDA0DD,
        PowderBlue = 0xFFB0E0E6,
        Purple = 0xFF800080, 
        Red = 0xFFFF0000,
        RosyBrown = 0xFFBC8F8F, 
        RoyalBlue = 0xFF4169E1, 
        SaddleBrown = 0xFF8B4513,
        Salmon = 0xFFFA8072, 
        SandyBrown = 0xFFF4A460,
        SeaGreen = 0xFF2E8B57,
        SeaShell = 0xFFFFF5EE,
        Sienna = 0xFFA0522D, 
        Silver = 0xFFC0C0C0,
        SkyBlue = 0xFF87CEEB, 
        SlateBlue = 0xFF6A5ACD, 
        SlateGray = 0xFF708090,
        Snow = 0xFFFFFAFA, 
        SpringGreen = 0xFF00FF7F,
        SteelBlue = 0xFF4682B4,
        Tan = 0xFFD2B48C,
        Teal = 0xFF008080, 
        Thistle = 0xFFD8BFD8,
        Tomato = 0xFFFF6347, 
        Transparent = 0x00FFFFFF, 
        Turquoise = 0xFF40E0D0,
        Violet = 0xFFEE82EE, 
        Wheat = 0xFFF5DEB3,
        White = 0xFFFFFFFF,
        WhiteSmoke = 0xFFF5F5F5,
        Yellow = 0xFFFFFF00, 
        YellowGreen = 0xFF9ACD32,
        UnknownColor = 0x00000001 
    } 

    internal static class KnownColors 
    {
#if !PBTCOMPILER
        /// Return the solid color brush from a color string.  If there's no match, null
        public static SolidColorBrush ColorStringToKnownBrush(string s) 
        {
            if (null != s) 
            { 
                KnownColor result = ColorStringToKnownColor(s);
 
                // If the result is UnknownColor, that means this string wasn't found
                if (result != KnownColor.UnknownColor)
                {
                    // Otherwise, return the appropriate SolidColorBrush 
                    return SolidColorBrushFromUint((uint)result);
                } 
            } 
            return null;
        } 

        public static SolidColorBrush SolidColorBrushFromUint(uint argb)
        {
            SolidColorBrush scp = null; 

            lock(s_solidColorBrushCache) 
            { 
                // Attempt to retrieve the color.  If it fails create it.
                if (!s_solidColorBrushCache.TryGetValue(argb, out scp)) 
                {
                    scp = new SolidColorBrush(Color.FromUInt32(argb));
                    scp.Freeze();
                    s_solidColorBrushCache[argb] = scp; 
                }
#if DEBUG 
                else 
                {
                    s_count++; 
                }
#endif
            }
 
            return scp;
        } 
 
        static internal string MatchColor(string colorString, out bool isKnownColor, out bool isNumericColor, out bool isContextColor, out bool isScRgbColor)
        { 

            string trimmedString = colorString.Trim();

            if (((trimmedString.Length == 4) || 
                (trimmedString.Length == 5) ||
                (trimmedString.Length == 7) || 
                (trimmedString.Length == 9)) && 
                (trimmedString[0] == '#'))
            { 
                isNumericColor = true;
                isScRgbColor = false;
                isKnownColor = false;
                isContextColor = false; 
                return trimmedString;
            } 
            else 
                isNumericColor = false;
 
            if ((trimmedString.StartsWith("sc#", StringComparison.Ordinal) == true))
            {
                isNumericColor = false;
                isScRgbColor = true; 
                isKnownColor = false;
                isContextColor = false; 
            } 
            else
            { 
                isScRgbColor = false;
            }

            if ((trimmedString.StartsWith(Parsers.s_ContextColor, StringComparison.OrdinalIgnoreCase) == true)) 
            {
                isContextColor = true; 
                isScRgbColor = false; 
                isKnownColor = false;
                return trimmedString; 
            }
            else
            {
                isContextColor = false; 
                isKnownColor = true;
            } 
 
            return trimmedString;
        } 
#endif

        /// Return the KnownColor from a color string.  If there's no match, KnownColor.UnknownColor
        internal static KnownColor ColorStringToKnownColor(string colorString) 
        {
            if (null != colorString) 
            { 
                // We use invariant culture because we don't globalize our color names
                string colorUpper = colorString.ToUpper(System.Globalization.CultureInfo.InvariantCulture); 

                // Use String.Equals because it does explicit equality
                // StartsWith/EndsWith are culture sensitive and are 4-7 times slower than Equals
 
                switch (colorUpper.Length)
                { 
                    case 3: 
                        if (colorUpper.Equals("RED")) return KnownColor.Red;
                        if (colorUpper.Equals("TAN")) return KnownColor.Tan; 
                        break;
                    case 4:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("AQUA")) return KnownColor.Aqua; 
                            break; 
                        case 'B':
                            if (colorUpper.Equals("BLUE")) return KnownColor.Blue; 
                            break;
                        case 'C':
                            if (colorUpper.Equals("CYAN")) return KnownColor.Cyan;
                            break; 
                        case 'G':
                            if (colorUpper.Equals("GOLD")) return KnownColor.Gold; 
                            if (colorUpper.Equals("GRAY")) return KnownColor.Gray; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIME")) return KnownColor.Lime;
                            break;
                        case 'N':
                            if (colorUpper.Equals("NAVY")) return KnownColor.Navy; 
                            break;
                        case 'P': 
                            if (colorUpper.Equals("PERU")) return KnownColor.Peru; 
                            if (colorUpper.Equals("PINK")) return KnownColor.Pink;
                            if (colorUpper.Equals("PLUM")) return KnownColor.Plum; 
                            break;
                        case 'S':
                            if (colorUpper.Equals("SNOW")) return KnownColor.Snow;
                            break; 
                        case 'T':
                            if (colorUpper.Equals("TEAL")) return KnownColor.Teal; 
                            break; 
                    }
                        break; 
                    case 5:
                    switch(colorUpper[0])
                    {
                        case 'A': 
                            if (colorUpper.Equals("AZURE")) return KnownColor.Azure;
                            break; 
                        case 'B': 
                            if (colorUpper.Equals("BEIGE")) return KnownColor.Beige;
                            if (colorUpper.Equals("BLACK")) return KnownColor.Black; 
                            if (colorUpper.Equals("BROWN")) return KnownColor.Brown;
                            break;
                        case 'C':
                            if (colorUpper.Equals("CORAL")) return KnownColor.Coral; 
                            break;
                        case 'G': 
                            if (colorUpper.Equals("GREEN")) return KnownColor.Green; 
                            break;
                        case 'I': 
                            if (colorUpper.Equals("IVORY")) return KnownColor.Ivory;
                            break;
                        case 'K':
                            if (colorUpper.Equals("KHAKI")) return KnownColor.Khaki; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LINEN")) return KnownColor.Linen; 
                            break;
                        case 'O': 
                            if (colorUpper.Equals("OLIVE")) return KnownColor.Olive;
                            break;
                        case 'W':
                            if (colorUpper.Equals("WHEAT")) return KnownColor.Wheat; 
                            if (colorUpper.Equals("WHITE")) return KnownColor.White;
                            break; 
                    } 
                        break;
                    case 6: 
                    switch(colorUpper[0])
                    {
                        case 'B':
                            if (colorUpper.Equals("BISQUE")) return KnownColor.Bisque; 
                            break;
                        case 'I': 
                            if (colorUpper.Equals("INDIGO")) return KnownColor.Indigo; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MAROON")) return KnownColor.Maroon;
                            break;
                        case 'O':
                            if (colorUpper.Equals("ORANGE")) return KnownColor.Orange; 
                            if (colorUpper.Equals("ORCHID")) return KnownColor.Orchid;
                            break; 
                        case 'P': 
                            if (colorUpper.Equals("PURPLE")) return KnownColor.Purple;
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SALMON")) return KnownColor.Salmon;
                            if (colorUpper.Equals("SIENNA")) return KnownColor.Sienna;
                            if (colorUpper.Equals("SILVER")) return KnownColor.Silver; 
                            break;
                        case 'T': 
                            if (colorUpper.Equals("TOMATO")) return KnownColor.Tomato; 
                            break;
                        case 'V': 
                            if (colorUpper.Equals("VIOLET")) return KnownColor.Violet;
                            break;
                        case 'Y':
                            if (colorUpper.Equals("YELLOW")) return KnownColor.Yellow; 
                            break;
                    } 
                        break; 
                    case 7:
                    switch(colorUpper[0]) 
                    {
                        case 'C':
                            if (colorUpper.Equals("CRIMSON")) return KnownColor.Crimson;
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKRED")) return KnownColor.DarkRed; 
                            if (colorUpper.Equals("DIMGRAY")) return KnownColor.DimGray; 
                            break;
                        case 'F': 
                            if (colorUpper.Equals("FUCHSIA")) return KnownColor.Fuchsia;
                            break;
                        case 'H':
                            if (colorUpper.Equals("HOTPINK")) return KnownColor.HotPink; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MAGENTA")) return KnownColor.Magenta; 
                            break;
                        case 'O': 
                            if (colorUpper.Equals("OLDLACE")) return KnownColor.OldLace;
                            break;
                        case 'S':
                            if (colorUpper.Equals("SKYBLUE")) return KnownColor.SkyBlue; 
                            break;
                        case 'T': 
                            if (colorUpper.Equals("THISTLE")) return KnownColor.Thistle; 
                            break;
                    } 
                        break;
                    case 8:
                    switch(colorUpper[0])
                    { 
                        case 'C':
                            if (colorUpper.Equals("CORNSILK")) return KnownColor.Cornsilk; 
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKBLUE")) return KnownColor.DarkBlue; 
                            if (colorUpper.Equals("DARKCYAN")) return KnownColor.DarkCyan;
                            if (colorUpper.Equals("DARKGRAY")) return KnownColor.DarkGray;
                            if (colorUpper.Equals("DEEPPINK")) return KnownColor.DeepPink;
                            break; 
                        case 'H':
                            if (colorUpper.Equals("HONEYDEW")) return KnownColor.Honeydew; 
                            break; 
                        case 'L':
                            if (colorUpper.Equals("LAVENDER")) return KnownColor.Lavender; 
                            break;
                        case 'M':
                            if (colorUpper.Equals("MOCCASIN")) return KnownColor.Moccasin;
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SEAGREEN")) return KnownColor.SeaGreen; 
                            if (colorUpper.Equals("SEASHELL")) return KnownColor.SeaShell; 
                            break;
                    } 
                        break;
                    case 9:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("ALICEBLUE")) return KnownColor.AliceBlue; 
                            break; 
                        case 'B':
                            if (colorUpper.Equals("BURLYWOOD")) return KnownColor.BurlyWood; 
                            break;
                        case 'C':
                            if (colorUpper.Equals("CADETBLUE")) return KnownColor.CadetBlue;
                            if (colorUpper.Equals("CHOCOLATE")) return KnownColor.Chocolate; 
                            break;
                        case 'D': 
                            if (colorUpper.Equals("DARKGREEN")) return KnownColor.DarkGreen; 
                            if (colorUpper.Equals("DARKKHAKI")) return KnownColor.DarkKhaki;
                            break; 
                        case 'F':
                            if (colorUpper.Equals("FIREBRICK")) return KnownColor.Firebrick;
                            break;
                        case 'G': 
                            if (colorUpper.Equals("GAINSBORO")) return KnownColor.Gainsboro;
                            if (colorUpper.Equals("GOLDENROD")) return KnownColor.Goldenrod; 
                            break; 
                        case 'I':
                            if (colorUpper.Equals("INDIANRED")) return KnownColor.IndianRed; 
                            break;
                        case 'L':
                            if (colorUpper.Equals("LAWNGREEN")) return KnownColor.LawnGreen;
                            if (colorUpper.Equals("LIGHTBLUE")) return KnownColor.LightBlue; 
                            if (colorUpper.Equals("LIGHTCYAN")) return KnownColor.LightCyan;
                            if (colorUpper.Equals("LIGHTGRAY")) return KnownColor.LightGray; 
                            if (colorUpper.Equals("LIGHTPINK")) return KnownColor.LightPink; 
                            if (colorUpper.Equals("LIMEGREEN")) return KnownColor.LimeGreen;
                            break; 
                        case 'M':
                            if (colorUpper.Equals("MINTCREAM")) return KnownColor.MintCream;
                            if (colorUpper.Equals("MISTYROSE")) return KnownColor.MistyRose;
                            break; 
                        case 'O':
                            if (colorUpper.Equals("OLIVEDRAB")) return KnownColor.OliveDrab; 
                            if (colorUpper.Equals("ORANGERED")) return KnownColor.OrangeRed; 
                            break;
                        case 'P': 
                            if (colorUpper.Equals("PALEGREEN")) return KnownColor.PaleGreen;
                            if (colorUpper.Equals("PEACHPUFF")) return KnownColor.PeachPuff;
                            break;
                        case 'R': 
                            if (colorUpper.Equals("ROSYBROWN")) return KnownColor.RosyBrown;
                            if (colorUpper.Equals("ROYALBLUE")) return KnownColor.RoyalBlue; 
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SLATEBLUE")) return KnownColor.SlateBlue; 
                            if (colorUpper.Equals("SLATEGRAY")) return KnownColor.SlateGray;
                            if (colorUpper.Equals("STEELBLUE")) return KnownColor.SteelBlue;
                            break;
                        case 'T': 
                            if (colorUpper.Equals("TURQUOISE")) return KnownColor.Turquoise;
                            break; 
                    } 
                        break;
                    case 10: 
                    switch(colorUpper[0])
                    {
                        case 'A':
                            if (colorUpper.Equals("AQUAMARINE")) return KnownColor.Aquamarine; 
                            break;
                        case 'B': 
                            if (colorUpper.Equals("BLUEVIOLET")) return KnownColor.BlueViolet; 
                            break;
                        case 'C': 
                            if (colorUpper.Equals("CHARTREUSE")) return KnownColor.Chartreuse;
                            break;
                        case 'D':
                            if (colorUpper.Equals("DARKORANGE")) return KnownColor.DarkOrange; 
                            if (colorUpper.Equals("DARKORCHID")) return KnownColor.DarkOrchid;
                            if (colorUpper.Equals("DARKSALMON")) return KnownColor.DarkSalmon; 
                            if (colorUpper.Equals("DARKVIOLET")) return KnownColor.DarkViolet; 
                            if (colorUpper.Equals("DODGERBLUE")) return KnownColor.DodgerBlue;
                            break; 
                        case 'G':
                            if (colorUpper.Equals("GHOSTWHITE")) return KnownColor.GhostWhite;
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTCORAL")) return KnownColor.LightCoral;
                            if (colorUpper.Equals("LIGHTGREEN")) return KnownColor.LightGreen; 
                            break; 
                        case 'M':
                            if (colorUpper.Equals("MEDIUMBLUE")) return KnownColor.MediumBlue; 
                            break;
                        case 'P':
                            if (colorUpper.Equals("PAPAYAWHIP")) return KnownColor.PapayaWhip;
                            if (colorUpper.Equals("POWDERBLUE")) return KnownColor.PowderBlue; 
                            break;
                        case 'S': 
                            if (colorUpper.Equals("SANDYBROWN")) return KnownColor.SandyBrown; 
                            break;
                        case 'W': 
                            if (colorUpper.Equals("WHITESMOKE")) return KnownColor.WhiteSmoke;
                            break;
                    }
                        break; 
                    case 11:
                    switch(colorUpper[0]) 
                    { 
                        case 'D':
                            if (colorUpper.Equals("DARKMAGENTA")) return KnownColor.DarkMagenta; 
                            if (colorUpper.Equals("DEEPSKYBLUE")) return KnownColor.DeepSkyBlue;
                            break;
                        case 'F':
                            if (colorUpper.Equals("FLORALWHITE")) return KnownColor.FloralWhite; 
                            if (colorUpper.Equals("FORESTGREEN")) return KnownColor.ForestGreen;
                            break; 
                        case 'G': 
                            if (colorUpper.Equals("GREENYELLOW")) return KnownColor.GreenYellow;
                            break; 
                        case 'L':
                            if (colorUpper.Equals("LIGHTSALMON")) return KnownColor.LightSalmon;
                            if (colorUpper.Equals("LIGHTYELLOW")) return KnownColor.LightYellow;
                            break; 
                        case 'N':
                            if (colorUpper.Equals("NAVAJOWHITE")) return KnownColor.NavajoWhite; 
                            break; 
                        case 'S':
                            if (colorUpper.Equals("SADDLEBROWN")) return KnownColor.SaddleBrown; 
                            if (colorUpper.Equals("SPRINGGREEN")) return KnownColor.SpringGreen;
                            break;
                        case 'T':
                            if (colorUpper.Equals("TRANSPARENT")) return KnownColor.Transparent; 
                            break;
                        case 'Y': 
                            if (colorUpper.Equals("YELLOWGREEN")) return KnownColor.YellowGreen; 
                            break;
                    } 
                        break;
                    case 12:
                    switch(colorUpper[0])
                    { 
                        case 'A':
                            if (colorUpper.Equals("ANTIQUEWHITE")) return KnownColor.AntiqueWhite; 
                            break; 
                        case 'D':
                            if (colorUpper.Equals("DARKSEAGREEN")) return KnownColor.DarkSeaGreen; 
                            break;
                        case 'L':
                            if (colorUpper.Equals("LIGHTSKYBLUE")) return KnownColor.LightSkyBlue;
                            if (colorUpper.Equals("LEMONCHIFFON")) return KnownColor.LemonChiffon; 
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MEDIUMORCHID")) return KnownColor.MediumOrchid; 
                            if (colorUpper.Equals("MEDIUMPURPLE")) return KnownColor.MediumPurple;
                            if (colorUpper.Equals("MIDNIGHTBLUE")) return KnownColor.MidnightBlue; 
                            break;
                    }
                        break;
                    case 13: 
                    switch(colorUpper[0])
                    { 
                        case 'D': 
                            if (colorUpper.Equals("DARKSLATEBLUE")) return KnownColor.DarkSlateBlue;
                            if (colorUpper.Equals("DARKSLATEGRAY")) return KnownColor.DarkSlateGray; 
                            if (colorUpper.Equals("DARKGOLDENROD")) return KnownColor.DarkGoldenrod;
                            if (colorUpper.Equals("DARKTURQUOISE")) return KnownColor.DarkTurquoise;
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTSEAGREEN")) return KnownColor.LightSeaGreen;
                            if (colorUpper.Equals("LAVENDERBLUSH")) return KnownColor.LavenderBlush; 
                            break; 
                        case 'P':
                            if (colorUpper.Equals("PALEGOLDENROD")) return KnownColor.PaleGoldenrod; 
                            if (colorUpper.Equals("PALETURQUOISE")) return KnownColor.PaleTurquoise;
                            if (colorUpper.Equals("PALEVIOLETRED")) return KnownColor.PaleVioletRed;
                            break;
                    } 
                        break;
                    case 14: 
                    switch(colorUpper[0]) 
                    {
                        case 'B': 
                            if (colorUpper.Equals("BLANCHEDALMOND")) return KnownColor.BlanchedAlmond;
                            break;
                        case 'C':
                            if (colorUpper.Equals("CORNFLOWERBLUE")) return KnownColor.CornflowerBlue; 
                            break;
                        case 'D': 
                            if (colorUpper.Equals("DARKOLIVEGREEN")) return KnownColor.DarkOliveGreen; 
                            break;
                        case 'L': 
                            if (colorUpper.Equals("LIGHTSLATEGRAY")) return KnownColor.LightSlateGray;
                            if (colorUpper.Equals("LIGHTSTEELBLUE")) return KnownColor.LightSteelBlue;
                            break;
                        case 'M': 
                            if (colorUpper.Equals("MEDIUMSEAGREEN")) return KnownColor.MediumSeaGreen;
                            break; 
                    } 
                        break;
                    case 15: 
                        if (colorUpper.Equals("MEDIUMSLATEBLUE")) return KnownColor.MediumSlateBlue;
                        if (colorUpper.Equals("MEDIUMTURQUOISE")) return KnownColor.MediumTurquoise;
                        if (colorUpper.Equals("MEDIUMVIOLETRED")) return KnownColor.MediumVioletRed;
                        break; 
                    case 16:
                        if (colorUpper.Equals("MEDIUMAQUAMARINE")) return KnownColor.MediumAquamarine; 
                        break; 
                    case 17:
                        if (colorUpper.Equals("MEDIUMSPRINGGREEN")) return KnownColor.MediumSpringGreen; 
                        break;
                    case 20:
                        if (colorUpper.Equals("LIGHTGOLDENRODYELLOW")) return KnownColor.LightGoldenrodYellow;
                        break; 
                }
            } 
            // colorString was null or not found 
            return KnownColor.UnknownColor;
        } 

#if !PBTCOMPILER

#if DEBUG 
        private static int s_count = 0;
#endif 
 
        private static Dictionary s_solidColorBrushCache = new Dictionary();
#endif 
    }

#if !PBTCOMPILER
    ///  
    /// Colors - A collection of well-known Colors
    ///  
    public sealed class Colors 
    {
        #region Constructors 

        // Colors only has static members, so it shouldn't be constructable.
        private Colors()
        { 
        }
 
        #endregion Constructors 

        #region static Known Colors 

        /// 
        /// Well-known color: AliceBlue
        ///  
        public static Color AliceBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.AliceBlue); 
            }
        }

        ///  
        /// Well-known color: AntiqueWhite
        ///  
        public static Color AntiqueWhite 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.AntiqueWhite);
            }
        } 

        ///  
        /// Well-known color: Aqua 
        /// 
        public static Color Aqua 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Aqua); 
            }
        } 
 
        /// 
        /// Well-known color: Aquamarine 
        /// 
        public static Color Aquamarine
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Aquamarine); 
            } 
        }
 
        /// 
        /// Well-known color: Azure
        /// 
        public static Color Azure 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Azure);
            } 
        }

        /// 
        /// Well-known color: Beige 
        /// 
        public static Color Beige 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Beige);
            }
        }
 
        /// 
        /// Well-known color: Bisque 
        ///  
        public static Color Bisque
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Bisque);
            } 
        }
 
        ///  
        /// Well-known color: Black
        ///  
        public static Color Black
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Black);
            } 
        } 

        ///  
        /// Well-known color: BlanchedAlmond
        /// 
        public static Color BlanchedAlmond
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.BlanchedAlmond); 
            }
        } 

        /// 
        /// Well-known color: Blue
        ///  
        public static Color Blue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Blue); 
            }
        }

        ///  
        /// Well-known color: BlueViolet
        ///  
        public static Color BlueViolet 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.BlueViolet);
            }
        } 

        ///  
        /// Well-known color: Brown 
        /// 
        public static Color Brown 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Brown); 
            }
        } 
 
        /// 
        /// Well-known color: BurlyWood 
        /// 
        public static Color BurlyWood
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.BurlyWood); 
            } 
        }
 
        /// 
        /// Well-known color: CadetBlue
        /// 
        public static Color CadetBlue 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.CadetBlue);
            } 
        }

        /// 
        /// Well-known color: Chartreuse 
        /// 
        public static Color Chartreuse 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Chartreuse);
            }
        }
 
        /// 
        /// Well-known color: Chocolate 
        ///  
        public static Color Chocolate
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Chocolate);
            } 
        }
 
        ///  
        /// Well-known color: Coral
        ///  
        public static Color Coral
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Coral);
            } 
        } 

        ///  
        /// Well-known color: CornflowerBlue
        /// 
        public static Color CornflowerBlue
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.CornflowerBlue); 
            }
        } 

        /// 
        /// Well-known color: Cornsilk
        ///  
        public static Color Cornsilk
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Cornsilk); 
            }
        }

        ///  
        /// Well-known color: Crimson
        ///  
        public static Color Crimson 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Crimson);
            }
        } 

        ///  
        /// Well-known color: Cyan 
        /// 
        public static Color Cyan 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Cyan); 
            }
        } 
 
        /// 
        /// Well-known color: DarkBlue 
        /// 
        public static Color DarkBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkBlue); 
            } 
        }
 
        /// 
        /// Well-known color: DarkCyan
        /// 
        public static Color DarkCyan 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DarkCyan);
            } 
        }

        /// 
        /// Well-known color: DarkGoldenrod 
        /// 
        public static Color DarkGoldenrod 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkGoldenrod);
            }
        }
 
        /// 
        /// Well-known color: DarkGray 
        ///  
        public static Color DarkGray
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkGray);
            } 
        }
 
        ///  
        /// Well-known color: DarkGreen
        ///  
        public static Color DarkGreen
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkGreen);
            } 
        } 

        ///  
        /// Well-known color: DarkKhaki
        /// 
        public static Color DarkKhaki
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkKhaki); 
            }
        } 

        /// 
        /// Well-known color: DarkMagenta
        ///  
        public static Color DarkMagenta
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkMagenta); 
            }
        }

        ///  
        /// Well-known color: DarkOliveGreen
        ///  
        public static Color DarkOliveGreen 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkOliveGreen);
            }
        } 

        ///  
        /// Well-known color: DarkOrange 
        /// 
        public static Color DarkOrange 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkOrange); 
            }
        } 
 
        /// 
        /// Well-known color: DarkOrchid 
        /// 
        public static Color DarkOrchid
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkOrchid); 
            } 
        }
 
        /// 
        /// Well-known color: DarkRed
        /// 
        public static Color DarkRed 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DarkRed);
            } 
        }

        /// 
        /// Well-known color: DarkSalmon 
        /// 
        public static Color DarkSalmon 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSalmon);
            }
        }
 
        /// 
        /// Well-known color: DarkSeaGreen 
        ///  
        public static Color DarkSeaGreen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.DarkSeaGreen);
            } 
        }
 
        ///  
        /// Well-known color: DarkSlateBlue
        ///  
        public static Color DarkSlateBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSlateBlue);
            } 
        } 

        ///  
        /// Well-known color: DarkSlateGray
        /// 
        public static Color DarkSlateGray
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DarkSlateGray); 
            }
        } 

        /// 
        /// Well-known color: DarkTurquoise
        ///  
        public static Color DarkTurquoise
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkTurquoise); 
            }
        }

        ///  
        /// Well-known color: DarkViolet
        ///  
        public static Color DarkViolet 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DarkViolet);
            }
        } 

        ///  
        /// Well-known color: DeepPink 
        /// 
        public static Color DeepPink 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.DeepPink); 
            }
        } 
 
        /// 
        /// Well-known color: DeepSkyBlue 
        /// 
        public static Color DeepSkyBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.DeepSkyBlue); 
            } 
        }
 
        /// 
        /// Well-known color: DimGray
        /// 
        public static Color DimGray 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.DimGray);
            } 
        }

        /// 
        /// Well-known color: DodgerBlue 
        /// 
        public static Color DodgerBlue 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.DodgerBlue);
            }
        }
 
        /// 
        /// Well-known color: Firebrick 
        ///  
        public static Color Firebrick
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Firebrick);
            } 
        }
 
        ///  
        /// Well-known color: FloralWhite
        ///  
        public static Color FloralWhite
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.FloralWhite);
            } 
        } 

        ///  
        /// Well-known color: ForestGreen
        /// 
        public static Color ForestGreen
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.ForestGreen); 
            }
        } 

        /// 
        /// Well-known color: Fuchsia
        ///  
        public static Color Fuchsia
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Fuchsia); 
            }
        }

        ///  
        /// Well-known color: Gainsboro
        ///  
        public static Color Gainsboro 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Gainsboro);
            }
        } 

        ///  
        /// Well-known color: GhostWhite 
        /// 
        public static Color GhostWhite 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.GhostWhite); 
            }
        } 
 
        /// 
        /// Well-known color: Gold 
        /// 
        public static Color Gold
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Gold); 
            } 
        }
 
        /// 
        /// Well-known color: Goldenrod
        /// 
        public static Color Goldenrod 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Goldenrod);
            } 
        }

        /// 
        /// Well-known color: Gray 
        /// 
        public static Color Gray 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Gray);
            }
        }
 
        /// 
        /// Well-known color: Green 
        ///  
        public static Color Green
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Green);
            } 
        }
 
        ///  
        /// Well-known color: GreenYellow
        ///  
        public static Color GreenYellow
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.GreenYellow);
            } 
        } 

        ///  
        /// Well-known color: Honeydew
        /// 
        public static Color Honeydew
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Honeydew); 
            }
        } 

        /// 
        /// Well-known color: HotPink
        ///  
        public static Color HotPink
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.HotPink); 
            }
        }

        ///  
        /// Well-known color: IndianRed
        ///  
        public static Color IndianRed 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.IndianRed);
            }
        } 

        ///  
        /// Well-known color: Indigo 
        /// 
        public static Color Indigo 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Indigo); 
            }
        } 
 
        /// 
        /// Well-known color: Ivory 
        /// 
        public static Color Ivory
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Ivory); 
            } 
        }
 
        /// 
        /// Well-known color: Khaki
        /// 
        public static Color Khaki 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Khaki);
            } 
        }

        /// 
        /// Well-known color: Lavender 
        /// 
        public static Color Lavender 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Lavender);
            }
        }
 
        /// 
        /// Well-known color: LavenderBlush 
        ///  
        public static Color LavenderBlush
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.LavenderBlush);
            } 
        }
 
        ///  
        /// Well-known color: LawnGreen
        ///  
        public static Color LawnGreen
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LawnGreen);
            } 
        } 

        ///  
        /// Well-known color: LemonChiffon
        /// 
        public static Color LemonChiffon
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LemonChiffon); 
            }
        } 

        /// 
        /// Well-known color: LightBlue
        ///  
        public static Color LightBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightBlue); 
            }
        }

        ///  
        /// Well-known color: LightCoral
        ///  
        public static Color LightCoral 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightCoral);
            }
        } 

        ///  
        /// Well-known color: LightCyan 
        /// 
        public static Color LightCyan 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightCyan); 
            }
        } 
 
        /// 
        /// Well-known color: LightGoldenrodYellow 
        /// 
        public static Color LightGoldenrodYellow
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightGoldenrodYellow); 
            } 
        }
 
        /// 
        /// Well-known color: LightGray
        /// 
        public static Color LightGray 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.LightGray);
            } 
        }

        /// 
        /// Well-known color: LightGreen 
        /// 
        public static Color LightGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightGreen);
            }
        }
 
        /// 
        /// Well-known color: LightPink 
        ///  
        public static Color LightPink
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightPink);
            } 
        }
 
        ///  
        /// Well-known color: LightSalmon
        ///  
        public static Color LightSalmon
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightSalmon);
            } 
        } 

        ///  
        /// Well-known color: LightSeaGreen
        /// 
        public static Color LightSeaGreen
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LightSeaGreen); 
            }
        } 

        /// 
        /// Well-known color: LightSkyBlue
        ///  
        public static Color LightSkyBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightSkyBlue); 
            }
        }

        ///  
        /// Well-known color: LightSlateGray
        ///  
        public static Color LightSlateGray 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightSlateGray);
            }
        } 

        ///  
        /// Well-known color: LightSteelBlue 
        /// 
        public static Color LightSteelBlue 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.LightSteelBlue); 
            }
        } 
 
        /// 
        /// Well-known color: LightYellow 
        /// 
        public static Color LightYellow
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.LightYellow); 
            } 
        }
 
        /// 
        /// Well-known color: Lime
        /// 
        public static Color Lime 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Lime);
            } 
        }

        /// 
        /// Well-known color: LimeGreen 
        /// 
        public static Color LimeGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.LimeGreen);
            }
        }
 
        /// 
        /// Well-known color: Linen 
        ///  
        public static Color Linen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Linen);
            } 
        }
 
        ///  
        /// Well-known color: Magenta
        ///  
        public static Color Magenta
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Magenta);
            } 
        } 

        ///  
        /// Well-known color: Maroon
        /// 
        public static Color Maroon
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Maroon); 
            }
        } 

        /// 
        /// Well-known color: MediumAquamarine
        ///  
        public static Color MediumAquamarine
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumAquamarine); 
            }
        }

        ///  
        /// Well-known color: MediumBlue
        ///  
        public static Color MediumBlue 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumBlue);
            }
        } 

        ///  
        /// Well-known color: MediumOrchid 
        /// 
        public static Color MediumOrchid 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.MediumOrchid); 
            }
        } 
 
        /// 
        /// Well-known color: MediumPurple 
        /// 
        public static Color MediumPurple
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MediumPurple); 
            } 
        }
 
        /// 
        /// Well-known color: MediumSeaGreen
        /// 
        public static Color MediumSeaGreen 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.MediumSeaGreen);
            } 
        }

        /// 
        /// Well-known color: MediumSlateBlue 
        /// 
        public static Color MediumSlateBlue 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumSlateBlue);
            }
        }
 
        /// 
        /// Well-known color: MediumSpringGreen 
        ///  
        public static Color MediumSpringGreen
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.MediumSpringGreen);
            } 
        }
 
        ///  
        /// Well-known color: MediumTurquoise
        ///  
        public static Color MediumTurquoise
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumTurquoise);
            } 
        } 

        ///  
        /// Well-known color: MediumVioletRed
        /// 
        public static Color MediumVioletRed
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.MediumVioletRed); 
            }
        } 

        /// 
        /// Well-known color: MidnightBlue
        ///  
        public static Color MidnightBlue
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MidnightBlue); 
            }
        }

        ///  
        /// Well-known color: MintCream
        ///  
        public static Color MintCream 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.MintCream);
            }
        } 

        ///  
        /// Well-known color: MistyRose 
        /// 
        public static Color MistyRose 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.MistyRose); 
            }
        } 
 
        /// 
        /// Well-known color: Moccasin 
        /// 
        public static Color Moccasin
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Moccasin); 
            } 
        }
 
        /// 
        /// Well-known color: NavajoWhite
        /// 
        public static Color NavajoWhite 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.NavajoWhite);
            } 
        }

        /// 
        /// Well-known color: Navy 
        /// 
        public static Color Navy 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Navy);
            }
        }
 
        /// 
        /// Well-known color: OldLace 
        ///  
        public static Color OldLace
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.OldLace);
            } 
        }
 
        ///  
        /// Well-known color: Olive
        ///  
        public static Color Olive
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Olive);
            } 
        } 

        ///  
        /// Well-known color: OliveDrab
        /// 
        public static Color OliveDrab
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.OliveDrab); 
            }
        } 

        /// 
        /// Well-known color: Orange
        ///  
        public static Color Orange
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Orange); 
            }
        }

        ///  
        /// Well-known color: OrangeRed
        ///  
        public static Color OrangeRed 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.OrangeRed);
            }
        } 

        ///  
        /// Well-known color: Orchid 
        /// 
        public static Color Orchid 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Orchid); 
            }
        } 
 
        /// 
        /// Well-known color: PaleGoldenrod 
        /// 
        public static Color PaleGoldenrod
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.PaleGoldenrod); 
            } 
        }
 
        /// 
        /// Well-known color: PaleGreen
        /// 
        public static Color PaleGreen 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.PaleGreen);
            } 
        }

        /// 
        /// Well-known color: PaleTurquoise 
        /// 
        public static Color PaleTurquoise 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PaleTurquoise);
            }
        }
 
        /// 
        /// Well-known color: PaleVioletRed 
        ///  
        public static Color PaleVioletRed
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.PaleVioletRed);
            } 
        }
 
        ///  
        /// Well-known color: PapayaWhip
        ///  
        public static Color PapayaWhip
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PapayaWhip);
            } 
        } 

        ///  
        /// Well-known color: PeachPuff
        /// 
        public static Color PeachPuff
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.PeachPuff); 
            }
        } 

        /// 
        /// Well-known color: Peru
        ///  
        public static Color Peru
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Peru); 
            }
        }

        ///  
        /// Well-known color: Pink
        ///  
        public static Color Pink 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Pink);
            }
        } 

        ///  
        /// Well-known color: Plum 
        /// 
        public static Color Plum 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.Plum); 
            }
        } 
 
        /// 
        /// Well-known color: PowderBlue 
        /// 
        public static Color PowderBlue
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.PowderBlue); 
            } 
        }
 
        /// 
        /// Well-known color: Purple
        /// 
        public static Color Purple 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Purple);
            } 
        }

        /// 
        /// Well-known color: Red 
        /// 
        public static Color Red 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Red);
            }
        }
 
        /// 
        /// Well-known color: RosyBrown 
        ///  
        public static Color RosyBrown
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.RosyBrown);
            } 
        }
 
        ///  
        /// Well-known color: RoyalBlue
        ///  
        public static Color RoyalBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.RoyalBlue);
            } 
        } 

        ///  
        /// Well-known color: SaddleBrown
        /// 
        public static Color SaddleBrown
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SaddleBrown); 
            }
        } 

        /// 
        /// Well-known color: Salmon
        ///  
        public static Color Salmon
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Salmon); 
            }
        }

        ///  
        /// Well-known color: SandyBrown
        ///  
        public static Color SandyBrown 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SandyBrown);
            }
        } 

        ///  
        /// Well-known color: SeaGreen 
        /// 
        public static Color SeaGreen 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.SeaGreen); 
            }
        } 
 
        /// 
        /// Well-known color: SeaShell 
        /// 
        public static Color SeaShell
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SeaShell); 
            } 
        }
 
        /// 
        /// Well-known color: Sienna
        /// 
        public static Color Sienna 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Sienna);
            } 
        }

        /// 
        /// Well-known color: Silver 
        /// 
        public static Color Silver 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Silver);
            }
        }
 
        /// 
        /// Well-known color: SkyBlue 
        ///  
        public static Color SkyBlue
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.SkyBlue);
            } 
        }
 
        ///  
        /// Well-known color: SlateBlue
        ///  
        public static Color SlateBlue
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SlateBlue);
            } 
        } 

        ///  
        /// Well-known color: SlateGray
        /// 
        public static Color SlateGray
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.SlateGray); 
            }
        } 

        /// 
        /// Well-known color: Snow
        ///  
        public static Color Snow
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Snow); 
            }
        }

        ///  
        /// Well-known color: SpringGreen
        ///  
        public static Color SpringGreen 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.SpringGreen);
            }
        } 

        ///  
        /// Well-known color: SteelBlue 
        /// 
        public static Color SteelBlue 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.SteelBlue); 
            }
        } 
 
        /// 
        /// Well-known color: Tan 
        /// 
        public static Color Tan
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Tan); 
            } 
        }
 
        /// 
        /// Well-known color: Teal
        /// 
        public static Color Teal 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Teal);
            } 
        }

        /// 
        /// Well-known color: Thistle 
        /// 
        public static Color Thistle 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Thistle);
            }
        }
 
        /// 
        /// Well-known color: Tomato 
        ///  
        public static Color Tomato
        { 
            get
            {
                return Color.FromUInt32((uint)KnownColor.Tomato);
            } 
        }
 
        ///  
        /// Well-known color: Transparent
        ///  
        public static Color Transparent
        {
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Transparent);
            } 
        } 

        ///  
        /// Well-known color: Turquoise
        /// 
        public static Color Turquoise
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.Turquoise); 
            }
        } 

        /// 
        /// Well-known color: Violet
        ///  
        public static Color Violet
        { 
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Violet); 
            }
        }

        ///  
        /// Well-known color: Wheat
        ///  
        public static Color Wheat 
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.Wheat);
            }
        } 

        ///  
        /// Well-known color: White 
        /// 
        public static Color White 
        {
            get
            {
                return Color.FromUInt32((uint)KnownColor.White); 
            }
        } 
 
        /// 
        /// Well-known color: WhiteSmoke 
        /// 
        public static Color WhiteSmoke
        {
            get 
            {
                return Color.FromUInt32((uint)KnownColor.WhiteSmoke); 
            } 
        }
 
        /// 
        /// Well-known color: Yellow
        /// 
        public static Color Yellow 
        {
            get 
            { 
                return Color.FromUInt32((uint)KnownColor.Yellow);
            } 
        }

        /// 
        /// Well-known color: YellowGreen 
        /// 
        public static Color YellowGreen 
        { 
            get
            { 
                return Color.FromUInt32((uint)KnownColor.YellowGreen);
            }
        }
 
        #endregion static Known Colors
    } 
#endif 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK