I'm developing a WPF Application where the user is able to change the Language at runtime. In C# Code (ViewModels etc.) I'm using the reference to the resource. For example:
string translation = ScreenResources.WorkpieceDiameter;
This is supporting Intellisense and compile time errors. In XAML Code I'm using WPF Localization Extension:
Header="{lex:LocText xxxx.ScreenResources.WorkpieceDiameter}"
The Problem now is that in XAML Code I'm using a 'magic string', so if the resource name changes or move to another resource there wont be any compile time erros. Also the effort developing without intellisense member listing increases.
Is it possible to use the resource with a static reference static like in C# Code without using the advantage of WPF Loc Extension?