DataTransferManager.GetForCurrentView | getForCurrentView method

Applies to Windows and Windows Phone

Returns the DataTransferManager object associated with the current window.

Syntax


public:
static DataTransferManager^ GetForCurrentView()

Parameters

This method has no parameters.

Return value

Type: DataTransferManager

The DataTransferManager object associated with the current window.

Remarks

Each window has a DataTransferManager object associated with it. When sharing content, you use the GetForCurrentView method to get the DataTransferManager object that is associated with the active window. After you have the appropriate DataTransferManager object, you can add an event listener to it to handle the DataRequested event, which the system fires when a share operation is initiated. Your app uses the DataRequest object returned with this event to set the data that the user wants to share with a target app.

Examples

This example calls the GetForCurrentView method to get the DataTransferManager object associated with the active window for the app.

No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.winmd

See also

DataTransferManager

 

 

Show:
© 2014 Microsoft