-api-id | -api-type | -api-device-family-note |
---|---|---|
E:Windows.ApplicationModel.DataTransfer.DataTransferManager.DataRequested |
winrt event |
xbox |
Occurs when a share operation starts.
This event is fired when your app starts a share operation programmatically. To handle this event, you need to add an event listener to the DataTransferManager object for the active window. You can get this object through the GetForCurrentView method.
When handling a datarequested event, the most important property you need to be aware of is its request property. This property contains a DataRequest object. Your app uses this object to provide the data that the user wants to share with a selected target app.
This example uses an inline function to handle a datarequested event.
[!code-csharpHowToShareTextBasic]