共用方式為


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

發生于要求拖放目標時。

適用於