1) C# is a case-sensitive language, so if you would write
using system.windows.navigation
It won't work, you have to use
System.Windows.Navigation
[
^] namespace for your project. Just make sure you are referencing the DLL also, Double-click on References and see what DLLs are present.
2) I would like to have the data stored in the
App
context so that both of the pages can work around with the data that was passed.
public static object Data { get; set; }
Which can then be altered as,
App.Data = "String data";
rootFrame.Navigate(typeof(Page2));
var data = (string)App.Data;
This way you will be able to pass the data from one page to another, but also maintains the data in the Application context.
3) MessageBox doesn't exist in Metro applications. You get to preview the message as a dialog. A message dialog in Metro application is
MessageDialog
[
^] object.
new MessageDialog("Message to show").ShowAsync();
Note that these are asynchronous models, you would have to apply an
await
with them.