Lets your app supply the content the user wants to share or specify a message, if an error occurs.
The DataRequest class has these types of members:
The DataRequest class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
|FailWithDisplayText||Cancels the sharing operation and supplies an error string to display to the user.|
|GetDeferral||Supports asynchronous sharing operations by creating and returning a DataRequestDeferral object.|
The DataRequest class has these properties.
|Read/write||Sets or gets a DataPackage object that contains the content a user wants to share.|
|Read-only||Gets the deadline for finishing a delayed rendering operation. If execution goes beyond that deadline, the results of delayed rendering are ignored.|
Your app receives a DataRequest object when a datarequested event occurs. With this object, your app can supply data to a target app by using a DataPackage object, use a deferral object to call a function, or inform the target app that an error occurred.
The following code shows how to use the DataRequest object as part of setting the data on a DataPackage to share with another app.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Minimum supported phone
|Windows Phone 8|