locked
Is there a way to navigate frame on Button click ? RRS feed

  • Question

  • Is there a way to navigate frame on Button click ? Something like this:

    private void Button1_click(object sender, System.Windows.RoutedEventArgs e)
    {
    // TODO: Add event handler implementation here.
    // Frame1 is the frame name.

    Frame1.Source = ("/news.xaml");
    }

    NB: Without using HyperlinkButton. 

    ~Thanks!

    Sunday, November 22, 2009 8:31 AM

Answers

  • Okay, found it out:

    private void Button1_click(object sender, System.Windows.RoutedEventArgs e)
    {
    // TODO: Add event handler implementation here.
    // Frame1 is the frame name.

    this.Frame1.Navigate( new Uri( "/about.xaml", UriKind.Relative ) );
    }

    Sunday, November 22, 2009 8:56 AM