UIElement.StartDragAsync 方法

定義

多載

名稱 Description
StartDragAsync(ExpPointerPoint)
StartDragAsync(PointerPoint)

啟動拖放操作。

Important

若使用者以管理員身份以提升模式執行應用程式,則不支援。

StartDragAsync(ExpPointerPoint)

public:
 virtual IAsyncOperation<DataPackageOperation> ^ StartDragAsync(ExpPointerPoint ^ pointerPoint) = StartDragAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DataPackageOperation> StartDragAsync(ExpPointerPoint const& pointerPoint);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DataPackageOperation> StartDragAsync(ExpPointerPoint pointerPoint);
function startDragAsync(pointerPoint)
Public Function StartDragAsync (pointerPoint As ExpPointerPoint) As IAsyncOperation(Of DataPackageOperation)

參數

pointerPoint
ExpPointerPoint

傳回

屬性

適用於

StartDragAsync(PointerPoint)

啟動拖放操作。

Important

若使用者以管理員身份以提升模式執行應用程式,則不支援。

public:
 virtual IAsyncOperation<DataPackageOperation> ^ StartDragAsync(PointerPoint ^ pointerPoint) = StartDragAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DataPackageOperation> StartDragAsync(PointerPoint const& pointerPoint);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DataPackageOperation> StartDragAsync(PointerPoint pointerPoint);
function startDragAsync(pointerPoint)
Public Function StartDragAsync (pointerPoint As PointerPoint) As IAsyncOperation(Of DataPackageOperation)

參數

pointerPoint
PointerPoint

指標的座標,使用者與螢幕互動的位置,以及拖曳視覺符號所附加的位置。

傳回

一台 Windows。ApplicationModel.DataTransfer.DataPackageOperation 值,表示拖放操作的類型,以及操作是否成功。

屬性

備註

如果你實作自訂手勢偵測來啟動拖曳操作,你可以呼叫 Microsoft。UI。Xaml.UIElement.StartDragAsync 方法,用來程式化地對任何 UIElement 發起拖曳操作。 呼叫此方法會產生 Microsoft。UI。Xaml.UIElement.DragStarting 事件正在被提出。 處理 DragStarting 事件以指定操作的其他屬性,例如資料套件和拖曳視覺化。

指標點參數是使用者使用輸入裝置(觸控、滑鼠或筆)與螢幕互動的時刻。 拖曳操作中顯示的拖曳視覺會附加在來電者提供的 PointerPoint 中標示的指標上。

Microsoft。UI。Xaml.UIElement.StartDragAsync 由此方法回傳,指示拖曳操作是移動、複製還是連結;以及它是否成功。 這和 Microsoft 提供的數值相同。UI。Xaml.DropCompletedEventArgs.DropResult 屬性。

適用於