Why if I put this into a xaml dictionary used under Silverlight the compiler founds an error.
<Color x:Key="colorBackDark" A="255" R="150" G="170" B="190" />
In WPF XAML everything is OK.
BTW the error is present no matter of the silverlight version used.
It looks like that is some kind of parser error.
I assume the error you’re getting is something like the following:
The XAML parser in Silverlight only knows how to handle
doubles,ints andbools. The propertiesA,R,GandBin theColorstruct are allbytes, which the Silverlight XAML parser doesn’t know how to handle. The XAML parser in WPF, on the other hand, does know how to handle these values, so that’s why you’re not getting an error in WPF.The MSDN documentation for the
Colorstruct lists a number of ways to create aColorvalue in XAML in Silverlight.A similar question was asked a while ago about why
floats can’t be used in XAML in Silverlight either.