Click or drag to resize
CanvasTextLayoutHitTest Method (Single, Single, CanvasTextLayoutRegion, Boolean)
Gets whether the point overlaps with any text in the text layout.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public bool HitTest(
	float x,
	float y,
	out CanvasTextLayoutRegion textLayoutRegion,
	out bool trailingSideOfCharacter
)

Parameters

x
Type: SystemSingle
y
Type: SystemSingle
textLayoutRegion
Type: Microsoft.Graphics.Canvas.TextCanvasTextLayoutRegion
trailingSideOfCharacter
Type: SystemBoolean

Return Value

Type: Boolean
Remarks

Any whitespace before the end of the text, also counts as text.

Hit tests are always performed using layout bounds, not draw bounds. See LayoutBounds.

See Also