0
在NavigationService.Navigate Method (Uri)文檔是這樣的代碼片段:不能使用this.NavigationService
void goButton_Click(object sender, RoutedEventArgs e)
{
this.NavigationService.Navigate(new Uri(this.addressTextBox.Text));
}
但this.NavigationService
是不是在我Window
類可用,我想將它命名。基本上我想使用MVVM-Light工具包切換頁面,所有教程都使用該方法,但我不能。爲什麼?