CoreDragDropManager 类

定义

管理在应用内和应用之间拖放的访问。

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
继承
Object Platform::Object IInspectable CoreDragDropManager
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

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;
      }
}

属性

AreConcurrentOperationsEnabled

获取或设置是否启用并发拖放操作。

方法

GetForCurrentView()

获取与当前可见应用程序窗口关联的核心拖放管理器。

事件

TargetRequested

在请求拖放目标时发生。

适用于