将空白页添加到新的C ++ / WinRT Desktop项目中时,无效的标记错误

时间:2019-10-24 01:22:58

标签: visual-studio xaml uwp c++-winrt

我正在使用最新版本的Visual Studio2019。为此,我创建了一个新的C ++ / WinRT Desktop Application项目:

enter image description here

您已经使用过此模板的人也会熟悉此初始源代码层次结构:

enter image description here

我想为我的UI添加一个新的XAML文件,所以我尝试添加一个空白页:

enter image description here

enter image description here

但是,我收到Invalid Markup错误,说我不能在WPF项目中使用内置XAML设计器,尽管我不知道在这里使用WPF:

enter image description here

如何解决错误并使Visual Studio显示XAML布局并将UI添加到项目中?如果我进行C ++ / WinRT 空白应用项目,则预包含的XAML在设计器上效果很好。如何使其在C ++ / WinRT Desktop Application项目上工作?

0 个答案:

没有答案