I am attempting to create a Syles.xaml file for my test Silverlight app. Here is what I have in the App.xaml file:
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
x:Class="MVCSilverlight.App"
>
<Application.Resources>
<Style x:Key="NavigationContainerStyle" TargetType="StackPanel">
<Setter Property="Background" Value="Black" />
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Height" Value="50" />
<Setter Property="Width" Value="500" />
</Style>
</Application.Resources>
</Application>
The problem is that when I include this in the app, VS2010 does not recognize it AND when I run the application, it does not display because there are errors with attempting to find that resource name/value. Here is an example of how it is being used:
<StackPanel Style="{StaticResource NavigationContainerStyle}">
</StackPanel>
I also attempting to put the styles in a file and include it in the app.xaml but that didnt work either.
Can someone give me some ideas as to why this is happening?