Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a SettingsCommand in my C#/XAML Windows 8 app. It works perfectly. However, one of the options I provide is to allow the user to reset all of their data in the app. This also works perfectly.

However, the actual XAML page that was being viewed when the user opened the settings charm needs to refresh itself. Is there a way to make a call to the page that is currently open? Or get a reference to it? Or pass a reference of the page to the SettingsCommand?

Or even have the page recognize that the charms bar has been opened? Like a "focused"/"unfocused" kind of event?

Or, would it be possible to just navigate to a specific page of my app FROM the SettingsCommand UserControl?
Posted

1 solution

Turns out I just needed to get a reference to Window.Current.Content.

Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900