Does XAML design mode support more color than code view?

Posted by Rahul Soni on Stack Overflow See other posts from Stack Overflow or by Rahul Soni
Published on 2010-06-15T12:43:18Z Indexed on 2010/06/15 13:12 UTC
Read the original article Hit count: 233

While working with SilverLight using Visual Studio 10, I found that in design mode XAML allows a wide plethora of colors. For ex. Lime is a valid color in XAML.

<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
  <GradientStop Color="Yellow" Offset="0" />
  <GradientStop Color="Lime"  Offset="1" />

While working with code though, I found that Lime and many other colors are missing...

GradientStop blueGS = new GradientStop(); blueGS.Color = Colors.Lime;

What am I missing? Both of these colors belong to System.Windows.Media.Colors.

© Stack Overflow or respective owner

Related posts about c#

Related posts about Silverlight