I have a page in Silverlight that is navigating from MainPage.xaml called OpenPage.xaml. Then I want to pass the value back to MainPage.xaml - this OpenPage.xaml is called using this:
NavigationService.Navigate(new Uri("/OpenPage.xaml", UriKind.Relative));
From the main page - this is not the MainPage child, as RootVisual is replaced - I can call it:
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
To return to MainPage - however, I need to pass the value from OpenPage.xaml to MainPage.xaml - how do I access the MainPage instance - I have a property called Document, but when I do this:
MainPage m = (MainPage)Application.Current.RootVisual;
m.Document = "Hello World";
Or that:
((MainPage)root).Document = "Hello World";
, , OpenPage.xaml MainPage.xaml - NavigatedTo, MainPage.xaml OpenPage.xaml. < > MainPage.xaml SavePage.xaml - - ?