I​Drag​Provider I​Drag​Provider I​Drag​Provider Interface

Definition

Enables a Microsoft UI Automation element to describe itself as an element that can be dragged as part of a drag-and-drop operation. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.Drag.

public : interface IDragProviderpublic interface IDragProviderPublic Interface IDragProvider
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The Drag control pattern is used to support draggable controls, or controls with draggable items. For more info on what this pattern is for, see Drag Control Pattern.

IDragProvider is implemented by the existing Windows Runtime automation peers for a ListView item (ListViewItemAutomationPeer ) or GridView item (GridViewItemAutomationPeer ). This supports the Windows Runtime scenario of dragging list items so that they can be reordered. The peer for the host view of the items (ListViewAutomationPeer or GridViewAutomationPeer ) support the IDropTargetProvider pattern.

Use DragPatternIdentifiers if you want to reference the IDragProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent.

Properties

DropEffect DropEffect DropEffect

Gets a string that indicates what will happen when the item is dropped.

public : PlatForm::String DropEffect { get; }public string DropEffect { get; }Public ReadOnly Property DropEffect As string
Value
PlatForm::String string string

A string that indicates what will happen when the item is dropped.

Attributes

Remarks

This property describes the default effect that happens when a grabbed element is dropped on a target, such as moving or copying the element. This property is null if this element doesn't implement the source-only style of drag-and-drop; that is, if the drop target defines its own drop effects. This property can be a short string such as "move", or a longer one such as "insert into Main group". The string is always localized.

DropEffects DropEffects DropEffects

Gets an array of strings that enumerates possible drop effects when this item is dropped.

public : PlatForm::String[] DropEffects { get; }public string[] DropEffects { get; }Public ReadOnly Property DropEffects As string[]
Value
PlatForm::String[] string[] string[]

An array of strings that enumerates possible drop effects when this item is dropped.

Attributes

IsGrabbed IsGrabbed IsGrabbed

Gets a value indicating whether an item is currently being dragged.

public : PlatForm::Boolean IsGrabbed { get; }public bool IsGrabbed { get; }Public ReadOnly Property IsGrabbed As bool
Value
PlatForm::Boolean bool bool

true if the item is being dragged. Otherwise, false.

Attributes

Methods

GetGrabbedItems() GetGrabbedItems() GetGrabbedItems()

Gets an array of UI Automation elements that are being dragged as part of this drag operation.

public : IRawElementProviderSimple[] GetGrabbedItems()public IRawElementProviderSimple[] GetGrabbedItems()Public Function GetGrabbedItems() As IRawElementProviderSimple[]
Returns
IRawElementProviderSimple[] IRawElementProviderSimple[] IRawElementProviderSimple[]

An array of UI Automation elements that are being dragged. Null if this item is an individual item being dragged. Used to enable providers that support dragging multiple items at a time to create an intermediary IDragProvider that encapsulates all of the items being dragged.

Attributes

See Also