私は C# プログラミングの初心者で、コードに問題があります。ボタンを作成し、NavigationService テクノロジによってプロジェクトの別のページを開くイベント クリックを適用しました。
これはスクリプトです:
private void click_login(object sender, RoutedEventArgs e)
{
NavigationService nav = NavigationService.GetNavigationService(this);
nav.Navigate(new Uri("Window1.xaml", UriKind.RelativeOrAbsolute));
}
実行すると、次のエラーが発生します。
The object reference is not set to an instance of an object with an InnerException null.
助けてください。