我有共享内容(链接)使用魅力的问题。 我有app,它有链接,我想要分享链接。 方法不起作用。 两种方法(基于MSDN)
private void ShareContent(object sender, RoutedEventArgs e)
{
DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();
dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager,
DataRequestedEventArgs>(this.ShareLinkHandler);
}
private void ShareLinkHandler(DataTransferManager sender, DataRequestedEventArgs e)
{
DataRequest request = e.Request;
request.Data.Properties.Title = "Share Link Example";
request.Data.Properties.Description = "Demonstrates how to add a link (URI) to share.";
request.Data.SetUri(new Uri("http://www.example.com"));
}