This project is read-only.

pass value to target page

Sep 4, 2013 at 2:37 AM
migkie:
Can I pass value to target page whenever navigate to it ?
Ex: navagate page to page2.xaml , I want to pass value such as "StringValue" to page2.xaml
I have same problem like migkie.
Sep 4, 2013 at 3:04 PM
Fragment navigation
The OnFragmentNavigation is called when navigation to a content fragment begins. Fragment navigation happens when you navigate to a link uri containing a fragment (use the # character).

Once IContent is implemented by your content pages, the navigation methods are automatically invoked when a page is loaded in a ModernFrame instance. The following code demonstrates a content sample that prevents navigation when the user doesn't allow it:
public class MyContent : UserControl, IContent
{
  public void OnFragmentNavigation(FragmentNavigationEventArgs e)
  {
  }
  public void OnNavigatedFrom(NavigationEventArgs e)
  {
  }
  public void OnNavigatedTo(NavigationEventArgs e)
  {
  }
  public void OnNavigatingFrom(NavigatingCancelEventArgs e)
  {
    // ask user if navigating away is ok
    if (false == ModernDialog.ShowMessage("Navigate away?, "navigate",   
      System.Windows.MessageBoxButton.YesNo)) {
                e.Cancel = true;
    }
  }
}