Reputation: 1975
in my wpf project i try add resx file but getting error
i add to window this code: xmlns:Resources="clr-namespace:Swipper.Resources"
and on the content i add
Content="{x:Static MemberType= Resources:App, Member=Blue}"
this is work and the application complied, but on visual studio i getting this error.
what can i do for removing this error or what is the way to use resx text.
thanks
Upvotes: 1
Views: 3637
Reputation: 2944
In the resources designer in Visual Studio, set the access modifier to public. Also, use the XAML editor's intellisense feature to locate the correct type an members, your parameters seem to be faulty.
For other ways of accessing localized resources in WPF, you might want to read http://wpfglue.wordpress.com/category/localization/
Upvotes: 1