本文介绍了Windows 8应用程序共享超级按钮挂在“从{AppName}获取信息"上,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
dataTransferManager.addEventListener("datarequested", function (e) {
  var request = e.request;
  request.data.properties.title = "Share Link Example";
  request.data.properties.description = "A demonstration that shows how to add a link (URI) to share.";
  request.data.setUri(new Windows.Foundation.Uri("http://www.google.com"));
});

由于某种原因,如果我单击共享"超级按钮,它将挂在从GodVine获取信息"(GodVine是我的应用程序的名称)上.它曾经可以工作,然后突然停止工作.我在做错什么吗?

For some reason, if I click on the Share charm, it just hangs on "Getting info from GodVine" (GodVine is the name of my app). It used to work, then all the sudden stopped working. Am I doing something wrong?

推荐答案

我怀疑您在 datarequested 处理程序内部的断点处停止了调试会话.如果您在 datarequested 处理程序中停止调试会话,则会出现一个错误,该错误会破坏Share Broker.重置任务的最简单"方法是使用任务管理器停止并重新启动explorer.exe.

I suspect you stopped a debug session while on a breakpoint inside the datarequested handler. If you stop a debug session inside of the datarequested handler, there is a bug that breaks the Share Broker. The "easiest" way to reset thing is use Task Manager to stop and restart explorer.exe.

这篇关于Windows 8应用程序共享超级按钮挂在“从{AppName}获取信息"上,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 16:51