1

i have. view and viewmodel in same project.i was opennig a new page on button click on code behind like this

private void button_click(object sender, routedeventargs e)
{
    var dashboardwindow = new dashboard();
    this.navigationservice.navigate(new uri("../view/dashboard.xaml", urikind.relative));
}

now i have added user authentication on this buton click using MVVM.so how can i open this page from view model.?

if i used window instead of page then i can open new window simply like this

 Dashboard dl = new Dashboard();
            dl.Show();

thats workd.but i have taken pages because i need bowser type navigation in my application so.. please help .Thanks

H.B.
  • 166,899
  • 29
  • 327
  • 400
Neelam Prajapati
  • 3,764
  • 3
  • 28
  • 62

0 Answers0