Change page in WPF project in C #?

0

I'm starting to work with WPF projects in C # and I'm designing the application with blend, but I can not find a way to change the page. I have a login and when I click enter, how can I change pages in the same frame?

    
asked by Magdaleno 19.12.2018 в 19:31
source

1 answer

0

To move from one page to another you must use NavigationService

General Navigation Information

then you could do something like being

void button_Click(object sender, RoutedEventArgs e)
{
    this.NavigationService.Navigate(new Uri("AnotherPage.xaml", UriKind.Relative));
}

To navigate a frame is the same technique

WPF Navigation

Working with WPF Frame using C # and XAML

only that you apply it to the frame

Frame1.Navigate(new System.Uri("Page1.xaml", UriKind.RelativeOrAbsolute)); 
    
answered by 19.12.2018 / 20:54
source