Windows Phone 8我无法将c ++模板添加到项目 [英] Windows Phone 8 I Can't add c++ Template to project

查看:157
本文介绍了Windows Phone 8我无法将c ++模板添加到项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们来描述我的问题:

Let's describe my problem:

我已经创建了一个Windows 8应用程序,它用c ++ / cli和xaml编写。
现在我想把这个应用程序给Windows Phone 8.
所以我的第一步是创建一个新项目:

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:

然后我想添加一个新的元素基于一个c ++模板,但VS只是显示我c#模板:

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

你还记得吗?我创建了一个基于C ++的项目!
如何在正常的Windows 8 SDK中添加基于c ++模板的新元素:

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?:

我必须下载这些模板吗?有没有其他方法来获取我的XAML页面基于c ++从Windows 8项目到Windows Phone 8项目?

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?

推荐答案

Windows Phone 8不支持写C ++ / XAML应用程序,只支持C ++ / D3D。这就是为什么没有C ++ / XAML模板。您可以混合使用XAML和D3D,但您需要在C#或VB中编写XAML UI层。

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.

请参阅 Windows Phone 8上的本机代码在MSDN上更多详细信息。引用:

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


Windows Phone 8不支持Windows应用商店应用支持的带有C ++代码隐藏应用程序模型的XAML UI。

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

这篇关于Windows Phone 8我无法将c ++模板添加到项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆