Skip to content

Impove TextBox selection handling #11693

Closed
@rabbitism

Description

@rabbitism

Is your feature request related to a problem? Please describe.
in WPF, TextBox text selection remains opon lost focus, while in Avalonia text selection is cleared.
in WPF there is a SelectionChanged event.

Describe the solution you'd like

  1. There should be a property ClearSelectionOnLostFocus, by default false, and allows user to keep the selected text.
  2. Add SelectionChanged event

Describe alternatives you've considered

Additional context
In WPF, TextBox selection is kept on lostfocus by default. Although visually it's not, it is selected in fact. There is a property IsInactiveSelectionHighlightEnabled, which controls the visual of selected text. If this is set to true, selected text will be grayed.

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