Click here to Skip to main content
15,881,690 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
hello
iam practice the silverlight examples

so in my application have a grid having stles so this styles is (Assets/Styles.xaml)
there

in codebehind iam wrote like this

C#
ResourceDictionary r = new ResourceDictionary();
r.Source = new Uri("/Assets/Styles.xaml", UriKind.Relative);
Style s = (Style)r["BigGridStyle"];
PageContainer.Style = s;


in styles.xaml page wrote like this
XML
<Style x:Key="BigGridStyle" TargetType="Grid">
           <Setter Property="Background">
               <Setter.Value>
                   <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                       <GradientStop Color="Blue"></GradientStop>
                       <GradientStop Color="Yellow" Offset="1"></GradientStop>
                   </LinearGradientBrush>
               </Setter.Value>
           </Setter>
       </Style>

in xaml page binding staticresource like this
<Grid x:Name="PageContainer" Margin="47,224,49,207" Style="{StaticResource BigGridStyle}"   />

but it's not working for me it's giving error
like this
Error:
SQL
[Arg_COMException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.60401.00&File=mscorlib.dll&Key=Arg_COMException




So can you any one tell me where i wrong?

Thanks & Advance
Posted
Updated 24-Apr-12 20:34pm
v3

1 solution

The XAML looks fine. Have you installed the Silverlight Developer Runtime?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900