Derik Whittaker

Syndication

News


WinRT/Metro–Problem with the data from <Application Name> error

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

image

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
image

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”);

args.DataRequest.Data.SetBitMap(ImageHere);

args.DataRequest.Data.SetUri(“url here”);

If you push data in to the data request this message should go away.

Till next time,


Posted 10-23-2011 10:10 AM by Derik Whittaker
Filed under: ,

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)