Lets your app supply the content the user wants to share or specify a message, if an error occurs.
Syntax
public ref class DataRequest sealed : Object
Attributes
- MarshalingBehaviorAttribute(Agile)
- MuseAttribute()
- VersionAttribute(NTDDI_WIN8)
Members
The DataRequest class has these types of members:
Methods
The DataRequest class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| 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. |
Properties
The DataRequest class has these properties.
| Property | Access type | Description |
|---|---|---|
| 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. |
Remarks
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.
Examples
The following code shows how to use the DataRequest object as part of setting the data on a DataPackage to share with another app.
Requirements
|
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 |
|
Namespace |
|
|
Metadata |
|
Build date: 2/25/2013