3

我正在尝试将页面导航到功能区窗口,但出现此错误:

'WpfRibbonApplication1.MainWindow' 根元素对导航无效'

我在页面中的导航代码是:

private void button1_Click(object sender, RoutedEventArgs e)
{
    NavigationService nav = NavigationService.GetNavigationService(this);
    nav.Navigate(new System.Uri("MainWindow.xaml", UriKind.RelativeOrAbsolute));
}

有人帮忙吗?

4

0 回答 0