Skip to main content

TextEdit.GetCharacterIndexFromPoint(Point, Boolean) Method

Returns the insertion index for the specified point.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public int GetCharacterIndexFromPoint(
    Point point,
    bool snapToText
)

Parameters

Name Type Description
point Point

The point in the editor’s coordinate-space for which to return an insertion index.

snapToText Boolean

true to return the nearest insertion index if there is no character at the specified point; false to return -1 if there is no character at the specified point.

Returns

Type Description
Int32

The insertion index for the specified point, -1 if the valid insertion index was not found.

See Also