Change culture of Silverlight application

梦想的初衷 提交于 2019-12-04 08:02:38

Adding the following line to the constructor of my form fixed this issue:

this.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);

From http://timheuer.com/blog/archive/2010/08/11/stringformat-and-currentculture-in-silverlight.aspx

Quango

Setting the value from code kind of goes against the MVVM and dependency property approach: you might want to see this SO article: How to switch UI Culture of data binding on the fly in Silverlight

In the Converter use the below code

CultureInfo ci = new CultureInfo("en-GB");
return value.ToString(ci);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!