DataPackage.RequestedOperation | requestedOperation property

Applies to Windows and Windows Phone

Specifies the DataPackageOperation (none, move, copy, and/or link) for the operation.

Syntax


var requestedOperation = dataPackage.requestedOperation;
dataPackage.requestedOperation = requestedOperation;

Property value

Type: DataPackageOperation

The operation requested by the source app.

Remarks

This property specifies the operation(s) that the system takes for a clipboard-related task. The supported options are specified in the DataPackageOperation enumeration.

This property can specify zero or more flags. If more than one operation flag is specified, the recipient of the data package can choose which available operation to perform. When reporting or inspecting the result of an operation, at most one operation flag can be specified.

You do not need this property for sharing operations.

Examples


// find out what the requested operation is
var operation = dataPackage.requestedOperation;

// Request a copy operation from targets that support different file operations, like Windows Explorer
dataPackage.requestedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.copy;

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

DataPackage

 

 

Show:
© 2014 Microsoft