Windows Phone 8 I Can't add c++ Template to project

故事扮演 提交于 2019-12-08 09:46:06

问题


Let's describe my problem:

I've created a Windows 8 App already, its written in c++/cli and xaml. Now I want to get this App to Windows Phone 8. So my first step is creating a new project:

Then I want to add a new element based on a c++ template but VS just shows me c# templates:

You remember? I created a project based on C++! How can I add new elements based on c++ template like I do in normal Windows 8 SDK?:

Do I have to download those templates somewhere? Is there any other way to get my Xaml pages based on c++ from windows 8 project to windows phone 8 project?


回答1:


Windows Phone 8 doesn't support writing C++/XAML applications, only C++/D3D ones. That's why there are no C++/XAML templates. You can mix XAML and D3D but you'd need to write the XAML UI layer in C# or VB.

See Native code on Windows Phone 8 topic on MSDN for more details. To quote:

Windows Phone 8 doesn’t support the XAML UI with C++ code-behind app model that is supported for Windows Store apps.



来源:https://stackoverflow.com/questions/13719707/windows-phone-8-i-cant-add-c-template-to-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!