Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 2.74 KB

File metadata and controls

43 lines (27 loc) · 2.74 KB
-api-id -api-type -api-device-family-note
T:Windows.ApplicationModel.DataTransfer.ShareTarget.ShareOperation
winrt class
xbox

Windows.ApplicationModel.DataTransfer.ShareTarget.ShareOperation

-description

Handles the bulk of the work during a share operation. This includes the data that the user wants to share, setting or removing QuickLinks, and informing the system about the status of the operation.

-remarks

When a user selects your app as the target of a share action, an activated event fires. The object that this event sends to your app contains the instance of the ShareOperation class.

An app currently open as a Share target cannot initiate an additional ShareOperation, or launch a FileOpenPicker or FileSavePicker.

All ShareOperation APIs should only be called after the CoreWindow for the Share target has been activated. The Share platform creates an entry for share operation only after the window has been activated.

Note

This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Version history

Windows version SDK version Value added
1709 16299 Contacts

-examples

The following example shows how to work with the ShareOperation object.

[!code-jsHowToReceiveSharedText]

-see-also

Quickstart: Sharing content , Share data, Quickstart: Receiving shared content , Receive data, Sharing content target app sample (Windows 10), Sharing content source app sample (Windows 10), App package information sample (Windows 10)