In App.xaml.cs have declared some application level variables as follows,
private string valueToPass
public string valTo
{
get
{
return valueToPass;
}
set
{
valueToPass = value;
}
}
page1.xaml.cs
App ap = (App)Application.Current;
ap.valueToPass = "YourValue";
page2.xaml.cs
App ap = (App)Application.Current;
messageBox.show(ap.valueToPass);
No comments:
Post a Comment