Share via


PointerEventArgs.GetPosition(Element) Method

Definition

When overridden in a derived class, gets the position of the pointer.

public:
 virtual Nullable<Microsoft::Maui::Graphics::Point> GetPosition(Microsoft::Maui::Controls::Element ^ relativeTo);
public virtual Microsoft.Maui.Graphics.Point? GetPosition (Microsoft.Maui.Controls.Element? relativeTo);
abstract member GetPosition : Microsoft.Maui.Controls.Element -> Nullable<Microsoft.Maui.Graphics.Point>
override this.GetPosition : Microsoft.Maui.Controls.Element -> Nullable<Microsoft.Maui.Graphics.Point>
Public Overridable Function GetPosition (relativeTo As Element) As Nullable(Of Point)

Parameters

relativeTo
Element

Where the pointer will be measured from.

Returns

The position relative to the Element.

Remarks

Gets the position of the pointer relative to the element by default.

Applies to