CoreDragOperation
CoreDragOperation
CoreDragOperation
CoreDragOperation
Class
Definition
Handles a drag and drop operation.
public : sealed class CoreDragOperation : ICoreDragOperation, ICoreDragOperation2public sealed class CoreDragOperation : ICoreDragOperation, ICoreDragOperation2Public NotInheritable Class CoreDragOperation Implements ICoreDragOperation, ICoreDragOperation2// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
CoreDragOperation() CoreDragOperation() CoreDragOperation() CoreDragOperation()
Initializes a new instance of the CoreDragOperation class.
public : CoreDragOperation()public CoreDragOperation()Public Sub New()// This API is not available in Javascript.
Properties
AllowedOperations AllowedOperations AllowedOperations AllowedOperations
Gets or sets the allowed DataPackageOperations (none, move, copy, and/or link) for the drag and drop operation.
public : DataPackageOperation AllowedOperations { get; set; }public DataPackageOperation AllowedOperations { get; set; }Public ReadWrite Property AllowedOperations As DataPackageOperation// This API is not available in Javascript.
The allowed operations. The default is Copy | Move | Link.
| Device family |
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Remarks
Use this property to set the complete set of operations the source app wishes to allow in drag and drop scenarios. You can specify zero or more flags. To set a desired default operation, use the DataPackage.RequestedOperation property.
Users can override this choices by using SHIFT and CTRL keys. In this case, the target app must inspect the key state to determine the operation the user selected.
Data Data Data Data
Gets the DataPackage for the drag and drop operation.
public : DataPackage Data { get; }public DataPackage Data { get; }Public ReadOnly Property Data As DataPackage// This API is not available in Javascript.
The DataPackage for the drag and drop operation
DragUIContentMode DragUIContentMode DragUIContentMode DragUIContentMode
Gets or sets the content mode for the drag UI.
public : CoreDragUIContentMode DragUIContentMode { get; set; }public CoreDragUIContentMode DragUIContentMode { get; set; }Public ReadWrite Property DragUIContentMode As CoreDragUIContentMode// This API is not available in Javascript.
The content mode for the drag UI.
Methods
SetDragUIContentFromSoftwareBitmap(SoftwareBitmap) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap)
Sets custom drag UI content using a software bitmap.
public : void SetDragUIContentFromSoftwareBitmap(SoftwareBitmap softwareBitmap)public void SetDragUIContentFromSoftwareBitmap(SoftwareBitmap softwareBitmap)Public Function SetDragUIContentFromSoftwareBitmap(softwareBitmap As SoftwareBitmap) As void// This API is not available in Javascript.
- softwareBitmap
- SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap
The custom UI drag content.
- See Also
SetDragUIContentFromSoftwareBitmap(SoftwareBitmap, Point) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap, Point) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap, Point) SetDragUIContentFromSoftwareBitmap(SoftwareBitmap, Point)
Sets custom drag UI content using a software bitmap.
public : void SetDragUIContentFromSoftwareBitmap(SoftwareBitmap softwareBitmap, Point anchorPoint)public void SetDragUIContentFromSoftwareBitmap(SoftwareBitmap softwareBitmap, Point anchorPoint)Public Function SetDragUIContentFromSoftwareBitmap(softwareBitmap As SoftwareBitmap, anchorPoint As Point) As void// This API is not available in Javascript.
- softwareBitmap
- SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap
The custom UI drag content.
The relative position of the drag visual from the pointer. The anchor point cannot be outside of the content. For example, if the anchor point is (50, 50) and the position of the pointer is (x, y), the top left corner for the visual will be (x - 50, y - 50).
- See Also
SetPointerId(UInt32) SetPointerId(UInt32) SetPointerId(UInt32) SetPointerId(UInt32)
Sets the pointer Id.
public : void SetPointerId(unsigned int pointerId)public void SetPointerId(UInt32 pointerId)Public Function SetPointerId(pointerId As UInt32) As void// This API is not available in Javascript.
- pointerId
- unsigned int UInt32 UInt32 UInt32
The pointer Id.
StartAsync() StartAsync() StartAsync() StartAsync()
Starts the drag and drop operation.
public : IAsyncOperation<DataPackageOperation> StartAsync()public IAsyncOperation<DataPackageOperation> StartAsync()Public Function StartAsync() As IAsyncOperation( Of DataPackageOperation )// This API is not available in Javascript.