1
votes

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. enter image description here

what can i do for removing this error or what is the way to use resx text.

thanks

1
Check out my WPF Localization project: globalizer.codeplex.com - Rhyous

1 Answers

1
votes

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/