Can't find my styles in silverlight 5

I have several styles in my silverlight project in a file called "Styles.xaml", as shown here: enter image description here

But when I try to use it in my views, I get this error message: enter image description here

So, I went to the "Properties" window and noticed that the visual studio does not recognize my styles: enter image description here

My style code:

<Style x:Key="RemoveDialogButtonStyle" TargetType="Button" BasedOn="{StaticResource BotaoBasicoCsla}"> <Setter Property="Content" Value="Remover" /> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="17"/> <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> <Image Source="/Prolex.Net.Protesto;component/Images/Remove.png" HorizontalAlignment="Left" Grid.Column="0" /> <ContentPresenter Content="{Binding}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1"/> </Grid> </DataTemplate> </Setter.Value> </Setter> </Style> 

Any idea why I can't use it as a StaticResource?

+1
silverlight xaml
source share
1 answer

Is Styles.xaml a reference in App.xaml?

 <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Assets/Styles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> 
0
source share

All Articles