【发布时间】:2018-06-17 18:47:18
【问题描述】:
我正在 Visual Studio 2017 中创建一个应用程序。我有两个 .xaml 页面,我想在单击按钮时在两者之间进行切换。到目前为止,我的代码是:
private void bakingButton(object sender, RoutedEventArgs e)
{
CookingMenu cooking = new CookingMenu();
cooking.show();
}
我所在的页面名为 BakingMenu.xaml,我想转到 CookingMenu.xaml。但是,这会给出错误消息:The type or namespace name 'CookingMenu' could not be found (are you missing a using directive or an assembly reference?)
我是否需要在代码中的其他地方引用其他文件,还是我遗漏了其他内容?
【问题讨论】:
标签: c# visual-studio xaml visual-studio-2017