Skip to content

TextPresenter hides caret when there is non empty selection #16388

Open
@filipkunc

Description

@filipkunc

Is your feature request related to a problem? Please describe.

I have noticed that in TextPresenter has following logic on line 414:

if ((selectionStart != selectionEnd || !_caretBlink))
{
    return;
}

If I simply change it to:

if (!_caretBlink)
{
    return;
}

I see the caret also when there is a selection which helps me to understand if I am positioned at the start or at the end of the selection.

Describe the solution you'd like

I would like to have additional property on the TextBoxes and TextPresenter which would allow me to render the caret even when selection is empty.
I also think this issue #12809 should also be fixed because it would be more noticeable when this is added.

Describe alternatives you've considered

I know the default TextBox in WPF behaves the same, but consider using something like Excel which also uses under the hood a custom text editing control for in-cell editing. There it also keeps the caret for richer behavior. Same goes for most "code" editing controls.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions