Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.4 KB

datatransfermanager_datarequested.md

File metadata and controls

30 lines (18 loc) · 1.4 KB
-api-id -api-type -api-device-family-note
E:Windows.ApplicationModel.DataTransfer.DataTransferManager.DataRequested
winrt event
xbox

Windows.ApplicationModel.DataTransfer.DataTransferManager.DataRequested

-description

Occurs when a share operation starts.

-remarks

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.

-examples

This example uses an inline function to handle a datarequested event.

[!code-csharpHowToShareTextBasic]

-see-also