Hi,
I'm currently working on an application using the clipboard, and since I noticed in oneNote that when you copy paste content taken from an internet browser, the url of the page is also contained in the clipboard.
I tried to implement this functionality in my windows store app,
and following the clipboard official sample I came to this:
var dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.GetContent();
if (dataPackageView.Contains(StandardDataFormats.WebLink))
{
try
{
var weblink = await dataPackageView.GetWebLinkAsync();
}
catch (Exception ex)
{
}
}
dataPackageView.Contains(StandardDataFormats.WebLink) returns false, but when I paste the same content from the clipboard in OneNote, the url is shown.
I also tried getting information from GetUriAsync, doesn't seem to work either.
Where could I get a working sample of this method ? what have I done wrong ?
Thanks For Support !
No comments:
Post a Comment