When trying to setup your WinRT/Metro application to share data it is possible that you will encounter the following error when you select the ‘Share’ charm
The good news is that if you get this error it means you have mostly setup your application to be able to share, meaning that you have grabbed the pointer to the DataTransferManager for the current view (we know this because if you did not do that you would get the error message below).
Screen you get when you have not enabled sharing on your current view
The bad news (well it is actually a big good given how simple it is to resolve) is that although you have gotten the pointer to the DataTranfserManager and listened to the OnDataRequested event you have failed to actually populated any data to transfer. To do this you will need to make sure you provide some test, url, file or image via the DataRequestEventArgs.DataRequest.Data object as below:
args.DataRequest.Data.SetText(“Some text here”);
If you push data in to the data request this message should go away.
Till next time,
10-23-2011 10:10 AM