Exemplo n.º 1
0
        private static void ChangeCulture(string cultureName)
        {
            ResourceDictionary dict = new ResourceDictionary();

            dict.Source = new Uri($"Styles/Style.{cultureName}.xaml", UriKind.Relative);
            if (Application.Current.Resources.MergedDictionaries.Count > 2)
            {
                Application.Current.Resources.MergedDictionaries.RemoveAt(2);
            }
            Application.Current.Resources.MergedDictionaries.Add(dict);
            Initialize();
            GlobalMethord.UpdateCulture();
        }