c# - Does XAML design mode support more color than code view? -


Working with SilverLight using Visual Studio 10, I found that XAML has a wide variety of colors in design mode. Allows Lime for XAML has a valid color in XAML.

& lt; LinearGradientBrush EndPoint = "1.0.5" StartPoint = "0,0.5" & gt; & Lt; GradientStop color = "yellow" offset = "0" /> & Lt; GradientStop color = "lime" offset = "1" /> While working with code, I found that lemons and many other colors are unavailable ...
  GradientStop blueGS = new gradient (;); BlueGS.Color = Colors.Lime;  

What am I missing? System in both colors Windows Media Are colter.

from Use XAML for colors from the system.
You managed this in XML You can not instantaneously trigger the object, but you can use it static. To provide property values ​​in XAML, there are additional designated colors that can be specified in XAML, but the static asset values ​​of these colors are not supported .

Therefore, for whatever reason, it looks like you are effectively correct; You can refer to more "designated" colors in Code ebihand.

In addition, you can always use the method in your code:

  color lime = Color.FromArgb (0xFF, 0x00, 0xFF, 0x00);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -