Apparently this is a known bug, but I didn't come across a solution until I finally stumbled across an old post by Tim Heuer (always worth reading). It turns out, that the very simple solution is to set the Language property of the page. I had never noticed this property before, and I wouldn't have expected it to be required!
All that you need to do is set the property in the constructor of the page. To make it even easier, you can create a base page object (if you don't have one already) and set the property there.
this.Language = XmlLanguage.GetLanguage( Thread.CurrentThread.CurrentCulture.Name);
Source: http://timheuer.com/blog/archive/2010/08/11/stringformat-and-currentculture-in-silverlight.aspx
No comments:
Post a Comment