2013-02-18 63 views
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工具包切換頁面,所有教程都使用該方法,但我不能。爲什麼?

回答