Blog: 2013 January

WinRT: Access string resources in a stongly typed way (C#)

January 21, 2013, (updated on January 30, 2015), 1 comment, Software Development

In WinRT/C# projects the .resx resource file is not available anymore. The new resource type is .resw which is directly supported by the XAML framework. The drawback of this new file format is that it does not automatically generate a code-behind C# class with a property for each key-value resource pair. The problem is that it is not possible to access these strings in a strongly typed manner. The only way to load resource strings is to load them by specifying the resource key as a string. The problem with this solution is that typing errors are not detected by […] Read more...

Tags: , ,

  Page 1 of 1