1

When defining a color resource in a Silverlight app using the syntax A="" R="" G="" B="" (any order of parameters) an exception is caused, even though the application will compile fine and display properly in Blend.

Example:

<UserControl.Resources>
   <Color x:Key="BlackBG" A="255" R="35" G="35" B="35"/>
</UserControl.Resources>

The error reported if using an HTML Object tag to display the Silverlight control will be

Unhandled Error in Silverlight 2 Application Code: 2103
Category: InitializeError
Message: Invalid or malformed application: Check manifest

4

1 に答える 1

6

A="" R="" G="" B="" 構文を使用する代わりに、たとえば

<Color x:Key="BlackBG" A="255" R="35" G="35" B="35"/>

別の構文を使用する

<Color x:Key="BlackBG">#FF252525</Color>
于 2009-06-11T15:01:38.750 に答える