Skip to main content

TextHitTestResult Structure

Holds a hit test result from a TextLayout.

Definition​

Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public readonly struct TextHitTestResult : IEquatable<TextHitTestResult>
View Source
InheritanceObject → ValueType → TextHitTestResult
ImplementsIEquatable(TextHitTestResult)

Constructors​

TextHitTestResult(CharacterHit, Int32, Boolean, Boolean)Initializes a new instance of the TextHitTestResult class

Properties​

CharacterHitGets the character hit of the hit test result.
IsInsideGets a value indicating whether the point is inside the bounds of the text.
IsTrailingGets a value indicating whether the hit is on the trailing edge of the character.
TextPositionGets the index of the hit character in the text.

Methods​

GetType()Gets the Type of the current instance.
(Inherited from Object)

See Also​

Reference​

Avalonia.Media Namespace