locked
static resource in caption's label RRS feed

  • Question

  •  

    Hi. I´m doing a language convertion using staticResources. I´t works fine, but in design time it thow an exception (NullReferenceException)
     
     <sdk:Label Content="{Binding Path = ApplicationStrings.Symbol, Source={StaticResource ResourceWrapper}}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />

     

    What's wrong?

     

     

    thanks in advance

    Monday, September 20, 2010 3:26 PM

Answers

  • Hi Sepilrat,

    It appears that an object in the class referenced as 'ResourceWrapper' is not initialised at run time. I'd put in some null reference checks in that class and return some default data in the case that something that you're expecting to be valid isn't at design time (e.g. language resources haven't been loaded).

    Regards,
    Rob

    Wednesday, September 22, 2010 4:53 AM

All replies

  • Hi Sepilrat,

    It appears that an object in the class referenced as 'ResourceWrapper' is not initialised at run time. I'd put in some null reference checks in that class and return some default data in the case that something that you're expecting to be valid isn't at design time (e.g. language resources haven't been loaded).

    Regards,
    Rob

    Wednesday, September 22, 2010 4:53 AM
  • Wasn't well formed the app.xaml

     

    Thanks 

    Wednesday, September 22, 2010 9:36 AM