CoreDragDropManager Class

Definition

Manages access for drag and drop within and between apps.

public ref class CoreDragDropManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CoreDragDropManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CoreDragDropManager
Public NotInheritable Class CoreDragDropManager
Inheritance
Object Platform::Object IInspectable CoreDragDropManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

public sealed partial class MainPage : Page
{
      private void DropOperationTargetRequested(CoreDragDropManager sender, 
            CoreDropOperationTargetRequestedEventArgs evtArgs)
      {
            // Create a target (see above for more implementation details)
            var target = new DropTarget ();
            evtArgs.SetTarget(target);
      }

      public MainPage()
      {                           
            InitializeComponents();
            var dragDropManager = DragDropManager.GetForCurrentView();
            dragDropManager.DropOperationTargetRequested += DropOperationTargetRequested;
      }
}

Properties

AreConcurrentOperationsEnabled

Gets or sets whether concurrent drag and drop operations are enabled.

Methods

GetForCurrentView()

Gets the core drag and drop manager associated with the currently visible application window.

Events

TargetRequested

Occurs when a drag and drop target is requested.

Applies to