Can it be a replacement for x:Uid?

Jan 18, 2013 at 9:46 PM


Is there a way to use the generated classes as a replacement for x:Uid?

Personally I have the feeling that x:Uid is easy to use, but you will be careful of spelling, not to talk about renaming the resource keys.

Do you use the generated strongly typed classes for binding, or how do you translate the texts in the forms?


Jan 18, 2013 at 10:17 PM

Hi Jörg,


I only use the strongly typed generated classes in code, mostly for notifying the user.

All localized resources in XAML I use the x:Uid. I guess there are ways of using the strongly typed generated class for binding but I don't see the point, it involves much more work than just using x:Uid


Best Regards,


May 27, 2013 at 8:06 AM
Yes, you can use the generated code behind files for localizing your app. Actually using the code behind classes is the default way how to localize the Windows Phone apps as well, see this guide:
Plus it's also safer because you use strongly typed properties instead of plain strings for gathering your localized strings:
AppResources.AppTitle instead of resourceLoader.GetString("AppTitle")