CoreDragDropManager 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
管理應用程式內和之間拖放的存取權。
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
- 繼承
- 屬性
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 |
發生于要求拖放目標時。 |