async void dataTransferManager_DataRequested(DataTransferManager sender, DataRequestedEventArgs args) { DataRequest request = args.Request; //We are going to use an async API to talk to the webview, so get a deferral for the results DataRequestDeferral deferral = args.Request.GetDeferral(); DataPackage dp = await Web.CaptureSelectedContentToDataPackageAsync(); if (dp != null && dp.GetView().AvailableFormats.Count > 0) { // Webview has a selection, so we'll share its data package dp.Properties.Title = "This is the selection from the webview control"; request.Data = dp; } else { // No selection, so we'll share the url of the webview DataPackage myData = new DataPackage(); myData.SetWebLink(Web.Source); myData.Properties.Title = "This is the URI from the webview control"; myData.Properties.Description = Web.Source.ToString(); request.Data = myData; } deferral.Complete(); }