Is it possible to add some value from resource file right into the XAML markup? Or for localization we always have to make something like this in *.cs file:
I understand my reply is a bit late, but I thought its worth sharing:
To use a string stored in the *.resx file without Static keyword:
xmlns:resource="clr-namespace:YourProject.Properties"In ApplicationResources(app.xaml file) Add a Resource for your *.resx file
In your XAML file use the following Binding, let us take an example of Window Title
Title="{Binding TitleString, Source={StaticResource ResourceKey=ApplicationStringResources}}"
TitleString is the name of StringProperty in your *.resx file
Last but not least, don't forget to change the resource file access modifier to Public.