Q:

Silverlight resource constructor always return to internal

When I modify my resource file (.resx) add text or modify, the constructor of my resource always go to internal and after that, when I run my silverlight I have an error in my binding XAML.
Is there a way to avoid this scenario? I need to go in the designer of my resource and put the constructor to public to solve the problem
I use my resource like this in my xaml file
 <UserControl.Resources>
        <resources:LibraryItemDetailsView x:Key="LibraryItemDetailsViewResources"></resources:LibraryItemDetailsView>
    </UserControl.Resources>

<TextBlock FontSize="12" FontWeight="Bold" Text="{Binding Path=FileSelectedText3, Source={StaticResource LibraryItemDetailsViewResources}}"></TextBlock>

A:

Another way to do this without code changes is as below. Worked well for me.
http://guysmithferrier.com/post/2010/09/PublicResourceCodeGenerator-now-works-with-Visual-Studio-2010.aspx

A:

You can create a public class that exposes the resources through a property:
public class StringsWrapper
{
    private static LibraryItemDetailsView _view = null;

    public LibraryItemDetailsView View
    {
        get
        {
            if (_view == null)
            {
                _view = new LibraryItemDetailsView();
            }
            return _view;
        }
    }
}

Then in your XAML you can access your resource:
<UserControl.Resources>
    <StringsWrapper x:Key="LibraryItemDetailsViewResources"></StringsWrapper>
</UserControl.Resources>

<TextBlock FontSize="12" FontWeight="Bold" Text="{Binding Path=View.FileSelectedText3, Source={StaticResource LibraryItemDetailsViewResources}}"></TextBlock>

This way the resx constructor can be internal!

