private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-GB");
var root = RootVisual as MainPage;
if (root != null)
{
root.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);
}
}
This is in the App.xaml code behind file.
Note that annoyingly, this will not work in WPF.
No comments:
Post a Comment