LongPressingEventArgs.GetPosition(Element) Method

Definition

Gets the current position of the touch, relative to the specified element.

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

The element to get the position relative to. Pass null to get the position relative to the containing window.

Returns

The position of the touch relative to the specified element, or null if the position cannot be determined.

Applies to