DragEventArgs.GetPosition method

Returns a drop point that is relative to a specified UIElement.

Syntax


public Point GetPosition(
  UIElement relativeTo
)

Parameters

relativeTo

Type: UIElement

The UIElement for which to get a relative drop point.

Return value

Type: Point

A point in the coordinate system that is relative to the element specified in relativeTo.

Remarks

For drag-drop operations involving a UI container, you typically call GetPosition using a relativeTo reference to the object that is the sender of the event. This gives the relative position within the container.

If this DragEventArgs is associated with the UIElement.Drop event, then the return value of GetPosition is the drop point.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

DragEventArgs
Point

 

 

Show:
© 2015 Microsoft