Go to first page in C# WPF

后端 未结 3 1164
迷失自我
迷失自我 2020-12-20 22:35

I am using navigation services in WPF. For navigating to page I use:

this.NavigationService.Navigate(new MyPage());

For going back I use:

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-20 23:19

    One way could be to use method RemoveBackEntry until there is only a single entry left in the back stack of navigation service. Once there is only a single entry simple do Navigation.GoBack()

提交回复
热议问题