共享目标C ++应用程序不会关闭 [英] Share Target C++ app does not close
问题描述
我创建了一个C ++共享目标应用程序但是当它运行时无法关闭它。当我点击共享魅力并选择我的应用程序时,会出现但顶部箭头 用来隐藏应用程序消失。我还没有向XAML
页面添加任何其他代码。它似乎只是在C ++应用程序中的问题,我在C#中创建的类似应用程序工作正常。你可以告诉我我缺少的东西。
这是我遵循的步骤。
1)创建一个新的Metro C ++应用程序
2)在AppPackage中,我添加了Uri格式的Share目标。
3)为sharepage创建了一个新的XAML页面并添加了文本
4)在App中添加了以下功能
void App :: OnSharingTargetActivated(Windows :: ApplicationModel :: Activation :: ShareTargetActivatedEventArgs ^ args)
{
Window :: Current-> Content = ref new BlankPage();
Window :: Current-> Activate();
}
现在,当我与IE共享一个Uri,然后从应用列表中单击我的应用时,我看到了这个问题。
< blockquote> XAML设计有问题吗?试着用这个
http://code.msdn.microsoft.com / windowsapps /共享-内容目标应用内-e2689782 功能。设计
I have created a C++ share target application but when it runs there is no way to close it. When I click on Share charm and choose my app, it appears but the top arrow used to hide the app disappears. I have not added any additional code to the XAML page either. It seems like a issue only in C++ app, similar app that i created in C# works fine though. Can you please let me know what I am missing.
These are steps i followed.
1) Create a new Metro C++ app
2) In AppPackage, I have added Share target with Uri format.
3) Created a new XAML page for sharepage and added a text
4) Added the below function in App
void App::OnSharingTargetActivated(Windows::ApplicationModel::Activation::ShareTargetActivatedEventArgs^ args)
{
Window::Current->Content = ref new BlankPage();
Window::Current->Activate();
}
Now when i share a Uri with IE and then click my app from the list of apps, I see this issue.
Is the XAML design problem? try to use this http://code.msdn.microsoft.com/windowsapps/Sharing-Content-Target-App-e2689782 design.
这篇关于共享目标C ++应用程序不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!