UIElementExtensions.CoordinatesFrom(UIElement, UIElement) Method

Definition

Provides the distance in a Point from the passed in element to the element being called on. For instance, calling child.CoordinatesFrom(container) will return the position of the child within the container. Helper for Windows.UI.Xaml.UIElement.TransformToVisual(Windows.UI.Xaml.UIElement).

public static Windows.Foundation.Point CoordinatesFrom (this Windows.UI.Xaml.UIElement target, Windows.UI.Xaml.UIElement parent);
static member CoordinatesFrom : Windows.UI.Xaml.UIElement * Windows.UI.Xaml.UIElement -> Windows.Foundation.Point
<Extension()>
Public Function CoordinatesFrom (target As UIElement, parent As UIElement) As Point

Parameters

target
Windows.UI.Xaml.UIElement

Element to measure distance.

parent
Windows.UI.Xaml.UIElement

Starting parent element to provide coordinates from.

Returns

Point containing difference in position of elements.

Applies to