How to navigate to other page with button in WPF

后端 未结 7 1708
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 15:56

I have a second .xaml page set up under the name Page2.xaml and I want to make it so that when my button is clicked, the user is taken to <

7条回答
  •  無奈伤痛
    2021-02-05 16:19

    Use any container and bind the content to any property in your viewmodel or codebehind. After that you just have to update the property by setting a new page and call the PropertyChanged-event (see INotifyPropertyChanged interface). This will update the content of your container and you can display anything you want.

提交回复
热议问题