天马行空  
I ---- Inject 投入 L ---- Loyal 忠诚 O ---- Observant 用心 V ---- Valiant 勇敢 E ---- Enjoyment 喜悦 Y ---- Yes 愿意 O ---- Obligation 责任

>>"for example i will change application language  in settings.xaml so i want to restart appication or go to App.cs constructor again without exit ?"

If your app is Universal Windows Phone 8.1 runtime app, because the pages and controls that are already rendered are cached, we can use ResourceContext.Reset methods to update text of all custom controls at runtime without restarting the app. For example:

var NewLanguage = (string)((ComboBoxItem)e.AddedItems[0]).Tag;
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = NewLanguage;
Windows.ApplicationModel.Resources.Core.ResourceContext.GetForViewIndependentUse().Reset();
Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().Reset();

 

After that, reload your Page, using Navigate method:

if (Frame != null)
    Frame.Navigate(typeof(MyPage));
posted on 2016-06-10 13:26  浅蓝  阅读(395)  评论(0编辑  收藏  举报