Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TextEdit.GetCharacterIndexFromPoint(Point, Boolean) Method

Returns the insertion index for the specified point.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.2.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