IDragProvider 介面

定義

讓 Microsoft UI 自動化元素將本身描述為可拖曳做為拖放作業一部分的專案。 實作此介面,以支援自動化用戶端使用 GetPattern 呼叫和 PatternInterface.Drag要求的功能。

public interface class IDragProvider
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(779585193, 32764, 20311, 185, 101, 30, 241, 243, 115, 245, 70)]
struct IDragProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(779585193, 32764, 20311, 185, 101, 30, 241, 243, 115, 245, 70)]
public interface IDragProvider
Public Interface IDragProvider
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

拖曳控制項模式可用來支援可拖曳的控制項,或具有可拖曳專案的控制項。 如需此模式用途的詳細資訊,請參閱 拖曳控制項模式

IDragProvider 是由ListView專案的現有Windows 執行階段自動化對等實作, (ListViewItemAutomationPeer) 或GridView 專案 (GridViewItemAutomationPeer) 。 這支援拖曳清單專案的Windows 執行階段案例,以便重新排序。 ListViewAutomationPeerGridViewAutomationPeer之 (專案的主機檢視對等) 支援IDropTargetProvider模式。

如果您想要在引發自動化事件或呼叫RaisePropertyChangedEvent時,從控制項程式碼參考 IDragProvider 模式屬性,請使用DragPatternIdentifiers

屬性

DropEffect

取得字串,指出卸載專案時會發生什麼情況。

DropEffects

取得字串陣列,這個陣列會列舉卸載這個專案時的可能卸載效果。

IsGrabbed

取得值,指出專案目前是否正在拖曳。

方法

GetGrabbedItems()

取得要拖曳為此拖曳作業一部分的 UI 自動化元素陣列。

適用於

另請參閱